Commit ac876e8f LN

出库到皮带线不需要下降

1 个父辈 5d1cbe82
...@@ -708,7 +708,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -708,7 +708,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "定时检测报警出错:",ex); LogUtil.error(Name + "定时检测报警出错:",ex);
} }
Thread.Sleep(1); Thread.Sleep(1);
} }
/// <summary> /// <summary>
/// 定时处理,监听信号,监听IO /// 定时处理,监听信号,监听IO
/// </summary> /// </summary>
...@@ -750,28 +750,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -750,28 +750,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
switch (runStatus) LineTimerPro();
{
case LineRunStatus.Busy:
BusyMoveProcess();
break;
case LineRunStatus.HomeMoving:
ResetProcess();
break;
case LineRunStatus.Reset:
ResetProcess();
break;
case LineRunStatus.Runing:
if ((isInSuddenDown.Equals(false) && isNoAirCheck.Equals(false)))
{
//清理超时异常
IOTimeOutProcess();
}
break;
default: break;
}
SideWayTimerProcess();
} }
TimeSpan span = DateTime.Now - time; TimeSpan span = DateTime.Now - time;
...@@ -785,7 +764,49 @@ namespace OnlineStore.DeviceLibrary ...@@ -785,7 +764,49 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "主定时器出错:",ex); LogUtil.error(Name + "主定时器出错:",ex);
} }
Thread.Sleep(1); Thread.Sleep(1);
} }
private bool busyPro = false ;
private DateTime busyProTime = DateTime.Now;
private void LineTimerPro()
{
TimeSpan span = DateTime.Now - busyProTime;
if (busyPro && span.TotalSeconds < 3)
{
return;
}
try
{
busyPro = true;
busyProTime = DateTime.Now;
switch (runStatus)
{
case LineRunStatus.Busy:
BusyMoveProcess();
break;
case LineRunStatus.HomeMoving:
ResetProcess();
break;
case LineRunStatus.Reset:
ResetProcess();
break;
case LineRunStatus.Runing:
if ((isInSuddenDown.Equals(false) && isNoAirCheck.Equals(false)))
{
//清理超时异常
IOTimeOutProcess();
}
break;
default: break;
}
SideWayTimerProcess();
}
catch (Exception ex)
{
LogUtil.error(Name + "LineTimerPro 出错:", ex);
}
busyPro = false;
}
/// <summary> /// <summary>
/// 气压检测处理 /// 气压检测处理
/// </summary> /// </summary>
...@@ -864,8 +885,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -864,8 +885,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
WriteDrivetMotorRun(IO_VALUE.LOW); WriteDrivetMotorRun(IO_VALUE.LOW);
IOMove(IO_Type.NGCylinder_After, IO_VALUE.LOW); //IOMove(IO_Type.NGCylinder_After, IO_VALUE.LOW);
IOMove(IO_Type.NGCylinder_Before, IO_VALUE.LOW); //IOMove(IO_Type.NGCylinder_Before, IO_VALUE.LOW);
IOMove(IO_Type.SW4_MotorRun, IO_VALUE.LOW); IOMove(IO_Type.SW4_MotorRun, IO_VALUE.LOW);
IOMove(IO_Type.SW4_TopCylinder_Down, IO_VALUE.LOW); IOMove(IO_Type.SW4_TopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.SW4_TopCylinder_Up, IO_VALUE.LOW); IOMove(IO_Type.SW4_TopCylinder_Up, IO_VALUE.LOW);
......
...@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("SideWayTimerProcess 出错:" ,ex); LogUtil.error(Name+"SideWayTimerProcess 出错:" ,ex);
} }
sdIsInprocess = false; sdIsInprocess = false;
} }
......
...@@ -442,27 +442,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -442,27 +442,29 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_CylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_CylinderBefore))
{ {
//判断是否可以下降
if (LineIsReady()) if (LineIsReady())
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderDown); //气缸不下降,直接扔料
OutLog("出料:" + MoveInfo.SLog + " ,上下气缸下降)"); //MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderDown);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); //OutLog("出料:" + MoveInfo.SLog + " ,上下气缸下降)");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH); //UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax);
OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
} }
else if (MoveInfo.IsTimeOut()) else if (MoveInfo.IsTimeOut())
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待 皮带线可放料 " + "超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待 皮带线可放料 " + "超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 20); LogUtil.error(WarnMsg, DeviceID + 20);
Alarm(LineAlarmType.IoSingleTimeOut); Alarm(LineAlarmType.IoSingleTimeOut);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_CylinderDown)) //else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_CylinderDown))
{ //{
MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax); // MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax);
OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)"); // OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); // CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
} //}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_CylinderRelax)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_CylinderRelax))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_09_CylinderUp); MoveInfo.NextMoveStep(LineMoveStep.PO_09_CylinderUp);
...@@ -474,7 +476,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -474,7 +476,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.PO_10_CylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.PO_10_CylinderAfter);
OutLog("出料:" + MoveInfo.SLog + ",前后气缸后退,等待4000 ,皮带线继续运动"); OutLog("出料:" + MoveInfo.SLog + ",前后气缸后退,等待4000 ,皮带线继续运动");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//出料皮带线停止出料 //出料皮带线停止出料
DisLineContiune(); DisLineContiune();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!