Commit e6b574fc LN

自动出入库bug修改

1 个父辈 0ee241e8
...@@ -11,7 +11,7 @@ PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,307200,,,,,,,,,,,, ...@@ -11,7 +11,7 @@ PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,307200,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,1000,,,,,,,,,,,, PRO,,R3_进出轴_P1待机点,InOutAxis_P1,1000,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,140000,,,,,,,,,,,, PRO,,R4_压紧轴_P1待机点,CompAxis_P1,140000,,,,,,,,,,,,
PRO,,R4_压紧轴_P3压紧前点,CompAxis_P3,180000,,,,,,,,,,,, PRO,,R4_压紧轴_P3压紧前点,CompAxis_P3,180000,,,,,,,,,,,,
PRO,,R4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=385001;12=383001;16=379001;,,,,,,,,,,,, PRO,,R4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=201264;12=383001;16=379001;,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,1000000,,,,,,,,,,,, PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,1000000,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,1023000,,,,,,,,,,,, PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,1023000,,,,,,,,,,,,
......
...@@ -438,6 +438,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,6 +438,16 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SO_10_GoBack)) else if (MoveInfo.IsStep(StoreMoveStep.SO_10_GoBack))
{ {
if (AutoInout.autoNext)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_WaitTrayGo);
InOutStoreLog(outType + "自动出入库,等待提升机构拿走料盘 或等待1000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.InDoor_Check, IO_VALUE.LOW));
MoveInfo.OneWaitCanEndStep = true;
}
else
{
if (StoreManager.Store.MoveInfo.MoveType.Equals(MoveType.OutStore) && StoreManager.Store.MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut)) if (StoreManager.Store.MoveInfo.MoveType.Equals(MoveType.OutStore) && StoreManager.Store.MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut))
{ {
bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam); bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam);
...@@ -465,6 +475,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -465,6 +475,7 @@ namespace OnlineStore.DeviceLibrary
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
}
else if (MoveInfo.IsStep(StoreMoveStep.SO_11_WaitTrayGo)) else if (MoveInfo.IsStep(StoreMoveStep.SO_11_WaitTrayGo))
{ {
TimeSpan span = DateTime.Now - startOutStoreTime; TimeSpan span = DateTime.Now - startOutStoreTime;
......
...@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (storeMoveType.Equals(MoveType.InStore)) if (storeMoveType.Equals(MoveType.InStore))
{ {
int newIndex = positionIndex - 1; int newIndex = positionIndex;
if (newIndex < 0) if (newIndex < 0)
{ {
if (startIndex >= 0 && startIndex < boxBean.PositionNumList.Count) if (startIndex >= 0 && startIndex < boxBean.PositionNumList.Count)
...@@ -68,14 +68,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -68,14 +68,13 @@ namespace OnlineStore.DeviceLibrary
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
boxBean.LogInfo("下一个索引不存在,自动 出入库结束!"); boxBean.LogInfo("下一个索引不存在,自动 出入库结束!");
return;
} }
} }
else
{
positionIndex = newIndex; positionIndex = newIndex;
string posid = boxBean.PositionNumList[positionIndex]; string posid = boxBean.PositionNumList[positionIndex];
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid,1); InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid, 1);
//判断是否需要重置 //判断是否需要重置
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount) if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{ {
...@@ -91,7 +90,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -91,7 +90,6 @@ namespace OnlineStore.DeviceLibrary
boxBean.StartOutStoreMove(param); boxBean.StartOutStoreMove(param);
} }
} }
}
else if (storeMoveType.Equals(MoveType.OutStore)) else if (storeMoveType.Equals(MoveType.OutStore))
{ {
int newIndex = positionIndex - Jiange; int newIndex = positionIndex - Jiange;
...@@ -107,30 +105,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,30 +105,18 @@ namespace OnlineStore.DeviceLibrary
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
boxBean.LogInfo("下一个索引不存在,自动 出入库结束!"); boxBean.LogInfo("下一个索引不存在,自动 出入库结束!");
return;
} }
} }
else positionIndex = newIndex;
{ string posid = boxBean.PositionNumList[positionIndex];
string posid = boxBean.PositionNumList[newIndex];
InOutParam param = new InOutParam(MoveType.InStore, "AutoIn", posid); InOutParam param = new InOutParam(MoveType.InStore, "AutoIn", posid);
// param.NeedOutShelf = false;
//判断是否需要重置
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{
boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
boxBean.Reset(false);
autoMsg = "自动入库:" + posid;
boxBean.waitOutStoreList.Enqueue(param);
}
else
{
boxBean.LogInfo("自动进入下一个入库:posid=" + posid); boxBean.LogInfo("自动进入下一个入库:posid=" + posid);
autoMsg = "自动入库:" + posid; autoMsg = "自动入库:" + posid;
boxBean.StartInStoreMove(param); boxBean.StartInStoreMove(param);
} }
} }
}
}
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(boxBean.Name + "InOutEndProcess ERROR:" + ex.ToString()); LogUtil.error(boxBean.Name + "InOutEndProcess ERROR:" + ex.ToString());
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!