Commit ac876e8f LN

出库到皮带线不需要下降

1 个父辈 5d1cbe82
...@@ -750,6 +750,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -750,6 +750,34 @@ namespace OnlineStore.DeviceLibrary
} }
} }
LineTimerPro();
}
TimeSpan span = DateTime.Now - time;
if (span.TotalMilliseconds > 1000)
{
LogUtil.error(Name + "主定时器处理耗时:" + FormUtil.GetSpanStr(span));
}
}
catch (Exception ex)
{
LogUtil.error(Name + "主定时器出错:",ex);
}
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) switch (runStatus)
{ {
case LineRunStatus.Busy: case LineRunStatus.Busy:
...@@ -773,18 +801,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -773,18 +801,11 @@ namespace OnlineStore.DeviceLibrary
SideWayTimerProcess(); SideWayTimerProcess();
} }
TimeSpan span = DateTime.Now - time;
if (span.TotalMilliseconds > 1000)
{
LogUtil.error(Name + "主定时器处理耗时:" + FormUtil.GetSpanStr(span));
}
}
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(Name + "主定时器出错:",ex); LogUtil.error(Name + "LineTimerPro 出错:", ex);
} }
Thread.Sleep(1); busyPro = false;
} }
/// <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,13 +442,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -442,13 +442,15 @@ 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())
{ {
...@@ -457,12 +459,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -457,12 +459,12 @@ namespace OnlineStore.DeviceLibrary
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!