Commit ac876e8f LN

出库到皮带线不需要下降

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