Commit 0c638219 张东亮

11

1 个父辈 0b5ed504
......@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch ol_noshelfWatch = new Stopwatch();
private Stopwatch ol_noshelfWatch1 = new Stopwatch();
private Stopwatch rfidWatch = new Stopwatch();
private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500;
/// <summary>
......@@ -283,6 +284,7 @@ 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);
}
}
......@@ -307,15 +309,10 @@ 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))
if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000))
{
if(!LastOutShelfId.Equals(agvClient.OutLine_RFID))
{
agvClient.OutLine_RFID = LastOutShelfId;
agvClient.OutLine_NeedLeave();
}
agvClient.OutLine_NeedLeave(LastOutShelfId);
}
}
private Task TranverseTask;
private static void TranverseProcess()
......
......@@ -45,17 +45,22 @@ namespace OnlineStore.DeviceLibrary
/// <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>
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
......@@ -235,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("MayEnter [" + name + "] ");
}
public void MayLeave(string name,string rfid)
public void MayLeave(string name, string rfid)
{
SetStatus(name, rfid, ClientAction.MayLeave);
if (name.Equals(OutLine_Name))
......@@ -271,7 +276,7 @@ namespace OnlineStore.DeviceLibrary
/// 料架离开产线完成
/// </summary>
/// <param name="name"></param>
public void FinishLeave(string name,string rfid="")
public void FinishLeave(string name, string rfid = "")
{
Task.Factory.StartNew(delegate
{
......@@ -307,12 +312,12 @@ namespace OnlineStore.DeviceLibrary
}
// actionMap[name] = action;
// agvClient.SetStatus(name, shelfId, action, level);
//LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
return true;
}
agvClient.SetStatus(name, shelfId, action, level);
//actionMap.Add(name, action);
//LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
return true;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!