Commit 94444c72 张东亮

大料架只放到左侧下层

1 个父辈 b8cdb476
...@@ -53,7 +53,7 @@ namespace AGVControl ...@@ -53,7 +53,7 @@ namespace AGVControl
MissionSys.AssignMission(Agv, SettingString.Init); MissionSys.AssignMission(Agv, SettingString.Init);
} }
//AGVManager.Standby.DelOccupyInfo(Agv); //AGVManager.Standby.DelOccupyInfo(Agv);
LogUtil.info($"{Agv.Name} 切换为手动模式");
} }
else else
{ {
...@@ -77,6 +77,7 @@ namespace AGVControl ...@@ -77,6 +77,7 @@ namespace AGVControl
Agv.Resend(); Agv.Resend();
} }
LogUtil.info($"{Agv.Name} 切换为自动模式");
} }
Agv.IsUse = chkBxAuto.Checked; Agv.IsUse = chkBxAuto.Checked;
})); }));
......
...@@ -22,7 +22,7 @@ namespace DeviceLibrary ...@@ -22,7 +22,7 @@ namespace DeviceLibrary
//不为空,且与上一个消息不一样才打印 //不为空,且与上一个消息不一样才打印
if (!value.Equals(msg)) if (!value.Equals(msg))
{ {
//LogUtil.info(value); LogUtil.info(value);
} }
} }
msg = value; msg = value;
......
...@@ -38,7 +38,7 @@ namespace DeviceLibrary ...@@ -38,7 +38,7 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public override string RunInfo public override string RunInfo
{ {
get { return string.Format("回收空料架[RFID={0}][{1}]:{2}",RFID, CurTaskID, runInfo); } get { return string.Format("回收空料架[RFID={0}][{1}]:{2}", RFID, CurTaskID, runInfo); }
} }
...@@ -53,6 +53,7 @@ namespace DeviceLibrary ...@@ -53,6 +53,7 @@ namespace DeviceLibrary
string msg = string.Format("{0} 回收空料架[RFID={1}]: ", agv.Name, RFID); string msg = string.Format("{0} 回收空料架[RFID={1}]: ", agv.Name, RFID);
//bool rtn = false; //bool rtn = false;
StartJobTime = curJobStep.startTime; StartJobTime = curJobStep.startTime;
agv.RFID = RFID;
int nodeIdx = AGVManager.FindNode(EmptyShelfPlace); int nodeIdx = AGVManager.FindNode(EmptyShelfPlace);
if (curJobStep.IsStep(TAKE_EMPTY_STEP.NONE)) if (curJobStep.IsStep(TAKE_EMPTY_STEP.NONE))
{ {
...@@ -356,7 +357,6 @@ namespace DeviceLibrary ...@@ -356,7 +357,6 @@ namespace DeviceLibrary
return this; return this;
} }
ClientNode node = AGVManager.nodeInfo[nodeIdx]; ClientNode node = AGVManager.nodeInfo[nodeIdx];
agv.RFID = node.RFID;
AGVManager.server.ReadyLeave(EmptyShelfPlace); AGVManager.server.ReadyLeave(EmptyShelfPlace);
} }
...@@ -372,7 +372,6 @@ namespace DeviceLibrary ...@@ -372,7 +372,6 @@ namespace DeviceLibrary
return this; return this;
} }
ClientNode node = AGVManager.nodeInfo[nodeIdx]; ClientNode node = AGVManager.nodeInfo[nodeIdx];
agv.RFID = node.RFID;
if (node.StateEquals(eNodeStatus.MayLeave)) if (node.StateEquals(eNodeStatus.MayLeave))
{ {
agv.HasError = false; agv.HasError = false;
...@@ -410,14 +409,11 @@ namespace DeviceLibrary ...@@ -410,14 +409,11 @@ namespace DeviceLibrary
runInfo = "空料架在[" + EmptyShelfPlace + "]进入小车完成" + "[RFID=" + RFID + "]"; runInfo = "空料架在[" + EmptyShelfPlace + "]进入小车完成" + "[RFID=" + RFID + "]";
msg += string.Format("[{0}] {1}", curJobStep.CurStep(), runInfo); msg += string.Format("[{0}] {1}", curJobStep.CurStep(), runInfo);
curJobStep.Msg = msg; curJobStep.Msg = msg;
//4DfeederOut默认大料架
// if (agv.Place.Equals(SettingString.RoomDFeederOut))
// return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf);
RecordRunLog(agv, curJobStep.CurStep(), runInfo, agv.Place); RecordRunLog(agv, curJobStep.CurStep(), runInfo, agv.Place);
if (agv.RFID.StartsWith("D")) if (RFID.StartsWith("D"))
return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.SmallShelf); return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.SmallShelf);
else if (agv.RFID.StartsWith("C")) else if (RFID.StartsWith("C"))
{ {
return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf); return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf);
} }
......
...@@ -238,9 +238,9 @@ namespace DeviceLibrary ...@@ -238,9 +238,9 @@ namespace DeviceLibrary
&& (s.StateEquals(eNodeStatus.NeedD) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse); && (s.StateEquals(eNodeStatus.NeedD) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse);
if (tarIdx > -1) if (tarIdx > -1)
{ {
tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob //tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob
&& ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5)); //&& ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5));
if (tarIdx == -1) //if (tarIdx == -1)
{ {
nodeName = SettingString.A5; nodeName = SettingString.A5;
log.Debug(string.Format("{0} {1}需要小料架", agv.Name, SettingString.A5)); log.Debug(string.Format("{0} {1}需要小料架", agv.Name, SettingString.A5));
...@@ -270,9 +270,9 @@ namespace DeviceLibrary ...@@ -270,9 +270,9 @@ namespace DeviceLibrary
&& (s.StateEquals(eNodeStatus.NeedC) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse); && (s.StateEquals(eNodeStatus.NeedC) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse);
if (tarIdx > -1) if (tarIdx > -1)
{ {
tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob //tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob
&& ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5)); // && ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5));
if (tarIdx == -1) //if (tarIdx == -1)
{ {
nodeName = SettingString.A5; nodeName = SettingString.A5;
log.Debug(string.Format("{0} {1}需要大料架", agv.Name, SettingString.A5)); log.Debug(string.Format("{0} {1}需要大料架", agv.Name, SettingString.A5));
...@@ -551,18 +551,18 @@ namespace DeviceLibrary ...@@ -551,18 +551,18 @@ namespace DeviceLibrary
if (idx > -1) if (idx > -1)
{ {
nodeName = nodeInfo[idx].Name; nodeName = nodeInfo[idx].Name;
log.Debug(agv.Name + " 双层线右侧需要料架,准备去4C-" + nodeName); log.Debug(agv.Name + " 双层线左侧需要大料架,准备去4C-" + nodeName);
return true; return true;
} }
} }
//4D车间备料区寻找 //4D车间备料区寻找
if (!SettingString.RoomC_AGV_IPs.Contains(agv.IP)) if (!SettingString.RoomC_AGV_IPs.Contains(agv.IP))
{ {
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.RoomDFeederOut) && !s.RFID.StartsWith("C") && s.IsUse); idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.RoomDFeederOut) && s.RFID.StartsWith("C") && s.IsUse);
if (idx > -1) if (idx > -1)
{ {
nodeName = nodeInfo[idx].Name; nodeName = nodeInfo[idx].Name;
log.Debug(agv.Name + " 双层线右侧需要料架,准备去4D-" + nodeName); log.Info(agv.Name + " 双层线左侧需要大料架,准备去4D-" + nodeName);
return true; return true;
} }
...@@ -590,11 +590,11 @@ namespace DeviceLibrary ...@@ -590,11 +590,11 @@ namespace DeviceLibrary
//4D车间备料区寻找 //4D车间备料区寻找
if (!SettingString.RoomC_AGV_IPs.Contains(agv.IP)) if (!SettingString.RoomC_AGV_IPs.Contains(agv.IP))
{ {
idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.RoomDFeederOut) && !s.RFID.StartsWith("0") && s.IsUse); idx = nodeInfo.FindIndex(s => s.EmptyShelfCnt > 0 && s.Name.Equals(SettingString.RoomDFeederOut) && s.RFID.StartsWith("D") && s.IsUse);
if (idx > -1) if (idx > -1)
{ {
nodeName = nodeInfo[idx].Name; nodeName = nodeInfo[idx].Name;
log.Debug(agv.Name + " 双层线右侧需要料架,准备去4D-" + nodeName); log.Info(agv.Name + " 双层线右侧需要料架,准备去4D-" + nodeName);
return true; return true;
} }
...@@ -866,6 +866,7 @@ namespace DeviceLibrary ...@@ -866,6 +866,7 @@ namespace DeviceLibrary
/// AGV编号 /// AGV编号
/// </summary> /// </summary>
public string AGVNum { get; set; } = ""; public string AGVNum { get; set; } = "";
public string DeviceName { get; set; } = "";
/// <summary> /// <summary>
/// 任务名称 /// 任务名称
/// </summary> /// </summary>
...@@ -942,6 +943,7 @@ namespace DeviceLibrary ...@@ -942,6 +943,7 @@ namespace DeviceLibrary
agvname = value.PadLeft(4, '0'); agvname = value.PadLeft(4, '0');
} }
} }
public string DeviceName { get; set; } = "";
private string agvname = ""; private string agvname = "";
/// <summary> /// <summary>
/// 开始时间 /// 开始时间
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!