Commit 5c78a90f LN

agv到达时需要判断料架是否正确

1 个父辈 c0aa7e41
...@@ -130,8 +130,6 @@ ...@@ -130,8 +130,6 @@
// chbAGV // chbAGV
// //
this.chbAGV.AutoSize = true; this.chbAGV.AutoSize = true;
this.chbAGV.Checked = true;
this.chbAGV.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAGV.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAGV.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAGV.Location = new System.Drawing.Point(36, 470); this.chbAGV.Location = new System.Drawing.Point(36, 470);
this.chbAGV.Name = "chbAGV"; this.chbAGV.Name = "chbAGV";
......
...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = true; wait.IsEnd = true;
} }
} }
else if (wait.AgvAction.Equals((int)ClientAction.Arrive)&&MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv)) else if (wait.AgvAction.Equals((int)ClientAction.Arrive)&&MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitArrive))
{ {
if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW))
{ {
......
...@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinDown)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinDown))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_03_WaitEmptyAgv); MoveInfo.NextMoveStep(StoreMoveStep.BS_03_WaitArrive);
MoveInfo.TimeOutSeconds = 600; MoveInfo.TimeOutSeconds = 600;
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); //MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
//等待agv到达 //等待agv到达
...@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave["+mark+"][" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒"); InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave["+mark+"][" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒");
AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitArrive))
{ {
//agv到达 //agv到达
...@@ -363,68 +363,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -363,68 +363,43 @@ namespace OnlineStore.DeviceLibrary
#region AGV #region AGV
internal bool ProcessAGVAction(string name, string rfid, ClientAction action) internal bool ProcessAGVAction(string name,string rfid, ClientAction action)
{ {
string logN = name + "收到调度" + name + "=" + action + ",RFID[" + rfid + "]"; string logN = name + "收到调度" + name + "=" + action + ",RFID["+rfid+"]";
//Arrive收到后打开门 //Arrive收到后打开门
if (!action.Equals(ClientAction.Arrive)) if (action.Equals(ClientAction.Arrive))
{ {
LogUtil.info(Name + logN + " ,未找到相关处理"); //出库处理中不处理
return false; if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
}
//出库处理中不处理
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_00_ReadyShelf))
{ {
if (rfid.Equals("")) //出库等待料架到达
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_00_ReadyShelf))
{ {
string mark = GetMarkInfo();
LogUtil.error(Name + logN + " 当前出库中 BI_00_ReadyShelf,RFID无效,不处理agv,重发 NeedEnter [" + mark + "][" + MoveInfo.MoveParam.rfid + "]");
AgvClient.SetStatus(Config.AgvNodeName, mark, MoveInfo.MoveParam.rfid, ClientAction.NeedEnter, ClientLevel.High, true);
return false;
}
//出库等待料架到达 }
LogUtil.info(Name + logN + ",当前出库中 BI_00_ReadyShelf,正在等待料架到达"); else if(MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitArrive))
MoveInfo.NextMoveStep(StoreMoveStep.BI_01_DoorOpen);
InOutStoreLog("出库等待料架" + MoveInfo.SLog + " agv已到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true;
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv))
//agv到达,开始处理
if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW))
{ {
if (!rfid.Equals(""))
if (rfid.Equals(""))
{ {
string mark = GetMarkInfo(); LogUtil.error(Name + logN + " ,RFID无效,不需要入库处理");
LogUtil.error(Name + logN + " 当前出库中 BS_03_WaitEmptyAgv,RFID[" + rfid + "]不是空车,不处理agv,重发 NeedLeave [" + mark + "][" + CurrShelfID + "]");
AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true);
return false; return false;
} }
LogUtil.info(Name + logN + " ,检测到料架,开始料架入库");
//等待空车到达 StartShelfInStore();
LogUtil.info(Name + logN + ",当前出库中 BS_03_WaitEmptyAgv,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_DoorOpen);
InOutStoreLog("送出料架等待空车" + MoveInfo.SLog + ":agv到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true; return true;
} }
} }
else if (storeRunStatus.Equals(StoreRunStatus.Runing) && else
MoveInfo.MoveType.Equals(StoreMoveType.None) && {
IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW)) LogUtil.info(Name + logN + " ,未找到相关处理");
{
//agv到达,开始处理
if (rfid.Equals(""))
{
LogUtil.error(Name + logN + " ,RFID无效,不需要入库处理");
return false;
}
LogUtil.info(Name + logN + " ,检测到料架,开始料架入库");
StartShelfInStore();
return true;
} }
return false; return false;
......
...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 通知AGV准备空车 /// 通知AGV准备空车
/// </summary> /// </summary>
BS_03_WaitEmptyAgv = 4003, BS_03_WaitArrive = 4003,
/// <summary> /// <summary>
/// 送出空料架:打开仓门 /// 送出空料架:打开仓门
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!