Commit 24693584 LN

出料线托盘分配修改

1 个父辈 92a6ffc0
...@@ -328,7 +328,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -328,7 +328,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
internal bool UpdateTrayNum() internal bool UpdateTrayNum()
{ {
trayCount++; trayCount++;
...@@ -338,18 +338,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -338,18 +338,15 @@ namespace OnlineStore.DeviceLibrary
if (String.IsNullOrEmpty(RFIDIP)) { } if (String.IsNullOrEmpty(RFIDIP)) { }
else else
{ {
LogUtil.LOGGER.Info(Name + " [" + trayCount + "] IP [" + RFIDManager.GetRFIP(DeviceID) + "] [" + preTrayNum + "] 当前托盘 [" + currTrayNum + "]"); LogUtil.LOGGER.Info(Name + " [" + trayCount + "] IP [" + RFIDManager.GetRFIP(DeviceID) + "] 当前托盘 [" + currTrayNum + "] 上个托盘 [" + preTrayNum + "] ");
if (preTrayNum.Equals(currTrayNum) && currTrayNum > 0) if (preTrayNum.Equals(currTrayNum) && currTrayNum > 0)
{ {
TrayManager.TrayErrorMsg = DateTime.Now.ToLongTimeString() + " " + Name + "托盘号出现错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样"; TrayManager.TrayErrorMsg = DateTime.Now.ToLongTimeString() + " " + Name + "托盘号错乱:当前托盘 [" + currTrayNum + "] 上个托盘[" + preTrayNum + "] ,连续两个托盘号一样";
LogUtil.error(Name + "托盘号错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样");
LogUtil.error(Name + "托盘号错乱:当前托盘 [" + currTrayNum + "] 上个托盘[" + preTrayNum + "] ,连续两个托盘号一样");
} }
} }
//else if (!TrayManager.CheckIsRightNum(currTrayNum, preTrayNum))
//{
// TrayManager.TrayErrorMsg = DateTime.Now.ToLongTimeString() + " " + Name + "托盘号出现错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],托盘号不连续";
// LogUtil.error(Name + "托盘号错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],托盘号不连续");
//}
return true; return true;
} }
internal void ClearTrayRFID() internal void ClearTrayRFID()
......
...@@ -325,6 +325,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,6 +325,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.HY04_WaitTime); MoveInfo.NextMoveStep(LineMoveStep.HY04_WaitTime);
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号"); CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(800));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
} }
else else
...@@ -734,12 +735,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -734,12 +735,7 @@ namespace OnlineStore.DeviceLibrary
HY_StopCylinderDown(MoveInfo); HY_StopCylinderDown(MoveInfo);
OL_StopCylinderUp(MoveInfo); OL_StopCylinderUp(MoveInfo);
} }
/// <summary>
/// 判断托盘是否需要横移
/// </summary>
/// <param name="trayNum"></param>
/// <returns>true=需要横移,false=不需要横移</returns>
private bool TrayNeedHY(int trayNum) private bool TrayNeedHY(int trayNum)
{ {
try try
...@@ -847,12 +843,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -847,12 +843,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
private int PreIsToOutCount = 0; private int PreIsToOutCount = 0;
/// <summary>
/// 判断托盘是否需要到出料线
/// </summary>
/// <param name="trayNum"></param>
/// <returns>true=需要 ,false=不需要 </returns>
private bool TrayNeedToOutLine(int trayNum) private bool TrayNeedToOutLine(int trayNum)
{ {
try try
...@@ -997,12 +988,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -997,12 +988,26 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else else
{ {
if (DeviceID.Equals(216) || DeviceID.Equals(213)) if (DeviceID.Equals(216))
{
if (LastValue.Equals(2))
{
LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr());
LastValue = 0;
MoveInfo.MoveParam = param;
return true;
}
else
{
LastValue++;
}
}
else if (DeviceID.Equals(213))
{ {
if (LastValue.Equals(0) ) if (LastValue.Equals(0))
{ {
LogInfo(" C1->出料线:工单料,随意放"+ LastValue+"," + "" + param.ToStr()); LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr());
LastValue++; LastValue++;
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
return true; return true;
......
...@@ -501,10 +501,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -501,10 +501,10 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH; IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH;
if (IOValue(IoType).Equals(tValue).Equals(false)) if (IOValue(IoType).Equals(tValue).Equals(false))
{ {
if (IoType.Equals(IO_Type.StopDown1).Equals(false) ) if (IoType.Equals(IO_Type.StopDown1).Equals(false))
//if (IoType.Equals(IO_Type.StopDown1).Equals(false)&&IoType.Equals(IO_Type.SW_StopDown).Equals(false)) //if (IoType.Equals(IO_Type.StopDown1).Equals(false)&&IoType.Equals(IO_Type.SW_StopDown).Equals(false))
{ {
LogUtil.info(Name + "定时回写IO: [" + IoType + "]=[" + value + "],[" + baseConfig.Id + "],msTime=" + msTime); LogUtil.debug(Name + "定时回写IO: [" + IoType + "]=[" + value + "],[" + baseConfig.Id + "],msTime=" + msTime);
} }
} }
IOManager.IOMove(IoType, tValue, baseConfig.Id); IOManager.IOMove(IoType, tValue, baseConfig.Id);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!