Commit 70885dc2 LN

托盘定位气缸前进逻辑修改

1 个父辈 4e8c9d01
......@@ -650,7 +650,17 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public bool IsTrayLCylinderBefore()
{
if (IOValue(IO_Type.SL_TrayLocation1_After).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.SL_TrayLocation1_Before).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.SL_TrayLocation2_After).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.SL_TrayLocation2_Before).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
public bool IsTrayLCylinderAfter()
{
if (IOValue(IO_Type.SL_TrayLocation1_After).Equals(IO_VALUE.HIGH) &&
......
......@@ -207,7 +207,20 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(" 未检测到料架,入料结束");
}
}
private void FI_13_TrayLocation_Back()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_13_TrayLocation_Back);
InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸后退,等待再次前进");
TrayLCylinderAfter(MoveInfo);
}
private void FI_15_AxisUpMove()
{
MoveInfo.NextMoveStep(LineMoveStep.FI_15_AxisUpMove);
InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸已到位,上料轴开始慢速上升到P3点,等待检测到料盘");
MoveInfo.ShelfNoTray = false;
BatchAxisToP3();
}
private int TrayLCyResetCount = 0;
protected override void InStoreProcess()
{
if (MoveInfo.IsInWait)
......@@ -300,28 +313,45 @@ namespace OnlineStore.DeviceLibrary
NextCodeList = new List<string>();
TrayLCylinderBefore(null);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
TrayLCyResetCount = 1;
}
else if (MoveInfo.IsStep(LineMoveStep.FI_12_TrayLocation_Before))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_13_TrayLocation_Back);
InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸后退,等待再次前进");
TrayLCylinderAfter(MoveInfo);
//第一次升降盘定位气缸前进如果到位,直接开始入库
if (IsTrayLCylinderBefore())
{
FI_15_AxisUpMove();
}
else
{
FI_13_TrayLocation_Back();
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_13_TrayLocation_Back))
{
TrayLCyResetCount++;
MoveInfo.NextMoveStep(LineMoveStep.FI_14_TrayLocation_Before);
InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸前进,清空条码信息");
LastCodeList = new List<string>();
NextCodeList = new List<string>();
InLog("料架入库" + MoveInfo.SLog + ":升降盘定位气缸第【"+TrayLCyResetCount+"】次前进 ");
if (TrayLCyResetCount <= 4)
{
TrayLCylinderBefore(null);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
else
{
TrayLCylinderBefore(MoveInfo);
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_14_TrayLocation_Before))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_15_AxisUpMove);
InLog("料架入库" + MoveInfo.SLog + ":上料轴开始慢速上升到P3点,等待检测到料盘");
MoveInfo.ShelfNoTray = false;
BatchAxisToP3();
if (IsTrayLCylinderBefore())
{
FI_15_AxisUpMove();
}
else
{
FI_13_TrayLocation_Back();
}
}
#endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!