Commit 0c638219 张东亮

11

1 个父辈 0b5ed504
...@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -261,6 +261,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 DateTime ol_lastSendShelfTime = DateTime.Now; private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500; private int StopDownMS = 1500;
/// <summary> /// <summary>
...@@ -283,6 +284,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -283,6 +284,7 @@ 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);
} }
} }
...@@ -307,15 +309,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -307,15 +309,10 @@ 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)) if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000))
{ {
if(!LastOutShelfId.Equals(agvClient.OutLine_RFID)) agvClient.OutLine_NeedLeave(LastOutShelfId);
{
agvClient.OutLine_RFID = LastOutShelfId;
agvClient.OutLine_NeedLeave();
}
} }
} }
private Task TranverseTask; private Task TranverseTask;
private static void TranverseProcess() private static void TranverseProcess()
......
...@@ -45,17 +45,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -45,17 +45,22 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 无状态 /// 无状态
/// </summary> /// </summary>
public void OutLine_None() public void OutLine_None(string rfid="")
{ {
SetStatus(OutLine_Name, "", ClientAction.None); SetStatus(OutLine_Name, rfid, ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以出去状态 /// 可以出去状态
/// </summary> /// </summary>
public void OutLine_NeedLeave() public void OutLine_NeedLeave(string rfid)
{ {
SetStatus(OutLine_Name, OutLine_RFID, ClientAction.NeedLeave); if (!OutLine_RFID.Equals(rfid))
{
OutLine_RFID = rfid;
SetStatus(OutLine_Name, rfid, ClientAction.NeedLeave);
}
} }
#endregion #endregion
...@@ -235,7 +240,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -235,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("MayEnter [" + name + "] "); LogUtil.info("MayEnter [" + name + "] ");
} }
public void MayLeave(string name,string rfid) public void MayLeave(string name, string rfid)
{ {
SetStatus(name, rfid, ClientAction.MayLeave); SetStatus(name, rfid, ClientAction.MayLeave);
if (name.Equals(OutLine_Name)) if (name.Equals(OutLine_Name))
...@@ -271,7 +276,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -271,7 +276,7 @@ namespace OnlineStore.DeviceLibrary
/// 料架离开产线完成 /// 料架离开产线完成
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public void FinishLeave(string name,string rfid="") public void FinishLeave(string name, string rfid = "")
{ {
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
...@@ -307,12 +312,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -307,12 +312,12 @@ namespace OnlineStore.DeviceLibrary
} }
// 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!