Commit 42bbba02 LN

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

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