Commit d03fe7e8 几米阳光

1

1 个父辈 7daf9d25
...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "到待机状态,进出轴到P1,压紧轴先相对走-2000"); LogUtil.info(LOGGER, StoreName + "到待机状态,进出轴到P1,压紧轴先相对走-2000");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ComBeforeHomeMove(); ComBeforeHomeMove();
ResetCloseDoor(); ResetCloseDoor();
} }
public override void Reset() public override void Reset()
{ {
...@@ -369,7 +369,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -369,7 +369,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
ResetCloseDoor(); CloseDoorAndWait();
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
LogUtil.info(LOGGER, StoreName + "复位完成"); LogUtil.info(LOGGER, StoreName + "复位完成");
...@@ -397,6 +397,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -397,6 +397,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
CloseDoorAndWait();
break; break;
case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1: case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1:
LogUtil.info(LOGGER, StoreName + "到待机状态完成"); LogUtil.info(LOGGER, StoreName + "到待机状态完成");
...@@ -537,7 +538,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -537,7 +538,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position); ComMoveToPosition(Config.CompressAxis_P1_Position);
ResetCloseDoor(); CloseDoorAndWait();
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
LogUtil.info(LOGGER, StoreName + "回原点完成"); LogUtil.info(LOGGER, StoreName + "回原点完成");
......
...@@ -116,7 +116,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,7 +116,7 @@ namespace OnlineStore.DeviceLibrary
int errorCount = Math.Abs(outCount - InOut_P1); int errorCount = Math.Abs(outCount - InOut_P1);
if (errorCount <= Config.InOut_Axis.CanErrorCountMin) if (errorCount <= Config.InOut_Axis.CanErrorCountMin)
{ {
LogUtil.info("进出轴当前位置:" + outCount + ",已经在P1,不需要再回P1"); LogUtil.debug("进出轴当前位置:" + outCount + ",已经在P1,不需要再回P1");
} }
else else
{ {
...@@ -324,20 +324,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,20 +324,20 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus); LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前 storeStatus=" + storeRunStatus);
return false; return false;
} }
} }
private void SI_02_Move(LineMoveP moveP) private void SI_02_Move(LineMoveP moveP)
{ {
InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门"); InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1");
StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome); StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
private void SI_04_DeviceToDoor() private void SI_04_DeviceToDoor()
{ {
InStoreLog("入库:SI_04 叉子进入入料口,进出轴至P2(进料口取料点) "); InStoreLog("入库:SI_04 叉子进入入料口,进出轴至P2 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_DeviceToDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_04_DeviceToDoor);
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
...@@ -360,7 +360,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -360,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_02_InOutAxisHome) else if (StoreMove.MoveStep == StoreMoveStep.SI_02_InOutAxisHome)
{ {
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,轴4动作至P3"); InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1, 轴4动作至P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome); StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
ComMoveToPosition(moveP.ComPress_P3); ComMoveToPosition(moveP.ComPress_P3);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_04_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_04_DeviceToDoor)
{ {
InStoreLog("入库:SI_05 拿物品,批量入库, 等待吸盘放下物品"); InStoreLog("入库:SI_05 等待吸盘放下物品");
StoreMove.NextMoveStep(StoreMoveStep.SI_05_DoorWarToDevice); StoreMove.NextMoveStep(StoreMoveStep.SI_05_DoorWarToDevice);
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW); KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
...@@ -382,7 +382,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -382,7 +382,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (StoreMove.IsBatchInOutStore && (!StoreMove.IsNeedInStore)) if (StoreMove.IsBatchInOutStore && (!StoreMove.IsNeedInStore))
{ {
InStoreLog("入库:SI_21不需要入库,需要操作人员拿走料盘,叉子到门口位置P7 "); InStoreLog("送出料盘:SI_21 ,需要操作人员拿走料盘,进出轴(叉子)到门口位置P7 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_21_DeviceToDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_21_DeviceToDoor);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_Door_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_Door_P7, Config.UpDownAxis_P7_Speed);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SafetyLightCurtains, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SafetyLightCurtains, IO_VALUE.HIGH));
...@@ -391,13 +391,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -391,13 +391,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
InStoreLog("入库:SI_06 压紧轴压紧,到压紧点 "); InStoreLog("入库:SI_06 压紧轴压紧,压紧轴到P2 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_CompressWork); StoreMove.NextMoveStep(StoreMoveStep.SI_06_CompressWork);
ComMoveToPosition(moveP.ComPress_P2); ComMoveToPosition(moveP.ComPress_P2);
} }
else else
{ {
InStoreLog("入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点) "); InStoreLog("入库:SI_07 叉子返回,进出轴至P1(待机点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
...@@ -405,7 +405,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -405,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_06_CompressWork) else if (StoreMove.MoveStep == StoreMoveStep.SI_06_CompressWork)
{ {
InStoreLog("入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点) "); InStoreLog("入库:SI_07 叉子返回,进出轴至P1(待机点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
...@@ -427,7 +427,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -427,7 +427,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up) else if (StoreMove.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up)
{ {
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点)),关闭舱门 "); InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点)) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag); StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
...@@ -464,7 +464,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -464,7 +464,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
{ {
InStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); InStoreLog("入库:SI_13 叉子从库位中返回,进出轴至P1(待机点) ");
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = posId; lastPosId = posId;
...@@ -478,7 +478,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -478,7 +478,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutBack)
{ {
InStoreLog("入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"); InStoreLog("入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点))");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack);
ComMoveToPosition(moveP.ComPress_P1); ComMoveToPosition(moveP.ComPress_P1);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
...@@ -498,36 +498,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -498,36 +498,31 @@ namespace OnlineStore.DeviceLibrary
#region 送出料盘处理 #region 送出料盘处理
else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor)
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) InStoreLog("送出料盘:SI_22 ,打开仓门 ");
{ StoreMove.NextMoveStep(StoreMoveStep.SI_22_OpenDoor);
InStoreLog("入库:SI_21不需要入库,打开仓门 "); OpenDoorAndWait();
StoreMove.NextMoveStep(StoreMoveStep.SI_22_OpenDoor);
OpenDoorAndWait();
}
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SI_22_OpenDoor)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SI_22_OpenDoor))
{ {
InStoreLog("入库:SI_23不需要入库,等待操作人员拿走料盘 "); InStoreLog("送出料盘:SI_23 ,等待操作人员拿走料盘 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_23_WaitTrayGo); StoreMove.NextMoveStep(StoreMoveStep.SI_23_WaitTrayGo);
StoreMove.TimeOutSeconds = 120;
AutomaticBaiting.IsGetTrayGo = false; AutomaticBaiting.IsGetTrayGo = false;
AutomaticBaiting.IsWaitTragGo = true; AutomaticBaiting.IsWaitTragGo = true;
StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray()); StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray());
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_23_WaitTrayGo) else if (StoreMove.MoveStep == StoreMoveStep.SI_23_WaitTrayGo)
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) InStoreLog("送出料盘:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) ");
{ // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
InStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) lastPosId = "";
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; lastPosIdStatus = StoreStatus.InStoreEnd;
lastPosId = ""; storeStatus = StoreStatus.InStoreEnd;
lastPosIdStatus = StoreStatus.InStoreEnd; StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack);
storeStatus = StoreStatus.InStoreEnd; InOutBackToP1(moveP.InOut_P1);
StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack); CloseDoorAndWait();
InOutBackToP1(moveP.InOut_P1);
CloseDoorAndWait();
}
} }
#endregion #endregion
...@@ -602,7 +597,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -602,7 +597,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库出错,当前状态,storeStatus=" + storeRunStatus); LogUtil.error(LOGGER, StoreName + logMsg+ "出错,当前storeStatus=" + storeRunStatus);
return false; return false;
} }
} }
...@@ -686,7 +681,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -686,7 +681,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_09_LocationCylinder_Down); StoreMove.NextMoveStep(StoreMoveStep.SO_09_LocationCylinder_Down);
OutStoreLog("出库:SO_09 定位气缸退回,定位气缸退回 "); OutStoreLog("出库:SO_09 定位气缸退回 ");
LocationDownAndWait(); LocationDownAndWait();
} }
} }
...@@ -700,37 +695,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -700,37 +695,32 @@ namespace OnlineStore.DeviceLibrary
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_11_PutTray); StoreMove.NextMoveStep(StoreMoveStep.SO_11_PutTray);
OutStoreLog("出库:SO_11_PutTray 放下料盘,升降轴下降到_OutLow_P8,压紧轴放松"); OutStoreLog("出库:SO_11_PutTray 放下料盘,升降轴到P8(出库低点),压紧轴至P3(压紧前点)");
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3); ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed);
} }
else else
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) StoreMove.NextMoveStep(StoreMoveStep.SO_21_OpenDoor);
{ OutStoreLog("出库:SO_21打开仓门,压紧轴至P3(压紧前点),定位气缸下降");
StoreMove.NextMoveStep(StoreMoveStep.SO_21_OpenDoor); ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3);
OutStoreLog("出库:SO_21打开仓门,压紧轴放松,,定位气缸下降"); OpenDoorAndWait();
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3); LocationDownAndWait();
OpenDoorAndWait();
LocationDownAndWait();
}
} }
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_21_OpenDoor) else if (StoreMove.MoveStep == StoreMoveStep.SO_21_OpenDoor)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_22_WaitTrayGo); StoreMove.NextMoveStep(StoreMoveStep.SO_22_WaitTrayGo);
OutStoreLog("出库:SO_22等待操作人员拿走料盘 "); OutStoreLog("出库:SO_22 等待操作人员拿走料盘 ");
StoreMove.TimeOutSeconds = 120;
AutomaticBaiting.IsWaitTragGo = true; AutomaticBaiting.IsWaitTragGo = true;
AutomaticBaiting.IsGetTrayGo = false; AutomaticBaiting.IsGetTrayGo = false;
StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray()); StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray());
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_22_WaitTrayGo)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_22_WaitTrayGo))
{ {
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) SO_13_InoutBack();
{ CloseDoorAndWait();
SO_13_InoutBack();
CloseDoorAndWait();
}
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_11_PutTray) else if (StoreMove.MoveStep == StoreMoveStep.SO_11_PutTray)
{ {
...@@ -740,20 +730,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -740,20 +730,20 @@ namespace OnlineStore.DeviceLibrary
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
LogUtil.info(LOGGER, StoreName + " 【" + posId + "】 整个出库流程结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】!"); LogUtil.info(LOGGER, StoreName + " 【" + posId + "】 出库结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】!");
StoreMove.EndMove(); StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
InOutEndProcess(StoreMoveType.OutStore); InOutEndProcess(StoreMoveType.OutStore);
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + " 出库处理,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!"); LogUtil.error(LOGGER, StoreName + " 出库 moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!");
} }
} }
private void SO_02_DeviceBack() private void SO_02_DeviceBack()
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack); StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack);
OutStoreLog("出库:SO_02 叉子先运动到P1 , 开始"); OutStoreLog("出库:SO_02 叉子运动到P1 ");
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1); InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
...@@ -762,7 +752,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -762,7 +752,7 @@ namespace OnlineStore.DeviceLibrary
{ {
StoreMove.TimeOutSeconds = 120; StoreMove.TimeOutSeconds = 120;
ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed); ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_02 批量上下料轴到P1点【"+Config.BatchAxis_P1+"】 "); OutStoreLog("出库:SO_02 批量上下料轴到P1点【"+Config.BatchAxis_P1+"】 ");
} }
} }
} }
...@@ -809,7 +799,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -809,7 +799,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition); StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
OutStoreLog("出库:SO_08 升降轴到出料高点OutHigh_P2,旋转轴至P1(待机点) "); OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点) ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
BatchAxisUpTrayHeight(); BatchAxisUpTrayHeight();
......
...@@ -213,16 +213,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -213,16 +213,8 @@ namespace OnlineStore.DeviceLibrary
{ {
AutoBaitingStatus = StoreRunStatus.Busy; AutoBaitingStatus = StoreRunStatus.Busy;
StoreMove.NewMove(StoreMoveType.InStore); StoreMove.NewMove(StoreMoveType.InStore);
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I00_MoveToUp); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I01_Wait);
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) LogUtil.info(Name + "启动入料");
{
LogUtil.error(Name + " 启动入料 ,已检测到料盘,轴不需要上升");
}
else
{
LogUtil.error(Name + " 启动入料 ,轴上升到检测到料盘");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
return true; return true;
} }
else else
...@@ -243,34 +235,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,34 +235,47 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I01_Wait))
if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I00_MoveToUp)) {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I02_MoveToUp);
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{
LogUtil.info(Name + " 入料 ,已检测到料盘,轴不需要上升");
}
else
{
LogUtil.info(Name + " 入料 ,轴上升到检测到料盘");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I02_MoveToUp))
{ {
IsNeedScanCode(); IsNeedScanCode();
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I01_ScanCode)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I03_ScanCode))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I02_SuckingDisc_Down); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I04_SuckingDisc_Down);
LogUtil.info(Name + "入料: 检测到料盘, 吸盘开始下降"); LogUtil.info(Name + "入料: 扫码结束,二维码【" + LastCode + "】 吸盘开始下降");
CylinderMove(IO_Type.SuckingDisc_Down, IO_Type.SuckingDisc_Up, true); CylinderMove(IO_Type.SuckingDisc_Down, IO_Type.SuckingDisc_Up, true);
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I02_SuckingDisc_Down)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I04_SuckingDisc_Down))
{ {
SuckingDiscWork(); SuckingDiscWork();
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I03_SuckingDisc_Work)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I05_SuckingDisc_Work))
{ {
if (KND.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I04_SuckingDisc_Up); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I06_SuckingDisc_Up);
LogUtil.info(Name + "入料: 吸盘上升,等待宽度到达"+StoreManager.Config.Default_TrayWidth); LogUtil.info(Name + "入料: 吸盘上升,等待宽度到达" + StoreManager.Config.Default_TrayWidth);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, true); CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, true);
if (StoreManager.Config.Default_TrayWidth.Equals(7)) if (StoreManager.Config.Default_TrayWidth.Equals(7))
{ {
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck1, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck1, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck2, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck2, IO_VALUE.LOW));
}else if (StoreManager.Config.Default_TrayWidth.Equals(13)) }
{ else if (StoreManager.Config.Default_TrayWidth.Equals(13))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck1, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck1, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck2, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck2, IO_VALUE.HIGH));
} }
...@@ -285,13 +290,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -285,13 +290,14 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = "吸盘已经尝试三次,仍然吸不到物料!"; WarnMsg = "吸盘已经尝试三次,仍然吸不到物料!";
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore); StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore);
} }
}else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I04_SuckingDisc_Up)) }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I05_BatchAxisUp); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量上下料轴上升"); LogUtil.info(Name + "入料: 批量上下料轴上升");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed); ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I05_BatchAxisUp)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I07_BatchAxisUp))
{ {
if (StoreManager.Store.CanStarInOut()) if (StoreManager.Store.CanStarInOut())
{ {
...@@ -304,26 +310,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -304,26 +310,25 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I06_GetPosId); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I08_GetPosId);
//计算高度 //计算高度
EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue()); EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue());
LastHeight = Math.Abs(EndMovePosition - StartMovePosition) / AxisChangeValue; LastHeight = Math.Abs(EndMovePosition - StartMovePosition) / AxisChangeValue;
LogUtil.info(Name + "入料: 计算高度:上升前位置【" + StartMovePosition + "】实时位置【" + EndMovePosition + "】,计算后高度【" + LastHeight + "】"); LogUtil.info(Name + "入料: 计算高度:上升前位置【" + StartMovePosition + "】实时位置【" + EndMovePosition + "】,计算后高度【" + LastHeight + "】");
LastSize = StoreManager.Config.Default_TrayWidth; LastSize = StoreManager.Config.Default_TrayWidth;
LogUtil.info(Name + "入料: 从服务器获取入库PosId,尺寸:【" + LastSize + "*" + LastHeight + "】二维码【" + LastCode + "】"); LogUtil.info(Name + "入料: 从服务器获取入库PosId,尺寸:【" + LastSize + "*" + LastHeight + "】二维码【" + LastCode + "】");
GetInStorePosId(ProcessMsg()); GetInStorePosId(ProcessMsg());
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
StoreMove.OneWaitCanEndStep = true;
} }
} }
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_GetPosId)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I08_GetPosId))
{ {
//判断是否开始入库 //判断是否开始入库
if (StoreManager.Store.StoreMove.MoveType.Equals(StoreMoveType.InStore) || (!LastPosId.Equals(""))) if (StoreManager.Store.StoreMove.MoveType.Equals(StoreMoveType.InStore) || (!LastPosId.Equals("")))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_WaitTrayLeave); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I09_WaitTrayLeave);
LogUtil.info(Name + "入料: 开始入料【" + LastPosId + "】,等待料盘拿走"); LogUtil.info(Name + "入料: 开始入料【" + LastPosId + "】,等待料盘拿走");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW));
} }
...@@ -335,7 +340,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -335,7 +340,7 @@ namespace OnlineStore.DeviceLibrary
StoreManager.Store.StartInStoreMove(new InOutStoreParam("", posId), true, false); StoreManager.Store.StartInStoreMove(new InOutStoreParam("", posId), true, false);
} }
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I07_WaitTrayLeave)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I09_WaitTrayLeave))
{ {
if (StoreManager.Store.StoreMove.MoveStep >= StoreMoveStep.SI_07_DeviceBackFromDoor) if (StoreManager.Store.StoreMove.MoveStep >= StoreMoveStep.SI_07_DeviceBackFromDoor)
{ {
...@@ -348,7 +353,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -348,7 +353,14 @@ namespace OnlineStore.DeviceLibrary
{ {
IsNeedScanCode(); IsNeedScanCode();
} }
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I11_BatchAxisHome))
{
//TODO
LogUtil.info(Name + "入料:已经没有料盘,批量上料结束");
StoreMove.EndMove();
AutoBaitingStatus = StoreRunStatus.Runing;
}
else else
{ {
LogUtil.error(Name + "未找到步骤:" + StoreMove.MoveType); LogUtil.error(Name + "未找到步骤:" + StoreMove.MoveType);
...@@ -357,7 +369,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -357,7 +369,7 @@ namespace OnlineStore.DeviceLibrary
private static void SuckingDiscWork() private static void SuckingDiscWork()
{ {
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW); KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I03_SuckingDisc_Work); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I05_SuckingDisc_Work);
SuckingDisc_WorkCount++; SuckingDisc_WorkCount++;
LogUtil.info(Name + "入料: 吸盘开始第" + SuckingDisc_WorkCount + "次工作"); LogUtil.info(Name + "入料: 吸盘开始第" + SuckingDisc_WorkCount + "次工作");
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH); KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH);
...@@ -375,19 +387,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -375,19 +387,19 @@ namespace OnlineStore.DeviceLibrary
// if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0)) // if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I01_ScanCode); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I03_ScanCode);
LogUtil.info(Name + "入料: 开始扫码 "); LogUtil.info(Name + "入料: 开始扫码,最多等待两秒钟 ");
StoreMove.OneWaitCanEndStep = true;
StoreMove.WaitList.Add(WaitResultInfo.WaitCodeOK()); StoreMove.WaitList.Add(WaitResultInfo.WaitCodeOK());
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
GetCameraCode(); GetCameraCode();
StoreMove.OneWaitCanEndStep = true;
} }
else else
{ {
//TODO StoreMove.NextMoveStep(StoreMoveStep.AUTO_I11_BatchAxisHome);
LogUtil.info(Name + "入料:已经没有料盘,入料结束"); LogUtil.info(Name + "入料:已经没有料盘,批量上下轴回原点");
StoreMove.EndMove(); StoreMove.TimeOutSeconds = 120;
AutoBaitingStatus = StoreRunStatus.Runing; ACAxisHomeMove(StoreManager.Config.Batch_Axis);
} }
} }
......
...@@ -72,87 +72,88 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,87 +72,88 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndStepWait(); StoreMove.EndStepWait();
return; return;
} }
try { try
//当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - StoreMove.LastSetpTime;
string NotOkMsg = "";
bool isOk = !StoreMove.OneWaitCanEndStep;
foreach (WaitResultInfo wait in list)
{ {
if (wait.IsEnd) //当等待超过一分钟时,需要打印提示
{ TimeSpan span = DateTime.Now - StoreMove.LastSetpTime;
continue; string NotOkMsg = "";
} bool isOk = !StoreMove.OneWaitCanEndStep;
NotOkMsg = wait.ToStr(); foreach (WaitResultInfo wait in list)
if (wait.WaitType == (int)Wait_Type.AxisMove_1)
{ {
wait.IsEnd = AxisMoveISEnd(wait); if (wait.IsEnd)
} {
else if (wait.WaitType == (int)Wait_Type.IOMove_2) continue;
{ }
wait.IsEnd = KND.IOValue(wait.IoType).Equals(wait.IoValue); NotOkMsg = wait.ToStr();
int timeOutMs = StoreManager.Config.IOSingle_TimerOut; if (wait.WaitType == (int)Wait_Type.AxisMove_1)
{
wait.IsEnd = AxisMoveISEnd(wait);
}
else if (wait.WaitType == (int)Wait_Type.IOMove_2)
{
wait.IsEnd = KND.IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = StoreManager.Config.IOSingle_TimerOut;
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs) if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{
ConfigIO io = StoreManager.Config.getWaitIO(wait.IoType);
WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(WarnMsg);
isOk = false;
break;
}
}
else if (wait.WaitType == (int)Wait_Type.Time_3)
{ {
ConfigIO io = StoreManager.Config.getWaitIO(wait.IoType); wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(WarnMsg);
isOk = false;
break;
} }
} else if (wait.WaitType == (int)Wait_Type.ShuoKe_5)
else if (wait.WaitType == (int)Wait_Type.Time_3)
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType == (int)Wait_Type.ShuoKe_5)
{
}
else if (wait.WaitType == (int)Wait_Type.AxisHomeSingle_6)
{
IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
wait.IsEnd = wait.IoValue.Equals(value);
}
//else if (wait.WaitType == (int)Wait_Type.WaitHeight_7)
//{
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitNegativeSingle_8)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitPositiveSingle_9)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitPositiveSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
else if (wait.WaitType == (int)Wait_Type.BatchAxisMove_10)
{
wait.IsEnd = BatchAxisIsEnd(wait);
}
else if (wait.WaitType == (int)Wait_Type.ScanCode_11)
{
wait.IsEnd = !String.IsNullOrEmpty(LastCode);
}
if (wait.IsEnd)
{
if (StoreMove.OneWaitCanEndStep)
{ {
isOk = true;
break;
} }
} else if (wait.WaitType == (int)Wait_Type.AxisHomeSingle_6)
else
{
if (!StoreMove.OneWaitCanEndStep)
{ {
isOk = false; IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
break; wait.IsEnd = wait.IoValue.Equals(value);
}
//else if (wait.WaitType == (int)Wait_Type.WaitHeight_7)
//{
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitNegativeSingle_8)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitPositiveSingle_9)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitPositiveSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
else if (wait.WaitType == (int)Wait_Type.BatchAxisMove_10)
{
wait.IsEnd = BatchAxisIsEnd(wait);
}
else if (wait.WaitType == (int)Wait_Type.ScanCode_11)
{
wait.IsEnd = (LastCode.Equals("").Equals(false));
}
if (wait.IsEnd)
{
if (StoreMove.OneWaitCanEndStep)
{
isOk = true;
break;
}
}
else
{
if (!StoreMove.OneWaitCanEndStep)
{
isOk = false;
break;
}
} }
} }
}
if (isOk) if (isOk)
{ {
StoreMove.EndStepWait(); StoreMove.EndStepWait();
...@@ -161,7 +162,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -161,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
{ {
WarnMsg = Name + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg WarnMsg = Name + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg
+ "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, "", WarnMsg, StoreMove.MoveType); StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, "", WarnMsg, StoreMove.MoveType);
} }
} }
...@@ -291,12 +292,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -291,12 +292,11 @@ namespace OnlineStore.DeviceLibrary
if (LastCode.Equals("")) if (LastCode.Equals(""))
{ {
LastCode = "NoCode"; LastCode = "NoCode";
LogUtil.info(Name + "未扫到二维码,默认为NoCode"); LogUtil.info(Name + "模拟二维码:NoCode");
} }
if (LastCode.Equals("")) if (LastCode.Equals(""))
{ {
LogUtil.error("未扫到二维码,请拿走料盘"); LogUtil.error("未扫到二维码,需要将料盘送出");
WarnMsg = "未扫到二维码,请拿走料盘";
} }
else else
{ {
...@@ -353,7 +353,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -353,7 +353,7 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.Store.IsDebug) if (StoreManager.Store.IsDebug)
{ {
string posId = "1#AC1_1_1_4"; string posId = "1#AC1_1_1_4";
LogUtil.info(Name + "调试模式,不需要连接服务器,直接模拟库位号【" + posId + "】"); LogUtil.info(Name + "调试模式,模拟库位号【" + posId + "】");
string plateH = "8"; string plateH = "8";
string plateW = "7"; string plateW = "7";
if (StoreManager.Store.CanStarInOut()) if (StoreManager.Store.CanStarInOut())
......
...@@ -407,73 +407,58 @@ namespace OnlineStore.DeviceLibrary ...@@ -407,73 +407,58 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 自动上下料上料功能 #region 自动上下料上料功能
/// <summary>
/// 开始自动上料
/// </summary>
AUTO_I01_Wait=1201,
/// <summary> /// <summary>
/// 先上升到料盘检测1(上料机构)信号亮 /// 先上升到料盘检测1(上料机构)信号亮
/// </summary> /// </summary>
AUTO_I00_MoveToUp=1200, AUTO_I02_MoveToUp=1202,
/// <summary> /// <summary>
/// 扫码 /// 扫码
/// </summary> /// </summary>
AUTO_I01_ScanCode=1201, AUTO_I03_ScanCode=1203,
/// <summary> /// <summary>
/// 吸盘下降 /// 吸盘下降
/// </summary> /// </summary>
AUTO_I02_SuckingDisc_Down=1202, AUTO_I04_SuckingDisc_Down=1204,
/// <summary> /// <summary>
/// 吸盘吸料盘 /// 吸盘吸料盘
/// </summary> /// </summary>
AUTO_I03_SuckingDisc_Work=1203, AUTO_I05_SuckingDisc_Work=1205,
/// <summary> /// <summary>
/// 吸盘上升 , /// 吸盘上升 ,
/// </summary> /// </summary>
AUTO_I04_SuckingDisc_Up=1204, AUTO_I06_SuckingDisc_Up=1206,
/// <summary> /// <summary>
/// 批量上下料料轴上升 /// 批量上下料料轴上升
/// </summary> /// </summary>
AUTO_I05_BatchAxisUp=1205, AUTO_I07_BatchAxisUp=1207,
/// <summary> /// <summary>
/// 从服务器获取PosID /// 从服务器获取PosID
/// </summary> /// </summary>
AUTO_I06_GetPosId=1206, AUTO_I08_GetPosId=1208,
/// <summary> /// <summary>
/// 等待料盘被叉子拿走 /// 等待料盘被叉子拿走
/// </summary> /// </summary>
AUTO_I07_WaitTrayLeave=1207, AUTO_I09_WaitTrayLeave=1209,
/// <summary> /// <summary>
/// 未扫到码:等待操作人员拿走料盘 /// 未扫到码:等待操作人员拿走料盘
/// </summary> /// </summary>
AUTO_I10_WaitTrayGo=1210, AUTO_I10_WaitTrayGo=1210,
///// <summary> /// <summary>
/////未扫到码: 把料盘放到叉子上 /// 批量上下轴开始回原点
///// </summary> /// </summary>
//AUTO_I11_PutTrayToInout, AUTO_I11_BatchAxisHome=1211,
///// <summary>
///// 未扫到码:叉子进入门槛
///// </summary>
//AUTO_I12_InoutToDoor,
///// <summary>
///// 未扫到码:把料盘放到门口
///// </summary>
//AUTO_I13_PutTrayToDoor,
///// <summary>
///// 未扫到码:等待拿走料盘
///// </summary>
//AUTO_I14_WaitTakeTray,
///// <summary>
///// 未扫到码:料盘已手动拿走,需要等一秒钟后关闭仓门
///// </summary>
//AUTO_I15_TrayLeaveWaitTime,
///// <summary>
///// 未扫到码:关闭仓门
///// </summary>
//AUTO_I16_CloseDoor,
#endregion #endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!