Commit 724c59e4 LN

增加AgvClient_EnterShelf事件处理

1 个父辈 42bbba02
此文件类型无法预览
......@@ -242,7 +242,12 @@
</member>
<member name="E:Asa.Client2.CloseDoor">
<summary>
关门
关门,仅包装料仓
</summary>
</member>
<member name="E:Asa.Client2.EnterShelf">
<summary>
准备进入料架不能出料,仅包装料仓
</summary>
</member>
<member name="E:Asa.Client2.Log">
......@@ -431,6 +436,11 @@
小车已准备,已对接上流水线
</summary>
</member>
<member name="F:Asa.ClientAction.EnterShelf">
<summary>
包装料仓只能入料不能出料
</summary>
</member>
<member name="T:Asa.ClientLevel">
<summary>
客户端的优先级
......
......@@ -58,5 +58,6 @@ agvclien增加cancelState的参数设置
BI_03_LineRun超时报警改为40秒
20200221
agv客户端启动时需要设置状态为none
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"
\ No newline at end of file
agv客户端启动时需要设置状态为none。
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"。
增加AgvClient_EnterShelf事件处理。
\ No newline at end of file
......@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary
public HumitureBean humBean = null;
private System.Timers.Timer serverConnectTimer = new System.Timers.Timer();
private System.Timers.Timer IoCheckTimer = new System.Timers.Timer();
/// <summary>
/// 是否有料架在来的路上
/// </summary>
public bool WaitShelfEnter=false;
public AC_BOX_Bean(AC_BOX_Config config)
{
Init();
......@@ -141,14 +145,6 @@ namespace OnlineStore.DeviceLibrary
return false;
}
LogInfo("开始启动,启动时间:" + StartTime.ToString());
// if (IsDebug)
//{
// //连接AGV调度
// if (!AgvClient.ISConnected())
// {
// AgvClient.Init();
// }
//}
AutoInout.StopAuto();
mainTimer.Enabled = false;
alarmType = StoreAlarmType.None;
......@@ -214,6 +210,7 @@ namespace OnlineStore.DeviceLibrary
#region 原点返回和复位处理
private void ReturnHome()
{
WaitShelfEnter = false;
lastPosId = "";
lastPosIdStatus = StoreStatus.ResetMove;
AutoInout.ClearCount();
......
......@@ -287,7 +287,8 @@ namespace OnlineStore.DeviceLibrary
else
{
LogInfo(" 空闲中,需要料架入库,料架入库 " + MoveInfo.SLog + ":入料口移门打开,");
LogInfo(" 空闲中,需要料架入库,料架入库 " + MoveInfo.SLog + ":入料口移门打开,更新 WaitShelfEnter=false");
WaitShelfEnter = false;
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(Config);
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
......@@ -739,7 +740,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,忙碌或报警中 ,storeStatus:" + storeRunStatus + ",MoveType:" + MoveInfo.MoveType + ",isInSuddenDown:" + isInSuddenDown + ",isNoAirCheck:" + isNoAirCheck);
return false;
}
if (WaitShelfEnter)
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,WaitShelfEnter=true ,需要等待入库结束才能出库");
}
if (!StoreManager.LoadInoutParam(param, false, this))
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】出错,找不到库位信息");
......
......@@ -300,21 +300,6 @@ namespace OnlineStore.DeviceLibrary
internal bool ProcessAGVAction(string name, ClientAction action)
{
string logN = name + "收到调度【" + name + "】=【" + action + "】";
//状态处理
//if (action.Equals(ClientAction.CanEnter))
//{
// //判断入口是否可用:入口无料架,缓冲工位无料架,不在入料架处理中
// bool usable = (storeRunStatus.Equals(StoreRunStatus.Runing) &&
// waitOutStoreList.Count <= 0 &&
// MoveInfo.MoveType.Equals(StoreMoveType.None) &&
// alarmType.Equals(StoreAlarmType.None)
// && IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW)
// && IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW));
// LogUtil.info(logN + ":" + usable);
// return usable;
//}
//else
//Arrive收到后打开门
if (action.Equals(ClientAction.Arrive))
......@@ -324,11 +309,7 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
//if (IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW))
//{
// LogUtil.info(logN + " ,未检测到:LineIn_Check,不处理");
// return false;
//}
//agv到达,开始处理
if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
......
......@@ -31,6 +31,7 @@ namespace OnlineStore.DeviceLibrary
agvClient.Arrive += AgvClient_Arrive;
agvClient.Ready += AgvClient_Ready;
agvClient.CloseDoor += AgvClient_CloseDoor;
agvClient.EnterShelf += AgvClient_EnterShelf;
}
actionMap = new Dictionary<string, Asa.ClientAction>();
//foreach (string key in NodeList)
......@@ -50,6 +51,23 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("初始化agvClient " + ServerIp + " 出错:"+ ex.ToString());
}
}
private static void AgvClient_EnterShelf(string id, byte[] content)
{
RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_EnterShelf [" + id + "] [" + data.NumStr() + "] ");
StoreManager.Store.AGVProcess(id, ClientAction.Arrive);
foreach (AC_BOX_Bean box in StoreManager.Store.BoxMap.Values)
{
if (box.Config.AgvNodeName.Equals(id))
{
LogUtil.info("收到 AgvClient_EnterShelf [" + id + "] [" + data.NumStr() + "] ,设置 [" + box.Name + "] WaitShelfEnter = true");
box.WaitShelfEnter = true;
break;
}
}
}
public static void SetCancelState(bool isCancel)
{
agvClient.CancelState = isCancel;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!