Commit c4fb65b7 LN

压紧步骤修改

1 个父辈 d5c25d0e
......@@ -79,20 +79,23 @@ namespace OnlineStore.DeviceLibrary
{
}
else if (wait.WaitType.Equals(WaitEnum.W008_Compress))
{
string msg = "";
{
//等待信号亮或者走到绝对位置才停止
if (IOValue(TargetIoType).Equals(TargetIoValue))
{
wait.IsEnd = true;
LogUtil.info("CheckWait 检测到" + TargetIoType + "=" + TargetIoValue + ",停止压紧轴运行");
wait.IsEnd = true;
ComAxisStopCheck();
}
else
{
bool result = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!result && (!msg.Equals("")))
bool moveOk = ACServerManager.GetBusyStatus(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(0);
if (moveOk)
{
LogUtil.error(msg);
//TODO 判断是否达到高度,如果未达到,继续上升
wait.IsEnd = true;
ComAxisStopCheck();
}
wait.IsEnd = result;
}
}
else if (wait.WaitType.Equals(WaitEnum.W009_ScanCode))
......@@ -354,8 +357,11 @@ namespace OnlineStore.DeviceLibrary
ComTargetPosition = currPosition;
int targetP = currPosition + Config.CompAxis_Down_Position;
LastHeight = Config.GetComP2PlateH(targetP);
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":检测到料叉压紧确认信号,向下压紧【" + ComTargetPosition + "】目标【" + targetP + "】,记录料盘高度【" + LastHeight + "】");
MoveInfo.MoveParam.MoveP.ComPress_P2 = ComTargetPosition;
MoveInfo.MoveParam.MoveP.ComPress_P2 = targetP;
MoveInfo.MoveParam.MoveP.ComPress_P3 = targetP + Config.CompAxis_P3_P2_Value;
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":检测到料叉压紧确认信号,向下压紧【" + ComTargetPosition + "】目标【" + targetP +
"】,记录料盘高度【" + LastHeight + "】,ComP2【"+ targetP + "】ComP3【"+ MoveInfo.MoveParam.MoveP.ComPress_P3 + "】");
ACAxisMove(Config.Comp_Axis, targetP, Config.CompAxis_P1_Speed);
}
......@@ -390,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_22_InOutToP2))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_23_PutTrayDown);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴缓慢下降到P1,压紧轴返回压紧前点P3");
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴到扫码低点P1,压紧轴到压紧前点P3");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
}
......@@ -436,8 +442,8 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_27_InoutToP2))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_28_GetScanPTray);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴到P1,压紧轴压紧");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴到扫码高P2,压紧轴到压紧点P2");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P2, Config.CompAxis_P2_Speed);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_28_GetScanPTray))
......@@ -949,7 +955,7 @@ namespace OnlineStore.DeviceLibrary
{
axisCheckTimer = new System.Timers.Timer();
axisCheckTimer.AutoReset = true;
axisCheckTimer.Interval += 30;
axisCheckTimer.Interval += 50;
axisCheckTimer.Elapsed += CheckTimer_Elapsed;
axisCheckTimer.Enabled = false;
}
......@@ -963,6 +969,7 @@ namespace OnlineStore.DeviceLibrary
{
if (!(axisCheckTimer == null))
{
ACServerManager.SuddenStop(Config.Comp_Axis);
axisCheckTimer.Stop();
}
return true;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!