Commit c72e57c9 张东亮

针对发充电任务成功但小车反馈失败造成两辆车占用同一个充电桩问题修复

1 个父辈 a7562871
正在显示 50 个修改的文件 包含 74 行增加11 行删除
此文件类型无法预览
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
<!--去4C的三辆车IP地址--> <!--去4C的三辆车IP地址-->
<add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" /> <add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" />
<add key="ChargeThreshold" value="20,90" /> <add key="ChargeThreshold" value="20,90" />
<!--忽略亮灯料架的线体名,多个线体使用逗号隔开-->
<add key="IgnoreLightLines" value="D14" />
<add key="IP_4D_Light" value="10.85.196.40:8088" /> <add key="IP_4D_Light" value="10.85.196.40:8088" />
<add key="IP_4C_Light" value="10.85.197.40:8088" /> <add key="IP_4C_Light" value="10.85.197.40:8088" />
</appSettings> </appSettings>
......
...@@ -310,7 +310,7 @@ namespace AGVControl ...@@ -310,7 +310,7 @@ namespace AGVControl
{ {
if (e.RowIndex == -1) return; if (e.RowIndex == -1) return;
if (e.ColumnIndex == 7) //调用 if (e.ColumnIndex == 8) //调用
{ {
Common.nodeInfo[e.RowIndex].IsUse = !Common.nodeInfo[e.RowIndex].IsUse; Common.nodeInfo[e.RowIndex].IsUse = !Common.nodeInfo[e.RowIndex].IsUse;
DgvNode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.nodeInfo[e.RowIndex].IsUse.ToString(); DgvNode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.nodeInfo[e.RowIndex].IsUse.ToString();
...@@ -318,13 +318,12 @@ namespace AGVControl ...@@ -318,13 +318,12 @@ namespace AGVControl
Common.appConfig.Save(); Common.appConfig.Save();
DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow()); DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow());
} }
else if (e.ColumnIndex == 8) //清除缓存 else if (e.ColumnIndex == 7) //清除缓存
{ {
//清除节点缓存 //清除节点缓存
Common.LogInfo(string.Format("手动清除缓存,{0}", Common.nodeInfo[e.RowIndex].Name)); Common.LogInfo(string.Format("手动清除缓存,{0},{1}", Common.nodeInfo[e.RowIndex].Name, Common.nodeInfo[e.RowIndex].OccupiedAgv));
DgvNode.Rows[e.RowIndex].Cells[5].Value = ""; Common.nodeInfo[e.RowIndex].ResetOccupied();
Common.nodeInfo[e.RowIndex].RFID = ""; DgvNode.Rows[e.RowIndex].Cells[7].Value = "";
DgvNode.Rows[e.RowIndex].Cells[4].Value = "";
DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow()); DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow());
} }
} }
......
...@@ -171,6 +171,9 @@ ...@@ -171,6 +171,9 @@
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Agv.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
......
...@@ -22,7 +22,7 @@ namespace AGVControl ...@@ -22,7 +22,7 @@ namespace AGVControl
//不为空,且与上一个消息不一样才打印 //不为空,且与上一个消息不一样才打印
if (!value.Equals(msg)) if (!value.Equals(msg))
{ {
// Common.LogInfo(value); Common.LogInfo("RunMsg:"+value);
} }
} }
msg = value; msg = value;
......
...@@ -239,6 +239,7 @@ namespace AGVControl ...@@ -239,6 +239,7 @@ namespace AGVControl
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState)) if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
Common.ClearNodeBuff(agv.Name);
curJobStep.RecordRunLog(agv, JobName, runInfo, SettingString.DoorCToD); curJobStep.RecordRunLog(agv, JobName, runInfo, SettingString.DoorCToD);
if (Common.FindEmptyShelfNode(agv, out string nodeName, true)) if (Common.FindEmptyShelfNode(agv, out string nodeName, true))
{ {
......
...@@ -130,6 +130,7 @@ namespace AGVControl ...@@ -130,6 +130,7 @@ namespace AGVControl
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = Common.GetTakJobState(CurTaskID);
if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState)) if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
Common.ClearNodeBuff(agv.Name);
curJobStep.RecordRunLog(agv, JobName, runInfo, SettingString.DoorCToD); curJobStep.RecordRunLog(agv, JobName, runInfo, SettingString.DoorCToD);
if (Common.CheckA5A6State(agv, shelfType, out string nodeName)) if (Common.CheckA5A6State(agv, shelfType, out string nodeName))
{ {
......
...@@ -314,6 +314,7 @@ namespace AGVControl ...@@ -314,6 +314,7 @@ namespace AGVControl
runInfo = "AGV 添加任务:移动到" + EmptyShelfPlace + "[RFID=" + RFID + "]"; runInfo = "AGV 添加任务:移动到" + EmptyShelfPlace + "[RFID=" + RFID + "]";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.SetNodeOccupied(EmptyShelfPlace, agv.Name);
Common.MoveToNode(agv, EmptyShelfPlace); Common.MoveToNode(agv, EmptyShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
......
...@@ -82,6 +82,7 @@ namespace AGVControl ...@@ -82,6 +82,7 @@ namespace AGVControl
runInfo = "从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]"; runInfo = "从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.SetNodeOccupied(FullShelfPlace, agv.Name);
Common.MoveToNode(agv, FullShelfPlace); Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
...@@ -119,6 +120,7 @@ namespace AGVControl ...@@ -119,6 +120,7 @@ namespace AGVControl
runInfo = "从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]"; runInfo = "从双层线A6送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.SetNodeOccupied(FullShelfPlace, agv.Name);
Common.MoveToNode(agv, FullShelfPlace); Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
...@@ -136,6 +138,7 @@ namespace AGVControl ...@@ -136,6 +138,7 @@ namespace AGVControl
runInfo = "送往[" + FullShelfPlace + "][RFID=" + RFID + "]"; runInfo = "送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.SetNodeOccupied(FullShelfPlace, agv.Name);
Common.MoveToNode(agv, FullShelfPlace); Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
...@@ -165,6 +168,7 @@ namespace AGVControl ...@@ -165,6 +168,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DeleteStandyInfo(agv); Common.DeleteStandyInfo(agv);
Common.SetNodeOccupied(FullShelfPlace, agv.Name);
Common.MoveToNode(agv, FullShelfPlace); Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
......
...@@ -30,7 +30,10 @@ namespace AGVControl ...@@ -30,7 +30,10 @@ namespace AGVControl
return rfid; return rfid;
} }
} }
/// <summary>
/// 占用该节点的Agv
/// </summary>
public string OccupiedAgv { get; private set; } = "";
/// <summary> /// <summary>
/// 线体名(佳世达) /// 线体名(佳世达)
/// </summary> /// </summary>
...@@ -109,7 +112,7 @@ namespace AGVControl ...@@ -109,7 +112,7 @@ namespace AGVControl
public string[] ToRow() public string[] ToRow()
{ {
//节点,IP,动作,RFID,AGV名称,在线,调用,清除AGV //节点,IP,动作,RFID,AGV名称,在线,调用,清除AGV
string[] s = new string[8]; string[] s = new string[9];
s[0] = AliceName; s[0] = AliceName;
s[1] = IP; s[1] = IP;
// if (Online) // if (Online)
...@@ -121,8 +124,8 @@ namespace AGVControl ...@@ -121,8 +124,8 @@ namespace AGVControl
// s[5] = AgvName; // s[5] = AgvName;
// } // }
s[6] = Online ? "在线" : "离线"; s[6] = Online ? "在线" : "离线";
s[7] = IsUse ? "是" : "否"; s[8] = IsUse ? "是" : "否";
// s[8] = "清除"; s[7] = OccupiedAgv;
return s; return s;
} }
...@@ -140,5 +143,35 @@ namespace AGVControl ...@@ -140,5 +143,35 @@ namespace AGVControl
{ {
return null; return null;
} }
public void SetOccupy(string agvname)
{
OccupiedAgv = agvname;
Common.LogInfo($"{agvname} 占用节点 {Name}");
}
/// <summary>
/// 是否被占用
/// </summary>
/// <returns></returns>
public bool IsOccupied()
{
if (string.IsNullOrEmpty(OccupiedAgv))
return false;
return true;
}
public void ClearOccupied(string agvname)
{
if (!string.IsNullOrEmpty(OccupiedAgv))
if (OccupiedAgv.Equals(agvname))
{
OccupiedAgv = "";
Common.LogInfo($"{agvname} 释放节点 {Name}");
}
}
public void ResetOccupied()
{
OccupiedAgv = "";
Common.LogInfo($"重置节点{Name} 占用");
}
} }
} }
<!--忽略亮灯料架的线体名,多个线体使用逗号隔开-->
<add key="IgnoreLightLines" value="D14" />
\ No newline at end of file \ No newline at end of file
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
<!--去4C的三辆车IP地址--> <!--去4C的三辆车IP地址-->
<add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" /> <add key="C4_AGV_IPs" value="10.85.199.71,10.85.199.72,10.85.199.73" />
<add key="ChargeThreshold" value="20,90" /> <add key="ChargeThreshold" value="20,90" />
<!--忽略亮灯料架的线体名,多个线体使用逗号隔开-->
<add key="IgnoreLightLines" value="D14" />
<add key="IP_4D_Light" value="10.85.196.40:8088" /> <add key="IP_4D_Light" value="10.85.196.40:8088" />
<add key="IP_4C_Light" value="10.85.197.40:8088" /> <add key="IP_4C_Light" value="10.85.197.40:8088" />
</appSettings> </appSettings>
......
...@@ -22,3 +22,7 @@ EmptyShelfCnt=1 ...@@ -22,3 +22,7 @@ EmptyShelfCnt=1
EmptyShelfCnt=1 EmptyShelfCnt=1
[D13] [D13]
EmptyShelfCnt=3 EmptyShelfCnt=3
[C15]
IsUse=False
[A5]
IsUse=False
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="ProName" value="4F-AGV-LINE-针对发充电任务成功小车但反馈失败造成两辆车占用同一个充电桩问题修复" />
</appSettings>
</configuration>
\ No newline at end of file \ No newline at end of file
...@@ -71,3 +71,5 @@ E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLi ...@@ -71,3 +71,5 @@ 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.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.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.pdb
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.AssemblyReference.cache
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.SuggestedBindingRedirects.cache
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!