Commit bbfcdee8 LN

启动停止优化

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