Commit 7a189a4d 张东亮

解决空车返回时未检测满料目的地是否有空架

1 个父辈 fb6546a8
......@@ -51,13 +51,13 @@ namespace AGVControl
{
string msg = agv.Name + " ";
bool rtn = false;
agv.Msg = "返回任务:"+runInfo;
// runInfo = "返回任务:";
agv.Msg = "返回任务:" + runInfo;
// runInfo = "返回任务:";
CurTaskState = Common.GetTakJobState(CurTaskID);
if (EmptyAGVBackStep.IsStep(EMPTY_AGV_BACK_STEP.NONE))
{
if (Common.FindEmptyShelfNode(agv, out string nodeName, true))
{
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)s.CurJob).EmptyShelfPlace.Equals(nodeName));
if (i == -1)
{
......@@ -187,7 +187,23 @@ namespace AGVControl
}
else
{
if (Common.FindFullShelfTask(agv))
if (Common.FindEmptyShelfNode(agv, out string nodeName, true))
{
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)s.CurJob).EmptyShelfPlace.Equals(nodeName));
if (i == -1)
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
if (Common.CheckStationState(clientNode, out string rfid))
{
runInfo = "小车在产线 " + agvPlace + " 准备返回时检测到 " + nodeName + " 有空料架";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new GoEmptyShelfLineJob(agvPlace, nodeName, rfid);
}
}
}
else if (Common.FindFullShelfTask(agv))
{
runInfo = "从产线" + agvPlace + "回待机位过程中,检测到A6出满料,去A6";
msg += runInfo;
......@@ -215,20 +231,36 @@ namespace AGVControl
CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{
if (Common.FindFullShelfTask(agv))
if (Common.FindEmptyShelfNode(agv, out string nodeName, true))
{
runInfo = "从产线" + agvPlace + "到达4D门,检测到A6出满料,去A6";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new GoFullShelfStationJob(SettingString.DoorCToD);
int i = Common.agvInfo.FindIndex(s => s.CurJob is GoEmptyShelfLineJob && ((GoEmptyShelfLineJob)s.CurJob).EmptyShelfPlace.Equals(nodeName));
if (i == -1)
{
ClientNode clientNode = Common.nodeInfo.Find(s => s.Name.Equals(nodeName));
if (Common.CheckStationState(clientNode, out string rfid))
{
runInfo = "小车在产线 " + agvPlace + " 准备返回时检测到 " + nodeName + " 有空料架";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new GoEmptyShelfLineJob(agvPlace, nodeName, rfid);
}
}
}
else
else if (Common.FindFullShelfTask(agv))
{
runInfo = "从产线" + agvPlace + "到达4D门,暂无任务,去充电位";
runInfo = "从产线" + agvPlace + "到达4D门,检测到A6出满料,去A6";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new ChargeJob(SettingString.DoorCToD);
return new GoFullShelfStationJob(SettingString.DoorCToD);
}
runInfo = "从产线" + agvPlace + "到达4D门,暂无任务,去充电位";
msg += runInfo;
EmptyAGVBackStep.Msg = msg;
return new ChargeJob(SettingString.DoorCToD);
}
}
return this;
......
......@@ -71,3 +71,4 @@ E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLi
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.CopyComplete
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.exe
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.pdb
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!