Commit 22a5f8c7 LN

还原托盘逻辑优化:自动结束托盘检测处理。

1 个父辈 b964cbbc
此文件类型无法预览
...@@ -207,8 +207,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,8 +207,8 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
CheckLog("托盘检测:" + SecondMoveInfo.SLog + "阻挡1上升,等待FL_TrayCheck=1 ,最多等待30秒"); CheckLog("托盘检测:" + SecondMoveInfo.SLog + "阻挡1上升,等待FL_TrayCheck=1 ,最多等待30秒");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
SecondMoveInfo.OneWaitCanEndStep = true; //SecondMoveInfo.OneWaitCanEndStep = true;
} }
else else
{ {
...@@ -217,8 +217,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -217,8 +217,8 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
LogUtil.debug(Name + "托盘阻挡:" + SecondMoveInfo.SLog + "阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待SW_TrayCheck=1),最多等待30秒"); LogUtil.debug(Name + "托盘阻挡:" + SecondMoveInfo.SLog + "阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待SW_TrayCheck=1),最多等待30秒");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
SecondMoveInfo.OneWaitCanEndStep = true; //SecondMoveInfo.OneWaitCanEndStep = true;
} }
} }
...@@ -237,24 +237,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -237,24 +237,24 @@ namespace OnlineStore.DeviceLibrary
//} //}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down))
{ {
if (Config.SidesWayNum <= 0) //if (Config.SidesWayNum <= 0)
{ //{
if (IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.LOW)) // if (IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.LOW))
{ // {
CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 FL_TrayCheck=HIGH,结束处理"); // CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 FL_TrayCheck=HIGH,结束处理");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
return; // return;
} // }
} //}
else //else
{ //{
if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.LOW)) // if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.LOW))
{ // {
CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 SW_TrayCheck=HIGH,结束处理"); // CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 SW_TrayCheck=HIGH,结束处理");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
return; // return;
} // }
} //}
UpdateTrayNum(); UpdateTrayNum();
//出料中,需要拦盘 //出料中,需要拦盘
if (CurrTrayIsNeed(currTrayNum, true)) if (CurrTrayIsNeed(currTrayNum, true))
......
...@@ -862,7 +862,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -862,7 +862,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
} }
} }
else else
...@@ -912,9 +912,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -912,9 +912,9 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_StopDownWait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_StopDownWait);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 前阻挡检测消失后再等待300ms上升阻挡,最多等待5秒"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 前阻挡检测消失后再等待300ms上升阻挡,最多等待5秒");
SecondMoveInfo.OneWaitCanEndStep = true; //SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopDownWait)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopDownWait))
...@@ -923,19 +923,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -923,19 +923,19 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck))
{ {
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH)) //if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{ //{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
} //}
else //else
{ //{
//未检测到信号或阻挡下降失败,结束处理 // //未检测到信号或阻挡下降失败,结束处理
LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check2=HIGH,结束处理 "); // LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check2=HIGH,结束处理 ");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
} //}
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down))
{ {
...@@ -1157,8 +1157,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1157,8 +1157,8 @@ namespace OnlineStore.DeviceLibrary
} }
private void MIO_02_FixtureCheck() private void MIO_02_FixtureCheck()
{ {
if (IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW) || IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH)) //if (IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW) || IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{ //{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_FixtureCheck); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_FixtureCheck);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)");
...@@ -1166,19 +1166,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -1166,19 +1166,19 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.TimeOutSeconds = 20; SecondMoveInfo.TimeOutSeconds = 20;
} }
SecondMoveInfo.OneWaitCanEndStep = true; //SecondMoveInfo.OneWaitCanEndStep = true;
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
//最多等待30秒 //最多等待30秒
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
} //}
else //else
{ //{
//未检测到信号或阻挡下降失败,结束处理 // //未检测到信号或阻挡下降失败,结束处理
LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check1=LOW,或 StopCylinder_Check2=HIGH,结束处理 "); // LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check1=LOW,或 StopCylinder_Check2=HIGH,结束处理 ");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
} //}
} }
private void MO_16_Stop2Down() private void MO_16_Stop2Down()
{ {
......
...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
} }
} }
else else
...@@ -311,37 +311,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,37 +311,37 @@ namespace OnlineStore.DeviceLibrary
#region 托盘检测 #region 托盘检测
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_00_Stop1Down)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_00_Stop1Down))
{ {
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW)) //if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW))
{ //{
TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime; TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime;
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
LogUtil.debug(Name + "托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待 阻挡2托盘检测=1),最多等待30秒"); LogUtil.debug(Name + "托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待 阻挡2托盘检测=1),最多等待30秒");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
} //}
else //else
{ //{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待StopCylinder_Check=HIGH 或 StopCylinder_Check1=LOW失败,结束处理"); // CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待StopCylinder_Check=HIGH 或 StopCylinder_Check1=LOW失败,结束处理");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
} //}
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down))
{ {
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待编码信号稳定StopCylinder_Check2=1,最多等待30秒"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待编码信号稳定StopCylinder_Check2=1,最多等待30秒");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
SecondMoveInfo.OneWaitCanEndStep = true; //SecondMoveInfo.OneWaitCanEndStep = true;
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait))
{ {
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.LOW)) //if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.LOW))
{ //{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待 StopCylinder_Check=HIGH 失败,结束处理"); // CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待 StopCylinder_Check=HIGH 失败,结束处理");
SecondMoveInfo.EndMove(); // SecondMoveInfo.EndMove();
return; // return;
} //}
UpdateTrayNum(); UpdateTrayNum();
if (Config.SidesWayNum.Equals(4)) if (Config.SidesWayNum.Equals(4))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!