Commit 2a72a60e LN

批量轴增加扫码点功能

1 个父辈 3fa3cb66
...@@ -18,13 +18,16 @@ PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,, ...@@ -18,13 +18,16 @@ PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,, PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,, PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,, PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,, PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,9999,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,, PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,,
PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,, PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,, PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,, PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,, PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,,
......
...@@ -1095,37 +1095,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -1095,37 +1095,47 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
IB07_AxisUpMove, IB07_AxisUpMove,
/// <summary> /// <summary>
/// 料串入料:扫码点可用,批量轴上升到扫码点
/// </summary>
IB08_BatchAxisToP4,
/// <summary>
/// 料串入料:等待是否可以开始扫码 /// 料串入料:等待是否可以开始扫码
/// </summary> /// </summary>
IB08_WaitCanScan, IB09_WaitCanScan,
/// <summary> /// <summary>
/// 料串入料:扫码 /// 料串入料:扫码
/// </summary> /// </summary>
IB09_ScanCode, IB11_ScanCode,
/// <summary>
/// 料串入库:扫码前走到了P4点,需要返回料盘位置
/// </summary>
IB12_BatchAxisToReelPosition,
/// <summary> /// <summary>
/// 料串入料:扫码结束,等待取料机构拿料 /// 料串入料:扫码结束,等待取料机构拿料
/// </summary> /// </summary>
IB10_ScanOK, IB13_ScanOK,
/// <summary> /// <summary>
/// 料串入料:当前托盘已离开 /// 料串入料:当前托盘已离开
/// </summary> /// </summary>
IB11_WaitReelLeave, IB14_ReelLeave,
/// <summary> /// <summary>
/// 料串入料:料盘已拿走,批量轴到P2,侧高度 /// 料串入料:料盘已拿走,批量轴到P2,侧高度
/// </summary> /// </summary>
IB12_BatchAxisToP2, IB15_BatchAxisToP2,
/// <summary> /// <summary>
/// 料串入料:记录高度,判断是否还有料盘 /// 料串入料:记录高度,判断是否还有料盘
/// </summary> /// </summary>
IB13_SaveHight, IB16_SaveHight,
/// <summary> /// <summary>
/// 料串入料:等待夹爪离开 /// 料串入料:等待夹爪离开
/// </summary> /// </summary>
IB14_WaitReelLeave, IB17_WaitReelLeave,
/// <summary> /// <summary>
......
...@@ -38,6 +38,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,6 +38,8 @@ namespace OnlineStore.DeviceLibrary
Name = "A料口 "; Name = "A料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_A; Config.BatchAxisP1 = config.BatchAxisP1_A;
Config.BatchAxisP2 = config.BatchAxisP2_A; Config.BatchAxisP2 = config.BatchAxisP2_A;
Config.BatchAxisP4 = config.BatchAxisP4_A;
Config.AgvName = config.AgvName_A; Config.AgvName = config.AgvName_A;
Config.CameraName = config.CameraNameList_A; Config.CameraName = config.CameraNameList_A;
Config.RfidIP = config.PRO_RFIP_A; Config.RfidIP = config.PRO_RFIP_A;
...@@ -48,6 +50,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
Name = "B料口 "; Name = "B料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_B; Config.BatchAxisP1 = config.BatchAxisP1_B;
Config.BatchAxisP2 = config.BatchAxisP2_B; Config.BatchAxisP2 = config.BatchAxisP2_B;
Config.BatchAxisP4 = config.BatchAxisP4_B;
Config.AgvName = config.AgvName_B; Config.AgvName = config.AgvName_B;
Config.CameraName = config.CameraNameList_B; Config.CameraName = config.CameraNameList_B;
Config.RfidIP = config.PRO_RFIP_B; Config.RfidIP = config.PRO_RFIP_B;
...@@ -626,6 +630,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -626,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
public string AgvName = ""; public string AgvName = "";
public int BatchAxisP1 = 0; public int BatchAxisP1 = 0;
public int BatchAxisP2 = 0; public int BatchAxisP2 = 0;
public int BatchAxisP4 = 0;
internal string RfidIP = ""; internal string RfidIP = "";
#region 左右入料口共有IO #region 左右入料口共有IO
//伺服料盘检测 //伺服料盘检测
......
...@@ -15,7 +15,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,7 +15,14 @@ namespace OnlineStore.DeviceLibrary
public bool MoveStop = false; public bool MoveStop = false;
public ShelfInfo CurrShelf = new ShelfInfo(); public ShelfInfo CurrShelf = new ShelfInfo();
#region 入库 #region 入库
/// <summary>
/// 扫码前是否到了P4点
/// </summary>
private bool toBatchP4 = false;
/// <summary>
/// 扫门前料盘位置
/// </summary>
private int batchAxisReelPosition = 0;
private List<string> preCodeList = new List<string>(); private List<string> preCodeList = new List<string>();
private List<string> LastCodeList = new List<string>(); private List<string> LastCodeList = new List<string>();
//private List<string> NextCodeList = new List<string>(); //private List<string> NextCodeList = new List<string>();
...@@ -33,7 +40,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -33,7 +40,7 @@ namespace OnlineStore.DeviceLibrary
if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave) if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave)
{ {
//WorkLog("料串入料 :等待AGV来取空料串1"); //WorkLog("料串入料 :等待AGV来取空料串1");
return false; ; return false;
} }
UpdateShelf(1); UpdateShelf(1);
if (CurrShelf.ShelfState.Equals(3)) if (CurrShelf.ShelfState.Equals(3))
...@@ -204,19 +211,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,19 +211,31 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove)) else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove))
{ {
CheckHasTray(); CheckHasTray();
}else if (MoveInfo.IsStep(StepEnum.IB08_BatchAxisToP4))
{
if (Robot.AxisIsInShelfUp(ShelfType))
{
MoveInfo.NextMoveStep(StepEnum.IB09_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开");
}
else
{
IB11_ScanCode();
}
} }
else if (MoveInfo.IsStep(StepEnum.IB08_WaitCanScan)) else if (MoveInfo.IsStep(StepEnum.IB09_WaitCanScan))
{ {
if (!Robot.AxisIsInShelfUp(ShelfType)) if (!Robot.AxisIsInShelfUp(ShelfType))
{ {
IB09_ScanCode(); IB11_ScanCode();
} }
else if (MoveInfo.IsTimeOut(10)) else if (MoveInfo.IsTimeOut(10))
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "] " + "等待旋转轴离开料串超时" + "[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "] " + "等待旋转轴离开料串超时" + "[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
} }
} }
else if (MoveInfo.IsStep(StepEnum.IB09_ScanCode)) else if (MoveInfo.IsStep(StepEnum.IB11_ScanCode))
{ {
//WorkLog("IB09_ScanCode"); //WorkLog("IB09_ScanCode");
MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("", "")); MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("", ""));
...@@ -230,24 +249,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,24 +249,43 @@ namespace OnlineStore.DeviceLibrary
WorkLog(" 无有效条码NG,需要放入NG箱:" + MoveInfo.MoveParam.PosInfo.ToStr()); WorkLog(" 无有效条码NG,需要放入NG箱:" + MoveInfo.MoveParam.PosInfo.ToStr());
} }
MoveInfo.NextMoveStep(StepEnum.IB10_ScanOK);
//如果之前走到了扫码点,需要下降
if (toBatchP4)
{
MoveInfo.NextMoveStep(StepEnum.IB12_BatchAxisToReelPosition);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
BatchAxis.AbsMove(MoveInfo, batchAxisReelPosition, Robot.Config.BatchAxis_P4Speed);
WorkLog("扫码结束,扫码前走到了扫码点【" + Config.BatchAxisP4 + "】,批量轴需要返回之前位置【" + batchAxisReelPosition + "】");
}
else
{
MoveInfo.NextMoveStep(StepEnum.IB13_ScanOK);
var span = DateTime.Now - MoveInfo.LastSetpTime;
WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr());
}
}else if (MoveInfo.IsStep(StepEnum.IB12_BatchAxisToReelPosition))
{
string code = CodeManager.ProcessCode(LastCodeList);
MoveInfo.NextMoveStep(StepEnum.IB13_ScanOK);
var span = DateTime.Now - MoveInfo.LastSetpTime; var span = DateTime.Now - MoveInfo.LastSetpTime;
WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr()); WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr());
} }
else if (MoveInfo.IsStep(StepEnum.IB11_WaitReelLeave)) else if (MoveInfo.IsStep(StepEnum.IB14_ReelLeave))
{ {
MoveInfo.NextMoveStep(StepEnum.IB12_BatchAxisToP2); MoveInfo.NextMoveStep(StepEnum.IB15_BatchAxisToP2);
WorkLog("料串入料 :料盘已拿走,批量轴到P2,测盘高 "); WorkLog("料串入料 :料盘已拿走,批量轴到P2,测盘高 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
BatchAxisToP2(); BatchAxisToP2();
} }
else if (MoveInfo.IsStep(StepEnum.IB12_BatchAxisToP2)) else if (MoveInfo.IsStep(StepEnum.IB15_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(StepEnum.IB13_SaveHight); MoveInfo.NextMoveStep(StepEnum.IB16_SaveHight);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LastHeight = GetHeight(); LastHeight = GetHeight();
} }
else if (MoveInfo.IsStep(StepEnum.IB14_WaitReelLeave)) else if (MoveInfo.IsStep(StepEnum.IB17_WaitReelLeave))
{ {
CheckHasTray(); CheckHasTray();
} }
...@@ -288,16 +326,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -288,16 +326,16 @@ namespace OnlineStore.DeviceLibrary
public bool IsInScanCode() public bool IsInScanCode()
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore) && MoveInfo.IsStep(StepEnum.IB09_ScanCode)) if (MoveInfo.MoveType.Equals(MoveType.InStore) && MoveInfo.IsStep(StepEnum.IB11_ScanCode))
{ {
return true; return true;
} }
return false; return false;
} }
private void IB09_ScanCode() private void IB11_ScanCode()
{ {
ClearWarnMsg("等待旋转轴离开料串超时"); ClearWarnMsg("等待旋转轴离开料串超时");
MoveInfo.NextMoveStep(StepEnum.IB09_ScanCode); MoveInfo.NextMoveStep(StepEnum.IB11_ScanCode);
bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1); bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1);
LastCodeList = new List<string>(); LastCodeList = new List<string>();
...@@ -372,16 +410,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,16 +410,35 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = ""; WarnMsg = "";
if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false)) if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false))
{ {
if (Robot.AxisIsInShelfUp(ShelfType))
{ toBatchP4 = false;
MoveInfo.NextMoveStep(StepEnum.IB08_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); //判断扫码点是否可用,可用,运动到扫码点
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开"); int currP = BatchAxis.GetAclPosition();
int targetPosition = currP + Config.BatchAxisP4;
if (Config.BatchAxisP4 > 0 &&(targetPosition<Config.BatchAxisP2 ))
{
batchAxisReelPosition = currP;
toBatchP4 = true;
MoveInfo.NextMoveStep(StepEnum.IB08_BatchAxisToP4);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
BatchAxis.AbsMove(MoveInfo, targetPosition, Robot.Config.BatchAxis_P4Speed);
WorkLog("料盘已到位,批量轴当前位置【"+currP+ "】,扫码上升高度P4【" + Config.BatchAxisP4+"】可用,批量轴走到扫码点【"+ targetPosition + "】");
} }
else else
{ {
IB09_ScanCode(); LogUtil.info(Name + "料盘已到位,批量轴当前位置【" + currP + "】扫码上升高度P4【" + Config.BatchAxisP4 + "】扫码点【" + targetPosition + "】P2【"+ Config.BatchAxisP2 + "】,可直接扫码");
} if (Robot.AxisIsInShelfUp(ShelfType))
{
MoveInfo.NextMoveStep(StepEnum.IB09_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开");
}
else
{
IB11_ScanCode();
}
}
} }
else else
{ {
...@@ -863,7 +920,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -863,7 +920,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore)) if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
MoveInfo.NextMoveStep(StepEnum.IB11_WaitReelLeave); MoveInfo.NextMoveStep(StepEnum.IB14_ReelLeave);
WorkLog("当前料盘已离开,清理高度,准备开始测高"); WorkLog("当前料盘已离开,清理高度,准备开始测高");
LastHeight = 0; LastHeight = 0;
} }
...@@ -877,9 +934,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -877,9 +934,9 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore)) if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
if (MoveInfo.IsStep(StepEnum.IB13_SaveHight)) if (MoveInfo.IsStep(StepEnum.IB16_SaveHight))
{ {
MoveInfo.NextMoveStep(StepEnum.IB14_WaitReelLeave); MoveInfo.NextMoveStep(StepEnum.IB17_WaitReelLeave);
WorkLog("当前料盘已离开,开始判断是否有下一盘,开始扫码"); WorkLog("当前料盘已离开,开始判断是否有下一盘,开始扫码");
LastHeight = 0; LastHeight = 0;
} }
......
...@@ -416,7 +416,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -416,7 +416,7 @@ namespace OnlineStore.DeviceLibrary
//若左侧或右侧在等待扫码结束的状态,需要开始去取料 //若左侧或右侧在等待扫码结束的状态,需要开始去取料
foreach (BatchMoveBean moveBean in BatchMoveList) foreach (BatchMoveBean moveBean in BatchMoveList)
{ {
if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB10_ScanOK)) if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB13_ScanOK))
{ {
LogInfo(moveBean.Name + "开始取料:" + moveBean.GetInstoreParam().PosInfo.ToStr()); LogInfo(moveBean.Name + "开始取料:" + moveBean.GetInstoreParam().PosInfo.ToStr());
StartInstore(moveBean.GetInstoreParam()); StartInstore(moveBean.GetInstoreParam());
......
...@@ -346,6 +346,22 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -346,6 +346,22 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("MiddleAxis_Reverse_Offset")] [ConfigProAttribute("MiddleAxis_Reverse_Offset")]
public int MiddleAxis_Reverse_Offset { get; set; } public int MiddleAxis_Reverse_Offset { get; set; }
/// <summary>
/// PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxisP4_A")]
public int BatchAxisP4_A { get; set; }
/// <summary>
/// PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxisP4_B")]
public int BatchAxisP4_B { get; set; }
/// <summary>
/// PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P4Speed")]
public int BatchAxis_P4Speed { get; set; }
private List<string> CameraList = null; private List<string> CameraList = null;
......
...@@ -86,6 +86,8 @@ namespace OnlineStore.XLRStore ...@@ -86,6 +86,8 @@ namespace OnlineStore.XLRStore
batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.Config.BatchAxisP1); batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.Config.BatchAxisP1);
batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.Config.BatchAxisP2 ); batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.Config.BatchAxisP2 );
batchAxisP4.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P4Speed, moveBean.Config.BatchAxisP4, true);
lblWarnMsg.Text = moveBean.WarnMsg; lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr(); lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName); lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName);
...@@ -110,18 +112,30 @@ namespace OnlineStore.XLRStore ...@@ -110,18 +112,30 @@ namespace OnlineStore.XLRStore
{ {
int p1 = batchAxisP1.PointValue; int p1 = batchAxisP1.PointValue;
int p2 = batchAxisP2.PointValue; int p2 = batchAxisP2.PointValue;
int p4 = batchAxisP4.PointValue;
if (p4<0)
{
MessageBox.Show( "扫码时上升高度P4不能小于0 ,请重新设置P4点位置", "保存失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
moveBean.Config.BatchAxisP1 = p1; moveBean.Config.BatchAxisP1 = p1;
moveBean.Config.BatchAxisP2 = p2; moveBean.Config.BatchAxisP2 = p2;
moveBean.Config.BatchAxisP4 = p4;
if (moveBean.ShelfType.Equals(1)) if (moveBean.ShelfType.Equals(1))
{ {
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_A = p1; StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_A = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_A = p2; StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_A = p2;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP4_A = p4;
} }
else else
{ {
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_B = p1; StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_B = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_B = p2; StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_B = p2;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP4_B = p4;
} }
StoreManager.SaveInputEquipConfig(StoreManager.XLRStore.inputEquip.Config); StoreManager.SaveInputEquipConfig(StoreManager.XLRStore.inputEquip.Config);
MessageBox.Show("保存成功"); MessageBox.Show("保存成功");
......
...@@ -13,7 +13,7 @@ using System.Windows.Forms; ...@@ -13,7 +13,7 @@ using System.Windows.Forms;
namespace OnlineStore.XLRStore.useControl namespace OnlineStore.XLRStore.useControl
{ {
public partial class AxisPointControl : UserControl public partial class AxisPointControl : UserControl
{ {
public AxisPointControl() public AxisPointControl()
{ {
InitializeComponent(); InitializeComponent();
...@@ -26,7 +26,7 @@ namespace OnlineStore.XLRStore.useControl ...@@ -26,7 +26,7 @@ namespace OnlineStore.XLRStore.useControl
public int PointValue public int PointValue
{ {
get { return FormUtil.GetIntValue( txtPoint.Text); } get { return FormUtil.GetIntValue(txtPoint.Text); }
set { txtPoint.Text = value.ToString(); } set { txtPoint.Text = value.ToString(); }
} }
public Color PointBackColor public Color PointBackColor
...@@ -41,17 +41,34 @@ namespace OnlineStore.XLRStore.useControl ...@@ -41,17 +41,34 @@ namespace OnlineStore.XLRStore.useControl
} }
private int MoveSpeed; private int MoveSpeed;
private AxisBean MoveAxis = null; private AxisBean MoveAxis = null;
public void SetMoveData(AxisBean axisBean,int speed,int pointV) private bool isRelMovePoint=false;
public void SetMoveData(AxisBean axisBean, int speed, int pointV, bool isRelMovePoint=false)
{ {
this.MoveAxis = axisBean; this.MoveAxis = axisBean;
this.MoveSpeed = speed; this.MoveSpeed = speed;
this.PointValue = pointV; this.PointValue = pointV;
this.isRelMovePoint = isRelMovePoint;
} }
private void btnMove_Click(object sender, EventArgs e) private void btnMove_Click(object sender, EventArgs e)
{ {
int v = FormUtil.GetIntValue(txtPoint); int v = FormUtil.GetIntValue(txtPoint);
LogUtil.info(this.Name+" "+ MoveAxis.AxisName + " 点击:" + btnMove.Text); if (isRelMovePoint)
MoveAxis.AbsMove(null, v, MoveSpeed); {
if (v<=0)
{
MessageBox.Show(PointText + "为相对运动,请正确设置点位", "操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int currPosition = MoveAxis.GetAclPosition();
int targetPosition = currPosition + v;
LogUtil.info(this.Name + " " + MoveAxis.AxisName + " 点击:" + btnMove.Text + ",增量运动【" + v + "】,目标位置【"+ targetPosition + "】");
MoveAxis.AbsMove(null, targetPosition, MoveSpeed);
}
else
{
LogUtil.info(this.Name + " " + MoveAxis.AxisName + " 点击:" + btnMove.Text + ",绝对运动【" + v + "】");
MoveAxis.AbsMove(null, v, MoveSpeed);
}
} }
} }
} }
...@@ -24,3 +24,13 @@ AA:第3和第4位存储机构A面或B面,AA或者BB ...@@ -24,3 +24,13 @@ AA:第3和第4位存储机构A面或B面,AA或者BB
Config_InputEquip.csv 配置文件需要增加一行配置: Config_InputEquip.csv 配置文件需要增加一行配置:
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,, PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
20220325
批量轴增加扫码点P4功能。扫码点P4配置时必须大于上料目标点P2。使用时必须高于当前料盘位置才会生效。
Config_InputEquip.csv 文件需要增加三行配置:
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!