Commit 5c78a90f LN

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

1 个父辈 c0aa7e41
......@@ -130,8 +130,6 @@
// chbAGV
//
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.Location = new System.Drawing.Point(36, 470);
this.chbAGV.Name = "chbAGV";
......
......@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
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))
{
......
......@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
}
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.WaitList.Add(WaitResultInfo.WaitTime(30000));
//等待agv到达
......@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave["+mark+"][" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒");
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到达
......@@ -363,60 +363,30 @@ namespace OnlineStore.DeviceLibrary
#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收到后打开门
if (!action.Equals(ClientAction.Arrive))
if (action.Equals(ClientAction.Arrive))
{
LogUtil.info(Name + logN + " ,未找到相关处理");
return false;
}
//出库处理中不处理
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
//出库等待料架到达
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_00_ReadyShelf))
{
if (rfid.Equals(""))
{
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,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BI_01_DoorOpen);
InOutStoreLog("出库等待料架" + MoveInfo.SLog + " agv已到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true;
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv))
{
if (!rfid.Equals(""))
{
string mark = GetMarkInfo();
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;
else if(MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitArrive))
}
//等待空车到达
LogUtil.info(Name + logN + ",当前出库中 BS_03_WaitEmptyAgv,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_DoorOpen);
InOutStoreLog("送出料架等待空车" + MoveInfo.SLog + ":agv到达,打开入料口移门");
DoorBean.StartOpen(MoveInfo);
return true;
}
}
else if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
//agv到达,开始处理
if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW))
{
//agv到达,开始处理
if (rfid.Equals(""))
{
LogUtil.error(Name + logN + " ,RFID无效,不需要入库处理");
......@@ -426,6 +396,11 @@ namespace OnlineStore.DeviceLibrary
StartShelfInStore();
return true;
}
}
else
{
LogUtil.info(Name + logN + " ,未找到相关处理");
}
return false;
}
......
......@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 通知AGV准备空车
/// </summary>
BS_03_WaitEmptyAgv = 4003,
BS_03_WaitArrive = 4003,
/// <summary>
/// 送出空料架:打开仓门
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!