Commit 42bbba02 LN

当入库完成出空料架时,mark="0"

1 个父辈 eef3b3e7
...@@ -57,3 +57,6 @@ ...@@ -57,3 +57,6 @@
agvclien增加cancelState的参数设置 agvclien增加cancelState的参数设置
BI_03_LineRun超时报警改为40秒 BI_03_LineRun超时报警改为40秒
20200221
agv客户端启动时需要设置状态为none
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"
\ No newline at end of file \ No newline at end of file
...@@ -170,24 +170,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,24 +170,28 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.BS_01_TopDown); MoveInfo.NextMoveStep(StoreMoveStep.BS_01_TopDown);
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore)) if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{ {
InOutStoreLog("送出出库料架:顶升气缸下降,调用 NeedLeave[" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]"); InOutStoreLog("送出出库料架:顶升气缸下降,调用 NeedLeave[" + CurrShelfID + "][" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]");
AgvClient.NeedLeave(Config.AgvNodeName, CurrShelfID,CurrShelfID);
} }
else else
{ {
InOutStoreLog("送出空料架:顶升气缸下降,调用 NeedLeave[" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]"); InOutStoreLog("送出空料架:顶升气缸下降,调用 NeedLeave[0][" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]");
AgvClient.NeedLeave(Config.AgvNodeName,"0", CurrShelfID);
} }
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
StoreManager.clearPutInRfid(Name, CurrShelfID); StoreManager.clearPutInRfid(Name, CurrShelfID);
AgvClient.NeedLeave(Config.AgvNodeName, CurrShelfID);
} }
private void ShelfOutProcess() private void ShelfOutProcess()
{ {
string moveName = "送出空料架"; string moveName = "送出空料架";
string mark = "0";
//bool instoreShelf = true; //bool instoreShelf = true;
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore)) if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{ {
// instoreShelf = false; // instoreShelf = false;
moveName = "送出出库料架"; moveName = "送出出库料架";
mark = CurrShelfID;
} }
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_01_TopDown)) if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_01_TopDown))
...@@ -202,8 +206,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,8 +206,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.TimeOutSeconds = 600; MoveInfo.TimeOutSeconds = 600;
// MoveInfo.OneWaitCanEndStep = true; // MoveInfo.OneWaitCanEndStep = true;
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(600000)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(600000));
InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave[" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒"); InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave["+mark+"][" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒");
AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.NeedLeave, ClientLevel.Low, true); AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.Low, true);
//等待agv到达 //等待agv到达
MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Arrive)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Arrive));
} }
...@@ -230,8 +234,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,8 +234,8 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitReady); MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitReady);
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
InOutStoreLog(moveName + MoveInfo.SLog + ":移门已打开,调用MayLeave[" + CurrShelfID + "],等待agv " + Config.AgvNodeName + " Ready"); InOutStoreLog(moveName + MoveInfo.SLog + ":移门已打开,调用 MayLeave [" + mark + "][" + CurrShelfID + "],等待agv " + Config.AgvNodeName + " Ready");
AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.MayLeave, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.MayLeave, ClientLevel.High, true);
//等待agv到达 //等待agv到达
MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Ready)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Ready));
...@@ -274,7 +278,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -274,7 +278,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_10_CloseDoor); MoveInfo.NextMoveStep(StoreMoveStep.BS_10_CloseDoor);
InOutStoreLog(moveName + MoveInfo.SLog + ":停止线体转动,关闭仓门 ,发送FinishLeave ,等待最少5000"); InOutStoreLog(moveName + MoveInfo.SLog + ":停止线体转动,关闭仓门 ,发送FinishLeave ,等待最少5000");
AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.FinishLeave, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.FinishLeave, ClientLevel.High, true);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
LineStop(); LineStop();
DoorBean.StartClose(MoveInfo); DoorBean.StartClose(MoveInfo);
......
...@@ -33,10 +33,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -33,10 +33,10 @@ namespace OnlineStore.DeviceLibrary
agvClient.CloseDoor += AgvClient_CloseDoor; agvClient.CloseDoor += AgvClient_CloseDoor;
} }
actionMap = new Dictionary<string, Asa.ClientAction>(); actionMap = new Dictionary<string, Asa.ClientAction>();
foreach (string key in NodeList) //foreach (string key in NodeList)
{ //{
actionMap.Add(key, Asa.ClientAction.None); // actionMap.Add(key, Asa.ClientAction.None);
} //}
agvClient.Connect(); agvClient.Connect();
foreach (string str in NodeList) foreach (string str in NodeList)
...@@ -68,13 +68,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -68,13 +68,16 @@ namespace OnlineStore.DeviceLibrary
} }
public static void SetStatus(string id, string mark = "", string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low, bool isMust = false) public static void SetStatus(string id, string mark = "", string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low, bool isMust = false)
{ {
ClientAction currA = GetAction(id); // ClientAction currA = GetAction(id);
//相同状态就设置一次 if (actionMap.ContainsKey(id))
if (currA.Equals(action)&&(!isMust))
{ {
return; ClientAction currA = actionMap[id]; //相同状态就设置一次
} if (currA.Equals(action))
{
return;
}
}
agvClient.SetStatus(id,mark, shelfId, action, level); agvClient.SetStatus(id,mark, shelfId, action, level);
UpdateAction(id, action); UpdateAction(id, action);
} }
...@@ -128,12 +131,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,12 +131,12 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
public static bool NeedLeave(string id, string shelfId = "") public static bool NeedLeave(string id, string mark, string shelfId )
{ {
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter) || currA.Equals(ClientAction.FinishEnter)||currA.Equals(ClientAction.FinishLeave)) if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter) || currA.Equals(ClientAction.FinishEnter)||currA.Equals(ClientAction.FinishLeave))
{ {
SetStatus(id, shelfId, shelfId, ClientAction.NeedLeave); SetStatus(id, mark, shelfId, ClientAction.NeedLeave);
return true; return true;
} }
return false; return false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!