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,,,,,,,,,,,,
......
...@@ -437,33 +437,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -437,33 +437,44 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_10_GoBack)) else if (MoveInfo.IsStep(StoreMoveStep.SO_10_GoBack))
{ {
if (StoreManager.Store.MoveInfo.MoveType.Equals(MoveType.OutStore) && StoreManager.Store.MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut)) if (AutoInout.autoNext)
{ {
bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam); MoveInfo.NextMoveStep(StoreMoveStep.SO_11_WaitTrayGo);
if (result) 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))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_WaitTrayGo); bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam);
InOutStoreLog(outType + "等待提升机构拿走料盘 "); if (result)
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); {
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.InDoor_Check, IO_VALUE.LOW)); MoveInfo.NextMoveStep(StoreMoveStep.SO_11_WaitTrayGo);
InOutStoreLog(outType + "等待提升机构拿走料盘 ");
ClearTimeoutAlarm("提升机构夹爪开始取料"); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
ClearTimeoutAlarm("提升机构夹爪可以取料"); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.InDoor_Check, IO_VALUE.LOW));
ClearTimeoutAlarm("提升机构夹爪开始取料");
ClearTimeoutAlarm("提升机构夹爪可以取料");
}
else if (MoveInfo.IsTimeOut(60))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构夹爪开始取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut);
}
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构夹爪开始取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构夹爪可以取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, ID * 1000 + 30); LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
else if (MoveInfo.IsTimeOut(60))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构夹爪可以取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut);
}
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_11_WaitTrayGo)) else if (MoveInfo.IsStep(StoreMoveStep.SO_11_WaitTrayGo))
{ {
......
...@@ -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,28 +68,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -68,28 +68,26 @@ namespace OnlineStore.DeviceLibrary
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
boxBean.LogInfo("下一个索引不存在,自动 出入库结束!"); boxBean.LogInfo("下一个索引不存在,自动 出入库结束!");
return;
} }
} }
positionIndex = newIndex;
string posid = boxBean.PositionNumList[positionIndex];
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid, 1);
//判断是否需要重置
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{
boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
boxBean.Reset(false);
autoMsg = "自动出库:" + posid;
boxBean.waitOutStoreList.Enqueue(param);
}
else else
{ {
positionIndex = newIndex; boxBean.LogInfo("自动进入下一个出库:posid=" + posid);
string posid = boxBean.PositionNumList[positionIndex]; autoMsg = "自动出库:" + posid;
boxBean.StartOutStoreMove(param);
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid,1);
//判断是否需要重置
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);
autoMsg = "自动出库:" + posid;
boxBean.StartOutStoreMove(param);
}
} }
} }
else if (storeMoveType.Equals(MoveType.OutStore)) else if (storeMoveType.Equals(MoveType.OutStore))
...@@ -107,28 +105,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,28 +105,16 @@ 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; boxBean.LogInfo("自动进入下一个入库:posid=" + posid);
//判断是否需要重置 autoMsg = "自动入库:" + posid;
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount) boxBean.StartInStoreMove(param);
{
boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
boxBean.Reset(false);
autoMsg = "自动入库:" + posid;
boxBean.waitOutStoreList.Enqueue(param);
}
else
{
boxBean.LogInfo("自动进入下一个入库:posid=" + posid);
autoMsg = "自动入库:" + posid;
boxBean.StartInStoreMove(param);
}
}
} }
} }
catch (Exception ex) catch (Exception ex)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!