Commit c5c3c74a LN

去掉部分TaskCreationOptions.LongRunning

1 个父辈 29861c1c
...@@ -67,7 +67,7 @@ DI,0,SL3上料气缸夹紧端,SL_MoveCylinder_Tighten,8,PRO_AOI_IP_16,0,SL3上料气缸夹紧 ...@@ -67,7 +67,7 @@ DI,0,SL3上料气缸夹紧端,SL_MoveCylinder_Tighten,8,PRO_AOI_IP_16,0,SL3上料气缸夹紧
DI,1000,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403 DI,1000,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
,,,,,,,,, ,,,,,,,,,
DI,1000,环形线横移2托盘检测,SW2_TrayCheck,9,PRO_AOI_IP_16,0,环形线横移2托盘检测,X210,X210 DI,1000,环形线横移2托盘检测,SW2_TrayCheck,9,PRO_AOI_IP_16,0,环形线横移2托盘检测,X210,X210
,1000,环形线横移2料盘检测1,SW2_ReelCheck,10,PRO_AOI_IP_16,0,环形线横移2料盘检测1,X211,X211 DI,0,上料3夹爪料盘检测,ReelCheck,10,PRO_AOI_IP_16,0,上料3夹爪料盘检测,X211,X211
DI,1000,环形线横移2顶升上升端,SW2_TopCylinder_Up,11,PRO_AOI_IP_16,0,环形线横移2顶升上升端,X212,X212 DI,1000,环形线横移2顶升上升端,SW2_TopCylinder_Up,11,PRO_AOI_IP_16,0,环形线横移2顶升上升端,X212,X212
DI,1000,环形线横移2顶升下降端,SW2_TopCylinder_Down,12,PRO_AOI_IP_16,0,环形线横移2顶升下降端,X213,X213 DI,1000,环形线横移2顶升下降端,SW2_TopCylinder_Down,12,PRO_AOI_IP_16,0,环形线横移2顶升下降端,X213,X213
DI,1000,环形线横移2定位上升端,SW2_LocationCylinder_Up,13,PRO_AOI_IP_16,0,环形线横移2定位上升端,X214,X214 DI,1000,环形线横移2定位上升端,SW2_LocationCylinder_Up,13,PRO_AOI_IP_16,0,环形线横移2定位上升端,X214,X214
......
...@@ -263,7 +263,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -263,7 +263,7 @@ namespace OnlineStore.DeviceLibrary
Alarm(LineAlarmType.SuddenStop); Alarm(LineAlarmType.SuddenStop);
return; return;
} }
}, TaskCreationOptions.LongRunning); });
} }
} }
else if (IOValue(IO_Type.DLine_Reset).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.DLine_Reset).Equals(IO_VALUE.HIGH))
......
...@@ -365,7 +365,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,7 +365,7 @@ namespace OnlineStore.DeviceLibrary
} }
return; return;
} }
}, TaskCreationOptions.LongRunning); });
} }
} }
else if (IOValue(IO_Type.SL_Reset_BTN).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.SL_Reset_BTN).Equals(IO_VALUE.HIGH))
...@@ -764,7 +764,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -764,7 +764,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Thread.Sleep(1000); Thread.Sleep(1000);
AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None, ClientLevel.High, true);
}, TaskCreationOptions.LongRunning); });
ProcessShelfOut = false; ProcessShelfOut = false;
LogUtil.info(logName + ",停止转动,清空料架["+ LastOutShelfId + "], 结束"); LogUtil.info(logName + ",停止转动,清空料架["+ LastOutShelfId + "], 结束");
} }
...@@ -786,7 +786,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -786,7 +786,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
ProcessShelfOut = false; ProcessShelfOut = false;
} }
}, TaskCreationOptions.LongRunning); });
} }
internal void ShelfEnterProcess() internal void ShelfEnterProcess()
{ {
...@@ -844,7 +844,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -844,7 +844,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Thread.Sleep(1000); Thread.Sleep(1000);
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.High, true);
}, TaskCreationOptions.LongRunning); });
ProcessShelfEnter = false; ProcessShelfEnter = false;
LogUtil.info(logName + " 结束"); LogUtil.info(logName + " 结束");
} }
...@@ -862,7 +862,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -862,7 +862,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
ProcessShelfEnter = false; ProcessShelfEnter = false;
} }
}, TaskCreationOptions.LongRunning); });
} }
private bool ReadShelfId() private bool ReadShelfId()
......
...@@ -1162,7 +1162,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1162,7 +1162,7 @@ namespace OnlineStore.DeviceLibrary
//需要等待500再下降 //需要等待500再下降
Thread.Sleep(500); Thread.Sleep(500);
CylinderMove(null, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); CylinderMove(null, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
}, TaskCreationOptions.LongRunning); });
} }
} }
else else
...@@ -1292,7 +1292,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1292,7 +1292,7 @@ namespace OnlineStore.DeviceLibrary
LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name, false, 3000); LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name, false, 3000);
} }
return LastCodeList; return LastCodeList;
}, TaskCreationOptions.LongRunning); });
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -661,7 +661,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -661,7 +661,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfId + "】【" + OutStoreCount.ToString() + "】afterPutCut 结果:" + msg); LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfId + "】【" + OutStoreCount.ToString() + "】afterPutCut 结果:" + msg);
taskData = null; taskData = null;
} }
}, TaskCreationOptions.LongRunning); });
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_221_UpdownAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_221_UpdownAxisToP1))
{ {
......
...@@ -182,7 +182,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -182,7 +182,7 @@ namespace OnlineStore.DeviceLibrary
canStart = true; canStart = true;
AgvClient.Init(); AgvClient.Init();
}, TaskCreationOptions.LongRunning); });
} }
...@@ -686,7 +686,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -686,7 +686,7 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg("收到急停信号,报警急停"); SetWarnMsg("收到急停信号,报警急停");
Alarm(LineAlarmType.SuddenStop); Alarm(LineAlarmType.SuddenStop);
} }
}, TaskCreationOptions.LongRunning); });
} }
} }
else if (fuweiValue.Equals(IO_VALUE.HIGH) && (!fuweiValue.Equals(lastFuwei))) else if (fuweiValue.Equals(IO_VALUE.HIGH) && (!fuweiValue.Equals(lastFuwei)))
......
...@@ -534,7 +534,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -534,7 +534,7 @@ namespace OnlineStore.DeviceLibrary
waitInStoreList.RemoveAt(reIndex); waitInStoreList.RemoveAt(reIndex);
Task.Factory.StartNew(delegate { Task.Factory.StartNew(delegate {
SServerManager.cancelPutInTask(Name, currCode.WareCode); SServerManager.cancelPutInTask(Name, currCode.WareCode);
}, TaskCreationOptions.LongRunning); });
return false; return false;
} }
......
...@@ -401,7 +401,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -401,7 +401,7 @@ namespace OnlineStore.DeviceLibrary
{ {
canWhileCount = 3; canWhileCount = 3;
LineRunAndWait(timeOutMS); LineRunAndWait(timeOutMS);
}, TaskCreationOptions.LongRunning); });
} }
private string LineRunAndWait(int timeOutMS = 30000) private string LineRunAndWait(int timeOutMS = 30000)
...@@ -519,7 +519,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -519,7 +519,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
turnEnd?.Invoke(result.Equals("")); turnEnd?.Invoke(result.Equals(""));
}, TaskCreationOptions.LongRunning); });
} }
InTurn = false; InTurn = false;
WaitCheckDI_High = false; WaitCheckDI_High = false;
......
...@@ -149,10 +149,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -149,10 +149,7 @@ namespace OnlineStore.DeviceLibrary
//如果分配了库位,需要调用取消 //如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "") if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "")
{ {
Task.Factory.StartNew(delegate
{
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode); SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode);
}, TaskCreationOptions.LongRunning);
} }
//入料失败料 //入料失败料
return inoup; return inoup;
......
...@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(moveEquip.Name + " 入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 "); LogUtil.error(moveEquip.Name + " 入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
Thread.Sleep(3000); Thread.Sleep(3000);
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
}, TaskCreationOptions.LongRunning); });
} }
lock (moveEquip.waitInListLock) lock (moveEquip.waitInListLock)
{ {
...@@ -589,7 +589,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -589,7 +589,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 "); LogUtil.error(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
Thread.Sleep(3000); Thread.Sleep(3000);
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
}, TaskCreationOptions.LongRunning); });
} }
lock (moveEquip.waitInListLock) lock (moveEquip.waitInListLock)
{ {
......
...@@ -536,7 +536,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -536,7 +536,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
IOManager.IOMove(IoType, tValue, baseConfig.Id); IOManager.IOMove(IoType, tValue, baseConfig.Id);
}, TaskCreationOptions.LongRunning); });
} }
} }
public IO_VALUE IOValue(string IoType) public IO_VALUE IOValue(string IoType)
......
...@@ -280,6 +280,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -280,6 +280,10 @@ namespace OnlineStore.LoadCSVLibrary
#region 上料流水线 #region 上料流水线
/// <summary>
/// DI 0 上料3夹爪料盘检测 ReelCheck 10 PRO_AOI_IP_16 0 上料3夹爪料盘检测 X211 X211
/// </summary>
public static string ReelCheck = "ReelCheck";
/// <summary> /// <summary>
/// DI SL1急停 SL_SuddenStop_BTN X101 /// DI SL1急停 SL_SuddenStop_BTN X101
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!