Commit ea944e7c 刘韬

修正入库时单盘出库卡死

1 个父辈 6d6f260e
...@@ -46,6 +46,8 @@ namespace DeviceLibrary ...@@ -46,6 +46,8 @@ namespace DeviceLibrary
public void Pause() public void Pause()
{ {
LogUtil.info($"{Name},停止运行"); LogUtil.info($"{Name},停止运行");
IOManager.IOMove(Low, IO_VALUE.LOW);
IOManager.IOMove(High, IO_VALUE.LOW);
if (currentIOvalue == IO_VALUE.None) { if (currentIOvalue == IO_VALUE.None) {
LogUtil.info($"{Name},没有在运行"); LogUtil.info($"{Name},没有在运行");
return; return;
...@@ -59,9 +61,6 @@ namespace DeviceLibrary ...@@ -59,9 +61,6 @@ namespace DeviceLibrary
LogUtil.info($"{Name},currentIOvalue:{currentIOvalue},暂停是IO已到位"); LogUtil.info($"{Name},currentIOvalue:{currentIOvalue},暂停是IO已到位");
return; return;
} }
IOManager.IOMove(Low, IO_VALUE.LOW);
IOManager.IOMove(High, IO_VALUE.LOW);
} }
public void Resume() public void Resume()
......
...@@ -73,11 +73,12 @@ namespace DeviceLibrary ...@@ -73,11 +73,12 @@ namespace DeviceLibrary
axisBean.RelMove(StrokeLength, (double)upspeed); axisBean.RelMove(StrokeLength, (double)upspeed);
DateTime d = DateTime.Now; DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftUp"); moveInfo.log($"{axisBean.AxisName},LiftUp");
if(moveInfo!=null) var wr = WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitUp), $"等待顶升[{axisBean.Config.Explain}]机构上升");
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitUp), $"等待顶升[{axisBean.Config.Explain}]机构上升")); if (moveInfo!=null)
moveInfo.WaitList.Add(wr);
Task.Run(()=> { Task.Run(()=> {
while (!IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) { while (!IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) {
Task.Delay(30); Task.Delay(15);
if (paused) if (paused)
{ {
paused = false; paused = false;
...@@ -89,6 +90,7 @@ namespace DeviceLibrary ...@@ -89,6 +90,7 @@ namespace DeviceLibrary
return; return;
} }
} }
moveInfo.WaitList.Remove(wr);
if (UpOverTimeMS > 0) if (UpOverTimeMS > 0)
Task.Delay(UpOverTimeMS).Wait(); Task.Delay(UpOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
...@@ -149,13 +151,14 @@ namespace DeviceLibrary ...@@ -149,13 +151,14 @@ namespace DeviceLibrary
axisBean.RelMove(-StrokeLength, (double)downspeed); axisBean.RelMove(-StrokeLength, (double)downspeed);
DateTime d = DateTime.Now; DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftDown"); moveInfo.log($"{axisBean.AxisName},LiftDown");
var wr = WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitDown), $"等待顶升[{axisBean.Config.Explain}]机构下降");
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitDown), $"等待顶升[{axisBean.Config.Explain}]机构下降")); moveInfo.WaitList.Add(wr);
Task.Run(() => { Task.Run(() => {
while (!IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) while (!IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH))
{ {
Task.Delay(30); Task.Delay(15);
if (paused) if (paused)
{ {
paused = false; paused = false;
...@@ -168,6 +171,9 @@ namespace DeviceLibrary ...@@ -168,6 +171,9 @@ namespace DeviceLibrary
return; return;
} }
} }
moveInfo.WaitList.Remove(wr);
if (DownOverTimeMS > 0) if (DownOverTimeMS > 0)
Task.Delay(DownOverTimeMS).Wait(); Task.Delay(DownOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
......
...@@ -136,12 +136,12 @@ namespace DeviceLibrary ...@@ -136,12 +136,12 @@ namespace DeviceLibrary
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open);
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close);
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed); StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed);
StringDoor.DownOverTimeMS = 300; StringDoor.DownOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_DownOverTimeMS", 0);
StringDoor.UpOverTimeMS = 100; StringDoor.UpOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_UpOverTimeMS", 0);
LogUtil.info("加载料串门类型为:步进"); LogUtil.info("加载料串门类型为:步进");
//此版本同步删除其他IO //此版本同步删除其他IO
RobotManage.Config.DOList.Remove(IO_Type.NitrogenValve); //RobotManage.Config.DOList.Remove(IO_Type.NitrogenValve);
}else }else
LogUtil.info("加载料串门类型为:气缸"); LogUtil.info("加载料串门类型为:气缸");
......
...@@ -80,7 +80,8 @@ namespace DeviceLibrary ...@@ -80,7 +80,8 @@ namespace DeviceLibrary
switch (ClampMoveInfo.MoveStep) switch (ClampMoveInfo.MoveStep)
{ {
case MoveStep.Wait: case MoveStep.Wait:
if (IsGetReelReady) { if (IsGetReelReady && StoreMoveInfo.MoveStep < MoveStep.StoreOut10)
{
ClampMoveInfo.NewMove(MoveStep.ReelClamp_01); ClampMoveInfo.NewMove(MoveStep.ReelClamp_01);
OpenFlipDoor(ClampMoveInfo); OpenFlipDoor(ClampMoveInfo);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!