Commit 60990f11 LN

入料3和进仓10需要空托盘时才放空托盘过去,其他直接横移

1 个父辈 a991502d
...@@ -1560,6 +1560,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -1560,6 +1560,32 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
internal bool WaitEmptyTray()
{
try
{
if (IsDebug && runStatus <= LineRunStatus.Wait)
{
return false;
}
if (Config.IsCanOut.Equals(0))
{
if (runStatus.Equals(LineRunStatus.Busy) && MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
//入料执行中, 且需要空托盘
if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_WaitTray) && MoveInfo.IsInWait.Equals(false))
{
return true;
}
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + "WaitEmptyTray 出错:", ex);
}
return false;
}
private bool NeedEmptyTrayGo() private bool NeedEmptyTrayGo()
{ {
......
...@@ -189,6 +189,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,6 +189,8 @@ namespace OnlineStore.DeviceLibrary
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(checkWaitInfo.Name + " [" + checkWaitInfo.MoveStep + "] CheckWait 出错:", ex); LogUtil.error(checkWaitInfo.Name + " [" + checkWaitInfo.MoveStep + "] CheckWait 出错:", ex);
//如果是空指针异常,并且MoveStep=SW06_TopCylinderUp,单独处理
} }
} }
#endregion #endregion
......
...@@ -321,39 +321,60 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,39 +321,60 @@ namespace OnlineStore.DeviceLibrary
Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt_Check1_Front, IO_VALUE.LOW)); Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt_Check1_Front, IO_VALUE.LOW));
Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt_Check2_Middle, IO_VALUE.LOW)); Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt_Check2_Middle, IO_VALUE.LOW));
} }
private bool TrayNeedShunt(int trayNum, out string outMsg) private bool TrayNeedShunt(int trayNum, out string outMsg)
{ {
outMsg = ""; outMsg = "";
int lineNum = DeviceID % 100; try
TrayInfo trayInfo = TrayManager.GetTrayInfo(trayNum);
if (!trayInfo.IsFull)
{
return false;
}
if (trayInfo.IsFull)
{ {
InOutParam inoup = trayInfo.InoutPar; int lineNum = DeviceID % 100;
if (trayInfo.InOrOutStore.Equals(ReelType.InStore)) TrayInfo trayInfo = TrayManager.GetTrayInfo(trayNum);
//if (!trayInfo.IsFull)
//{
// return false;
//}
if (trayInfo.IsFull)
{ {
if (inoup.InStoreNg) InOutParam inoup = trayInfo.InoutPar;
if (trayInfo.InOrOutStore.Equals(ReelType.InStore))
{ {
outMsg = "入料NG料"; if (inoup.InStoreNg)
return true; {
outMsg = "入料NG料";
return true;
}
else if (inoup.GetStoreId().Equals(10).Equals(false))
{
outMsg = "非10号仓入库";
return true;
}
} }
else if (inoup.GetStoreId().Equals(10).Equals(false)) else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false))
{ {
outMsg = "非10号仓入库"; outMsg = "皮带线出料";
return true; return true;
} }
} }
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false)) else
{ {
outMsg = "皮带线出料"; MoveEquip moveEquip10 = LineManager.Line.MoveEquipMap[10];
if (moveEquip10.IsWaitEmptyTray())
{
return false;
}
FeedingEquip feed3 = LineManager.Line.FeedingEquipMap[103];
if (feed3.WaitEmptyTray())
{
return false;
}
outMsg = "空托盘";
return true; return true;
} }
} }
catch (Exception ex)
{
LogUtil.error("TrayNeedShunt出错:" + ex.ToString());
}
return false; return false;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!