Commit bbfcdee8 LN

启动停止优化

1 个父辈 2b76268b
...@@ -294,18 +294,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,18 +294,18 @@ namespace OnlineStore.DeviceLibrary
CloseAxis(UpdownAxis); CloseAxis(UpdownAxis);
if (Config.SidesWayNum <= 0) if (Config.SidesWayNum <= 0)
{ {
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW); CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
IOMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW); CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
} }
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
} }
/// <summary> /// <summary>
......
...@@ -423,7 +423,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -423,7 +423,27 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false; mainTimer.Enabled = false;
AgvClient.SetCancelState(true); AgvClient.SetCancelState(true);
//停止运行时,把阻挡气缸上升 //停止运行时,把阻挡气缸上升
StopMove(); //StopMove();
foreach (EquipBase equip in this.AllEquipMap.Values)
{
if (!equip.IsDebug)
{
equip.StopRun();
}
else
{
equip.CloseCylinderStop();
}
}
MoveInfo.EndMove();
WriteDrivetMotorRun(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);
SideWayStop();
runStatus = LineRunStatus.Wait; runStatus = LineRunStatus.Wait;
ledProcessTimer.Enabled = false; ledProcessTimer.Enabled = false;
...@@ -815,14 +835,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -815,14 +835,14 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
internal override void StopMove() internal override void StopMove( )
{ {
foreach (EquipBase equip in this.AllEquipMap.Values) foreach (EquipBase equip in this.AllEquipMap.Values)
{ {
if (!equip.IsDebug) if (!equip.IsDebug)
{ {
equip.StopRun(); equip.StopMove();
} }
else else
{ {
......
...@@ -199,19 +199,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,19 +199,19 @@ namespace OnlineStore.DeviceLibrary
} }
StopMove(); StopMove();
//停止运行时,把所有IO 置零 //停止运行时,把所有IO 置零
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); CheckAndMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW); CheckAndMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
IOMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
if (UseAxis.Equals(false)) if (UseAxis.Equals(false))
{ {
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW); CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
} }
IOMove(IO_Type.ClampCylinder_Slack, IO_VALUE.LOW); CheckAndMove(IO_Type.ClampCylinder_Slack, IO_VALUE.LOW);
IOMove(IO_Type.ClampCylinder_Tighten, IO_VALUE.LOW); CheckAndMove(IO_Type.ClampCylinder_Tighten, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait; runStatus = LineRunStatus.Wait;
} }
......
...@@ -179,19 +179,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,19 +179,19 @@ namespace OnlineStore.DeviceLibrary
StopMove(); StopMove();
CloseAxis(UpdownAxis); CloseAxis(UpdownAxis);
//停止运行时,把所有IO 置零 //停止运行时,把所有IO 置零
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); CheckAndMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW); CheckAndMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
IOMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
if (UseAxis.Equals(false)) if (UseAxis.Equals(false))
{ {
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW); CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
} }
IOMove(IO_Type.ClampCylinder_Slack, IO_VALUE.LOW); CheckAndMove(IO_Type.ClampCylinder_Slack, IO_VALUE.LOW);
IOMove(IO_Type.ClampCylinder_Tighten, IO_VALUE.LOW); CheckAndMove(IO_Type.ClampCylinder_Tighten, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait; runStatus = LineRunStatus.Wait;
} }
......
...@@ -86,10 +86,11 @@ namespace Asa.RFID ...@@ -86,10 +86,11 @@ namespace Asa.RFID
/// </summary> /// </summary>
public static void CloseAll() public static void CloseAll()
{ {
foreach(var rfid in rfidMap.Values) foreach (var rfid in rfidMap.Values)
{ {
rfid.StopAutoScan(); rfid.StopAutoScan();
} }
rfidMap = new Dictionary<string, RFIDAuto>();
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!