Commit faf5080b 张东亮

1

1 个父辈 e16c1872
...@@ -355,15 +355,16 @@ namespace DeviceLibrary ...@@ -355,15 +355,16 @@ namespace DeviceLibrary
SetKanban(); SetKanban();
if (!Control.CheckOnline(this)) return; if (!Control.CheckOnline(this)) return;
//获取AGV状态 //获取AGV状态
MiR_API.Get_State(this, out eAGVState stateID, out string stateText, out int battery, out string mission_text, out AgvInfo.MirPosition position, out List<Mir_Error> errors); bool rtn = MiR_API.Get_State(this, out eAGVState stateID, out string stateText, out int battery, out string mission_text, out AgvInfo.MirPosition position, out List<Mir_Error> errors);
Thread.Sleep(50); bool rtn1 = MiR_API.Get_Task_State(this);
SetState(stateID, battery, mission_text, position, errors); if (rtn && rtn1)
SetState(stateID, battery, mission_text, position, errors);
if (!TaskRunState.IsAllocatingTask && Auto && CurJob != null && TaskRunState.TaskID.Equals(-1) if (!TaskRunState.IsAllocatingTask && Auto && CurJob != null && TaskRunState.TaskID.Equals(-1)
&& TaskRunState.Task != null && !string.IsNullOrEmpty(TaskRunState.Task.Guid)) && TaskRunState.Task != null && !string.IsNullOrEmpty(TaskRunState.Task.Guid))
{ {
if (!MiR_API.Get_MissionByDescrp(this)) if (!MiR_API.Get_MissionByDescrp(this))
{ {
if(AgvTaskManager.IsExistTask(TaskRunState.Task.Name, this)) if (AgvTaskManager.IsExistTask(TaskRunState.Task.Name, this))
{ {
LogUtil.info($"{Name}:Task=-1处理,Fleet无任务,重发任务:{TaskRunState.Task.Name},{TaskRunState.Task.Guid}"); LogUtil.info($"{Name}:Task=-1处理,Fleet无任务,重发任务:{TaskRunState.Task.Name},{TaskRunState.Task.Guid}");
CurJob?.ResendTask(this); CurJob?.ResendTask(this);
...@@ -377,7 +378,6 @@ namespace DeviceLibrary ...@@ -377,7 +378,6 @@ namespace DeviceLibrary
//if ((agv.CurJob != null && !(agv.CurJob is ChargeJob || agv.CurJob is StandyJob)) //if ((agv.CurJob != null && !(agv.CurJob is ChargeJob || agv.CurJob is StandyJob))
// && (AGVManager.agvInfo[i].StateID.Equals(eAGVState.Executing))) // && (AGVManager.agvInfo[i].StateID.Equals(eAGVState.Executing)))
{ {
MiR_API.Get_Task_State(this);
Thread.Sleep(50); Thread.Sleep(50);
MiR_API.Get_IO_Status(this); MiR_API.Get_IO_Status(this);
} }
...@@ -398,7 +398,7 @@ namespace DeviceLibrary ...@@ -398,7 +398,7 @@ namespace DeviceLibrary
public List<string> RunInfos; public List<string> RunInfos;
DateTime IoStartTime = DateTime.MaxValue; DateTime IoStartTime = DateTime.MaxValue;
int IoLastTime = 5000; int IoLastTime = 5000;
int StandLastTimeMinute = AppConfigHelper.GetIntValue(SettingString.StandTimeout,6); int StandLastTimeMinute = AppConfigHelper.GetIntValue(SettingString.StandTimeout, 6);
public DateTime StandStartTime = DateTime.MaxValue; public DateTime StandStartTime = DateTime.MaxValue;
public bool SetState(eAGVState stateID, int battery, string missionText, MirPosition position, List<Mir_Error> mir_Errors) public bool SetState(eAGVState stateID, int battery, string missionText, MirPosition position, List<Mir_Error> mir_Errors)
{ {
...@@ -688,7 +688,7 @@ namespace DeviceLibrary ...@@ -688,7 +688,7 @@ namespace DeviceLibrary
Common.LogUtil.error(Name + "上报小车运行步骤失败" + ex.Message + ex.StackTrace); Common.LogUtil.error(Name + "上报小车运行步骤失败" + ex.Message + ex.StackTrace);
} }
} }
HttpManager.updateDeviceAlarmMsg(Httpserver,msglist); HttpManager.updateDeviceAlarmMsg(Httpserver, msglist);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!