Commit c7fc3263 张东亮

料架切换状态不切换问题

1 个父辈 0c638219
...@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch ol_noshelfWatch = new Stopwatch(); private Stopwatch ol_noshelfWatch = new Stopwatch();
private Stopwatch ol_noshelfWatch1 = new Stopwatch(); private Stopwatch ol_noshelfWatch1 = new Stopwatch();
private Stopwatch rfidWatch = new Stopwatch(); private Stopwatch rfidWatch = new Stopwatch();
private Stopwatch rfidNoWatch = new Stopwatch();
private DateTime ol_lastSendShelfTime = DateTime.Now; private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500; private int StopDownMS = 1500;
/// <summary> /// <summary>
...@@ -284,7 +285,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -284,7 +285,6 @@ namespace OnlineStore.DeviceLibrary
IOManager.CIOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW);
LogUtil.info(" Feeder2线体出口无料架,下降 [" + IO_Type.L2_StopDown + "] [" + StopDownMS + "] 秒"); LogUtil.info(" Feeder2线体出口无料架,下降 [" + IO_Type.L2_StopDown + "] [" + StopDownMS + "] 秒");
ol_lastSendShelfTime = DateTime.Now; ol_lastSendShelfTime = DateTime.Now;
agvClient.OutLine_RFID = "";
StopIOMove(IO_Type.L2_StopDown, StopDownMS); StopIOMove(IO_Type.L2_StopDown, StopDownMS);
} }
} }
...@@ -309,10 +309,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -309,10 +309,16 @@ namespace OnlineStore.DeviceLibrary
IOManager.CIOMove(IO_Type.L1_StopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L1_StopDown, IO_VALUE.LOW);
IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW);
} }
if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000)) if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000))
{ {
agvClient.OutLine_NeedLeave(LastOutShelfId); agvClient.OutLine_NeedLeave(LastOutShelfId);
} }
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) && LineManager.checkWatch(rfidNoWatch, 2000))
{
agvClient.OutLine_RFID = "";
agvClient.OutLine_None(LastOutShelfId);
}
} }
private Task TranverseTask; private Task TranverseTask;
private static void TranverseProcess() private static void TranverseProcess()
...@@ -357,6 +363,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -357,6 +363,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(" 横移电机停止"); LogUtil.info(" 横移电机停止");
IOManager.CIOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW);
Thread.Sleep(1000); Thread.Sleep(1000);
IOManager.CIOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW);
IOManager.CIOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.HIGH); IOManager.CIOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.HIGH);
Thread.Sleep(1000); Thread.Sleep(1000);
LogUtil.info(" 横移机构下降"); LogUtil.info(" 横移机构下降");
......
...@@ -30,14 +30,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,14 +30,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public void InLine_None() public void InLine_None()
{ {
SetStatus(InLine_Name, "", ClientAction.None); SetStatus(InLine_Name, "000", ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以进入状态 /// 可以进入状态
/// </summary> /// </summary>
public void InLine_NeedEnter() public void InLine_NeedEnter()
{ {
SetStatus(InLine_Name, "", ClientAction.NeedEnter); SetStatus(InLine_Name, "000", ClientAction.NeedEnter);
} }
#endregion #endregion
...@@ -306,17 +306,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -306,17 +306,17 @@ namespace OnlineStore.DeviceLibrary
if (actionMap.ContainsKey(name)) if (actionMap.ContainsKey(name))
{ {
ClientAction currA = actionMap[name]; //相同状态就设置一次 ClientAction currA = actionMap[name]; //相同状态就设置一次
if (currA.Equals(action) && shelfId == "") if (currA.Equals(action) && (shelfId == "000"))
{ {
return false; return false;
} }
// actionMap[name] = action; actionMap[name] = action;
// agvClient.SetStatus(name, shelfId, action, level); agvClient.SetStatus(name, shelfId, action, level);
LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString()); LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
return true; return true;
} }
agvClient.SetStatus(name, shelfId, action, level); agvClient.SetStatus(name, shelfId, action, level);
//actionMap.Add(name, action); actionMap.Add(name, action);
LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString()); LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
return true; return true;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!