Commit 98708ae0 LN

分流横移2出和进仓05位置卡托盘修改。前阻挡问题修改。

1 个父辈 87825b3e
...@@ -159,7 +159,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -159,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCheck, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCheck, IO_VALUE.LOW));
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(TrayManager.StopDownWaitTime)); /// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
} }
} }
...@@ -205,16 +205,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -205,16 +205,21 @@ namespace OnlineStore.DeviceLibrary
if (Config.SidesWayNum <= 0) if (Config.SidesWayNum <= 0)
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
CheckLog("托盘检测:" + SecondMoveInfo.SLog + "阻挡1上升,等待FL_TrayCheck=1 "); 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.OneWaitCanEndStep = true;
} }
else else
{ {
TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime; TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime;
//去掉延迟 //去掉延迟
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
LogUtil.debug(Name + "托盘阻挡:" + SecondMoveInfo.SLog + "阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待SW_TrayCheck=1)"); 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.OneWaitCanEndStep = true;
} }
} }
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck)) //else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck))
...@@ -232,6 +237,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,6 +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 (IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.LOW))
{
CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 FL_TrayCheck=HIGH,结束处理");
SecondMoveInfo.EndMove();
return;
}
}
else
{
if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.LOW))
{
CheckLog("托盘检测: " + SecondMoveInfo.SLog + " 未等到信号 SW_TrayCheck=HIGH,结束处理");
SecondMoveInfo.EndMove();
return;
}
}
UpdateTrayNum(); UpdateTrayNum();
//出料中,需要拦盘 //出料中,需要拦盘
if (CurrTrayIsNeed(currTrayNum, true)) if (CurrTrayIsNeed(currTrayNum, true))
...@@ -457,10 +480,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -457,10 +480,10 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))
{ {
if (MoveInfo.MoveStep < LineMoveStep.FI_25_WaitTray) if (MoveInfo.MoveStep < LineMoveStep.FI_25_WaitTray)
{ {
if (SecondMoveInfo.IsTimeOut(15)) if (SecondMoveInfo.IsTimeOut(15))
{ {
string msg= SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待入库托盘超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; string msg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待入库托盘超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(msg + ",暂时放托盘离开"); LogUtil.error(msg + ",暂时放托盘离开");
TrayMoveOk(); TrayMoveOk();
} }
...@@ -472,7 +495,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -472,7 +495,7 @@ namespace OnlineStore.DeviceLibrary
if (StartTrayOut(SecondMoveInfo.MoveParam)) if (StartTrayOut(SecondMoveInfo.MoveParam))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_WaitOutEnd);
} }
//如果当前无料串,或者料串已离开,直接放行 托盘 //如果当前无料串,或者料串已离开,直接放行 托盘
else if (SecondMoveInfo.IsTimeOut(30)) else if (SecondMoveInfo.IsTimeOut(30))
{ {
...@@ -486,7 +509,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -486,7 +509,7 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待出库移栽超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; //WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待出库移栽超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
//LogUtil.error(WarnMsg, DeviceID * 1000 + 21); //LogUtil.error(WarnMsg, DeviceID * 1000 + 21);
//Alarm(LineAlarmType.IoSingleTimeOut); //Alarm(LineAlarmType.IoSingleTimeOut);
} }
} }
} }
private void TrayMoveOk(bool needCheck = false) private void TrayMoveOk(bool needCheck = false)
......
...@@ -269,6 +269,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -269,6 +269,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (Shunt_Updown2CanUp()) if (Shunt_Updown2CanUp())
{ {
ClearTimeoutAlarm("等待分流横移可以上升");
if (CylinderIsOk(IO_Type.Shunt_TopCylinder_Down1, IO_Type.Shunt_TopCylinder_Up1) && if (CylinderIsOk(IO_Type.Shunt_TopCylinder_Down1, IO_Type.Shunt_TopCylinder_Up1) &&
CylinderIsOk(IO_Type.Shunt_TopCylinder_Down2, IO_Type.Shunt_TopCylinder_Up2)) CylinderIsOk(IO_Type.Shunt_TopCylinder_Down2, IO_Type.Shunt_TopCylinder_Up2))
{ {
...@@ -285,7 +286,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -285,7 +286,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (Shunt_MoveInfo.IsTimeOut(120)) else if (Shunt_MoveInfo.IsTimeOut(120))
{ {
MoveTimeoutAlarm(Shunt_MoveInfo, "等待分流横移2可以上升"); MoveTimeoutAlarm(Shunt_MoveInfo, "等待分流横移可以上升");
//WarnMsg = Shunt_MoveInfo.Name + "[" + Shunt_MoveInfo.MoveType + "][" + Shunt_MoveInfo.SLog + "]等待分流横移2可以上升[" + Math.Round(Shunt_MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; //WarnMsg = Shunt_MoveInfo.Name + "[" + Shunt_MoveInfo.MoveType + "][" + Shunt_MoveInfo.SLog + "]等待分流横移2可以上升[" + Math.Round(Shunt_MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
//LogUtil.error(WarnMsg, DeviceID * 1000 + 12); //LogUtil.error(WarnMsg, DeviceID * 1000 + 12);
//Alarm(LineAlarmType.IoSingleTimeOut); //Alarm(LineAlarmType.IoSingleTimeOut);
......
...@@ -274,7 +274,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -274,7 +274,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
MoveEquip moveEquip = LineManager.Line.GetMoveByDId(5); MoveEquip moveEquip = LineManager.Line.GetMoveByDId(5);
if (moveEquip.IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.LOW)) if (!moveEquip.HasTray())
{ {
Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt04_Stop1Down); Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt04_Stop1Down);
LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,直接放行,Shunt2_StopDown1_Front 下降1200 "); LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,直接放行,Shunt2_StopDown1_Front 下降1200 ");
...@@ -284,25 +284,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -284,25 +284,33 @@ namespace OnlineStore.DeviceLibrary
{ {
Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt03_WaitStop1Down); Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt03_WaitStop1Down);
LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,等待进仓5处无托盘后放行托盘 "); LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,等待进仓5处无托盘后放行托盘 ");
IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 500); Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 500);
} }
} }
} }
else if (Shunt2_MoveInfo.MoveStep.Equals(LineMoveStep.Shunt03_WaitStop1Down)) else if (Shunt2_MoveInfo.MoveStep.Equals(LineMoveStep.Shunt03_WaitStop1Down))
{ {
MoveEquip moveEquip = LineManager.Line.GetMoveByDId(5); MoveEquip moveEquip = LineManager.Line.GetMoveByDId(5);
if (moveEquip.IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.LOW)) if (!moveEquip.HasTray())
{ {
ClearTimeoutAlarm("等待进仓5处无托盘");
Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt04_Stop1Down); Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt04_Stop1Down);
LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,放行托盘,Shunt2_StopDown1_Front 下降1200 "); LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,放行托盘,Shunt2_StopDown1_Front 下降1200 ");
IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 1200); IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 1200);
} }
else else if (Shunt2_MoveInfo.IsTimeOut(120))
{ {
Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt03_WaitStop1Down); MoveTimeoutAlarm(Shunt2_MoveInfo, "等待进仓5处无托盘");
LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,等待进仓5处无托盘后放行托盘 ");
IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 500);
} }
//else
//{
// Shunt2_MoveInfo.NextMoveStep(LineMoveStep.Shunt03_WaitStop1Down);
// LogUtil.info(Name + "[" + Shunt2TrayNum + "]" + "分流横移2: 不需要分流,等待进仓5处无托盘后放行托盘 ");
// Shunt_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// //IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.HIGH, 500);
//}
} }
else if (Shunt2_MoveInfo.MoveStep.Equals(LineMoveStep.Shunt04_Stop1Down)) else if (Shunt2_MoveInfo.MoveStep.Equals(LineMoveStep.Shunt04_Stop1Down))
{ {
...@@ -321,6 +329,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,6 +329,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (Shunt2_Updown2CanUp()) if (Shunt2_Updown2CanUp())
{ {
ClearTimeoutAlarm("等待分流横移2可以上升");
if (CylinderIsOk(IO_Type.Shunt2_TopCylinder_Down1, IO_Type.Shunt2_TopCylinder_Up1) && if (CylinderIsOk(IO_Type.Shunt2_TopCylinder_Down1, IO_Type.Shunt2_TopCylinder_Up1) &&
CylinderIsOk(IO_Type.Shunt2_TopCylinder_Down2, IO_Type.Shunt2_TopCylinder_Up2)) CylinderIsOk(IO_Type.Shunt2_TopCylinder_Down2, IO_Type.Shunt2_TopCylinder_Up2))
{ {
......
...@@ -862,6 +862,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -862,6 +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));
} }
} }
else else
...@@ -903,29 +904,38 @@ namespace OnlineStore.DeviceLibrary ...@@ -903,29 +904,38 @@ 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))
if(IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{ {
MIO_02_FixtureCheck(); MIO_02_FixtureCheck();
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_StopDownWait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_StopDownWait);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 前阻挡检测消失后再等待300ms上升阻挡"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 前阻挡检测消失后再等待300ms上升阻挡,最多等待5秒");
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(300)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopDownWait)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopDownWait))
{ {
MIO_02_FixtureCheck(); MIO_02_FixtureCheck();
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号"); {
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 再次等待托盘信号");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
}
else
{
//未检测到信号或阻挡下降失败,结束处理
LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check2=HIGH,结束处理 ");
SecondMoveInfo.EndMove();
}
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_Stop2Down))
{ {
...@@ -966,7 +976,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -966,7 +976,7 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
} }
else else
{ {
...@@ -977,7 +987,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -977,7 +987,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayNumError(-1, ""); TrayManager.UpdateTrayNumError(-1, "");
} }
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
} }
} }
...@@ -1045,7 +1055,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1045,7 +1055,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库中,移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + "*************** 空托盘【" + currTrayNum + "】,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
...@@ -1060,7 +1070,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1060,7 +1070,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待料盘检测信号,等待移栽"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待料盘检测信号,等待移栽");
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待移栽"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待移栽");
} }
isNeedMove = true; isNeedMove = true;
...@@ -1088,17 +1098,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -1088,17 +1098,18 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) ) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore))
{ {
if (MoveInfo.MoveType.Equals(LineMoveType.None)) if (MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
StartInStoreMove(SecondMoveInfo.MoveParam); StartInStoreMove(SecondMoveInfo.MoveParam);
CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)"); CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo);
}else if (SecondMoveInfo.IsTimeOut(30)) }
else if (SecondMoveInfo.IsTimeOut(30))
{ {
string msg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待开始入库超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; string msg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待开始入库超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(msg + ",暂时放托盘离开"); LogUtil.error(msg + ",暂时放托盘离开");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 入库超时,放托盘离开,顶升气缸1下降"); InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 入库超时,放托盘离开,顶升气缸1下降");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
...@@ -1146,16 +1157,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -1146,16 +1157,28 @@ namespace OnlineStore.DeviceLibrary
} }
private void MIO_02_FixtureCheck() private void MIO_02_FixtureCheck()
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_FixtureCheck); if (IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW) || IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)"); {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_FixtureCheck);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)");
if (DeviceID.Equals(5)) if (DeviceID.Equals(5))
{
SecondMoveInfo.TimeOutSeconds = 20;
}
SecondMoveInfo.OneWaitCanEndStep = true;
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
//最多等待30秒
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
}
else
{ {
SecondMoveInfo.TimeOutSeconds = 20; //未检测到信号或阻挡下降失败,结束处理
LogInfo(SecondMoveInfo.SLog + "未等到信号 StopCylinder_Check1=LOW,或 StopCylinder_Check2=HIGH,结束处理 ");
SecondMoveInfo.EndMove();
} }
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
} }
private void MO_16_Stop2Down() private void MO_16_Stop2Down()
{ {
...@@ -1184,7 +1207,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1184,7 +1207,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (DeviceID.Equals(5)) if (DeviceID.Equals(5))
{ {
if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && SecondMoveInfo.MoveStep <= LineMoveStep.MIO_04_Wait) if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && SecondMoveInfo.MoveStep < LineMoveStep.MIO_03_Stop2Down)
{ {
UpdateTrayNum(); UpdateTrayNum();
LogUtil.info(Name + " EndProcessTray ,结束当前托盘[" + currTrayNum + "]处理【" + SecondMoveInfo.MoveType + "】【" + SecondMoveInfo.MoveStep + "】 "); LogUtil.info(Name + " EndProcessTray ,结束当前托盘[" + currTrayNum + "]处理【" + SecondMoveInfo.MoveType + "】【" + SecondMoveInfo.MoveStep + "】 ");
...@@ -1192,6 +1215,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -1192,6 +1215,24 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
//判断移栽是否正在处理托盘
internal bool HasTray()
{
if (CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP))
{
return true;
}
if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && SecondMoveInfo.MoveStep >= LineMoveStep.MIO_03_Stop2Down)
{
return true;
}
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
#endregion #endregion
} }
......
...@@ -80,7 +80,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +80,8 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH, 1200); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH, 1200);
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));
} }
} }
else else
...@@ -310,19 +311,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -310,19 +311,37 @@ namespace OnlineStore.DeviceLibrary
#region 托盘检测 #region 托盘检测
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_00_Stop1Down)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_00_Stop1Down))
{ {
TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime; if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.StopCylinder_Check1).Equals(IO_VALUE.LOW))
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); {
LogUtil.debug(Name + "托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸上升,下降耗时(" + FormUtil.GetSpanStr(span) + "),等待 阻挡2托盘检测=1)"); TimeSpan span = DateTime.Now - SecondMoveInfo.LastSetpTime;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
} 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.WaitTime(30000));
SecondMoveInfo.OneWaitCanEndStep = true;
}
else
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待StopCylinder_Check=HIGH 或 StopCylinder_Check1=LOW失败,结束处理");
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"); 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.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))
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待 StopCylinder_Check=HIGH 失败,结束处理");
SecondMoveInfo.EndMove();
return;
}
UpdateTrayNum(); UpdateTrayNum();
if (Config.SidesWayNum.Equals(4)) if (Config.SidesWayNum.Equals(4))
{ {
...@@ -365,7 +384,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,7 +384,7 @@ namespace OnlineStore.DeviceLibrary
if (this.Config.SidesWayNum.Equals(4) && TrayDisableManager.ProcessTray && TrayDisableManager.DisableTray(currTrayNum)) if (this.Config.SidesWayNum.Equals(4) && TrayDisableManager.ProcessTray && TrayDisableManager.DisableTray(currTrayNum))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_10_WaitProDisableTray); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_10_WaitProDisableTray);
LogInfo(Name + "拦截禁用托盘【"+currTrayNum+"】,等待托盘启用后再放行"); LogInfo(Name + "拦截禁用托盘【" + currTrayNum + "】,等待托盘启用后再放行");
} }
else else
...@@ -396,7 +415,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,7 +415,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
CheckLog("托盘阻挡 " + SecondMoveInfo.SLog + " 顶升气缸上升 "); CheckLog("托盘阻挡 " + SecondMoveInfo.SLog + " 顶升气缸上升 ");
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopUp))
{ {
...@@ -421,7 +440,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -421,7 +440,7 @@ namespace OnlineStore.DeviceLibrary
ClearTimeoutAlarm(TrayDisableManager.ProWarnMsg); ClearTimeoutAlarm(TrayDisableManager.ProWarnMsg);
MO_14_TopDown(); MO_14_TopDown();
} }
else if(SecondMoveInfo.IsTimeOut(30)) else if (SecondMoveInfo.IsTimeOut(30))
{ {
MoveTimeoutAlarm(SecondMoveInfo, "等待处理并启用托盘超时"); MoveTimeoutAlarm(SecondMoveInfo, "等待处理并启用托盘超时");
//WarnMsg = Name + TrayDisableManager.ProWarnMsg+ "[" + currTrayNum + "], 请处理并启用托盘,已超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; //WarnMsg = Name + TrayDisableManager.ProWarnMsg+ "[" + currTrayNum + "], 请处理并启用托盘,已超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
...@@ -438,12 +457,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,12 +457,12 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
CheckLog("托盘放行 结束,触发 TrayPEndEvent "); CheckLog("托盘放行 结束,触发 TrayPEndEvent ");
// lastStopDown = DateTime.Now.AddSeconds(-1); // lastStopDown = DateTime.Now.AddSeconds(-1);
this.TrayPEndEvent?.Invoke(Config.SidesWayNum, currTrayNum); this.TrayPEndEvent?.Invoke(Config.SidesWayNum, currTrayNum);
} }
else else
{ {
// lastStopDown = DateTime.Now.AddSeconds(1); // lastStopDown = DateTime.Now.AddSeconds(1);
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo); //SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
//CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0"); //CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!