Commit c7fc3263 张东亮

料架切换状态不切换问题

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