Commit c5fcf647 张东亮

0805-添加小车负载检测任务,负载情况根据进出料流程定

1 个父辈 9ff58974
正在显示 39 个修改的文件 包含 268 行增加71 行删除
...@@ -2,6 +2,5 @@ ...@@ -2,6 +2,5 @@
"ExpandedNodes": [ "ExpandedNodes": [
"" ""
], ],
"SelectedNode": "\\AGVControl-ProductionLine.sln",
"PreviewInSolutionExplorer": false "PreviewInSolutionExplorer": false
} }
\ No newline at end of file \ No newline at end of file
此文件类型无法预览
...@@ -37,11 +37,10 @@ ...@@ -37,11 +37,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AsaPL.AgvClient"> <Reference Include="AsaPL.AgvClient">
<HintPath>dll\AsaPL.AgvClient.dll</HintPath> <HintPath>..\AgvClient\bin\Debug\AsaPL.AgvClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\RC1250-FeederLineClient\dll\log4net.dll</HintPath>
<HintPath>..\..\..\DLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
<add key="AutoCharge" value="True" /> <add key="AutoCharge" value="True" />
<add key="ChargeWait" value="1" /> <add key="ChargeWait" value="1" />
<add key="ChargeThreshold" value="20,70" /> <add key="ChargeThreshold" value="20,70" />
<add key="MiR_R1763" value="True" /> <add key="MiR_R1763" value="True," />
<add key="MiR_R1764" value="False" /> <add key="MiR_R1764" value="False," />
<add key="MiR_R1767" value="False" /> <add key="MiR_R1767" value="False," />
<add key="MiR_R1768" value="False" /> <add key="MiR_R1768" value="False," />
<add key="A5" value="True" /> <add key="A5" value="True" />
<add key="A6" value="True" /> <add key="A6" value="True" />
<add key="E1" value="True" /> <add key="E1" value="True" />
......
...@@ -58,14 +58,14 @@ namespace AGVControl ...@@ -58,14 +58,14 @@ namespace AGVControl
preLog = text; preLog = text;
if (msg.Count > 25) if (msg.Count > 25)
{ {
msg.RemoveRange(0,10); msg.RemoveRange(0, 10);
} }
log.Info(text); log.Info(text);
string tmpStr=""; string tmpStr = "";
if (isShow) if (isShow)
{ {
msg.Add(string.Format("[{0}] {1}\r\n", DateTime.Now.ToString("HH:mm:ss"), text)); msg.Add(string.Format("[{0}] {1}\r\n", DateTime.Now.ToString("HH:mm:ss"), text));
msg.ForEach(s=> tmpStr+= s); msg.ForEach(s => tmpStr += s);
logTextBox.Text = tmpStr; logTextBox.Text = tmpStr;
} }
} }
...@@ -94,13 +94,13 @@ namespace AGVControl ...@@ -94,13 +94,13 @@ namespace AGVControl
{ {
int idx = Common.nodeInfo.FindIndex(s => s.Name == nodeName); int idx = Common.nodeInfo.FindIndex(s => s.Name == nodeName);
if (idx > -1) if (idx > -1)
{ {
Common.missionManager.missionList.Add(new MissionStru(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),nodeName)); Common.missionManager.missionList.Add(new MissionStru(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), nodeName));
using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt")) using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt"))
{ {
foreach (var item in Common.missionManager.missionList) foreach (var item in Common.missionManager.missionList)
{ {
file.WriteLine(string.Format("{0},{1}",item.CreateTime, item.NodeName)); file.WriteLine(string.Format("{0},{1}", item.CreateTime, item.NodeName));
} }
} }
...@@ -121,7 +121,7 @@ namespace AGVControl ...@@ -121,7 +121,7 @@ namespace AGVControl
if (idx > -1) if (idx > -1)
{ {
idx = Common.missionManager.missionList.FindIndex(s => s.NodeName == nodeName); idx = Common.missionManager.missionList.FindIndex(s => s.NodeName == nodeName);
if(idx>-1) if (idx > -1)
{ {
Common.missionManager.missionList.RemoveAt(idx); Common.missionManager.missionList.RemoveAt(idx);
using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt")) using (System.IO.StreamWriter file = new System.IO.StreamWriter(CONFIG_PATH + "LinePlace.txt"))
...@@ -353,15 +353,15 @@ namespace AGVControl ...@@ -353,15 +353,15 @@ namespace AGVControl
string[] s = new string[9]; string[] s = new string[9];
s[0] = AliceName; s[0] = AliceName;
s[1] = IP; s[1] = IP;
if (Online) // if (Online)
{ // {
s[2] = string.Format("({0},{1})", position.X.ToString("f2"), position.Y.ToString("f2")); s[2] = string.Format("({0},{1})", position.X.ToString("f2"), position.Y.ToString("f2"));
s[3] = Action.ToString(); s[3] = Action.ToString();
s[4] = RFID; s[4] = RFID;
s[5] = AgvName; s[5] = AgvName;
} // }
s[6] = Online?"在线":"离线"; s[6] = Online ? "在线" : "离线";
s[7] = IsUse?"是":"否"; s[7] = IsUse ? "是" : "否";
s[8] = "清除"; s[8] = "清除";
return s; return s;
} }
...@@ -435,7 +435,7 @@ namespace AGVControl ...@@ -435,7 +435,7 @@ namespace AGVControl
/// <summary> /// <summary>
/// 负载 /// 负载
/// </summary> /// </summary>
public bool IsExistShelf { set; get; } = true; public bool IsExistShelf { set; get; } = false;
/// <summary> /// <summary>
/// 小车的状态,(从小车获取) /// 小车的状态,(从小车获取)
/// </summary> /// </summary>
...@@ -498,7 +498,7 @@ namespace AGVControl ...@@ -498,7 +498,7 @@ namespace AGVControl
/// 任务内容 /// 任务内容
/// </summary> /// </summary>
public string Msg { get; set; } public string Msg { get; set; }
public Agv_Info(string id, string name, string ip, string authorization, string ioID, bool isUse,string rfid) public Agv_Info(string id, string name, string ip, string authorization, string ioID, bool isUse, string rfid)
{ {
ID = id; ID = id;
Name = name; Name = name;
...@@ -567,14 +567,18 @@ namespace AGVControl ...@@ -567,14 +567,18 @@ namespace AGVControl
public void GetPlace(int value) public void GetPlace(int value)
{ {
Common.log.Debug(Name + "获取PLC20值 " + value); Common.log.Debug(Name + "获取PLC20值 " + value);
if (value == 0)
if (value < 1000) {
Place = "";
PlaceState = PlaceState.None;
}
else if (value > 0 && value < 1000)
{ {
//Place = ""; //Place = "";
//PlaceState = PlaceState.None; //PlaceState = PlaceState.None;
//TaskSend = ""; //TaskSend = "";
} }
else else if (value >= 1000)
{ {
int a = value / 1000; int a = value / 1000;
int b = (value - a * 1000) / 10; int b = (value - a * 1000) / 10;
...@@ -606,7 +610,8 @@ namespace AGVControl ...@@ -606,7 +610,8 @@ namespace AGVControl
s.Add(RFID); s.Add(RFID);
s.Add(Msg); s.Add(Msg);
s.Add(MissionText); s.Add(MissionText);
s.Add(PlaceAliceName); //s.Add(PlaceAliceName);
s.Add(Place);
s.Add(PlaceState.ToString()); s.Add(PlaceState.ToString());
if (Common.nodeInfo != null && Common.nodeInfo.Count != 0) if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
{ {
...@@ -620,12 +625,12 @@ namespace AGVControl ...@@ -620,12 +625,12 @@ namespace AGVControl
} }
else else
{ {
s.AddRange(new List<string> { "", "","", "", "", "", "" }); s.AddRange(new List<string> { "", "", "", "", "", "", "" });
} }
s.Add(IsExistShelf ? "满载" : "空载"); s.Add(IsExistShelf ? "满载" : "空载");
s.Add(IsCon?"在线":"离线"); s.Add(IsCon ? "在线" : "离线");
s.Add(Battery + "%"); s.Add(Battery + "%");
s.Add(IsUse?"是":"否"); s.Add(IsUse ? "是" : "否");
s.Add("清空"); s.Add("清空");
return s.ToArray(); return s.ToArray();
...@@ -831,7 +836,7 @@ namespace AGVControl ...@@ -831,7 +836,7 @@ namespace AGVControl
/// 主动执行空架任务的小车名称 /// 主动执行空架任务的小车名称
/// </summary> /// </summary>
public string AGV_Name_EmptyTask { get; set; } = ""; public string AGV_Name_EmptyTask { get; set; } = "";
public MissionManager() public MissionManager()
{ {
missionList = new List<MissionStru>(); missionList = new List<MissionStru>();
......
...@@ -93,7 +93,7 @@ namespace BLL ...@@ -93,7 +93,7 @@ namespace BLL
if (stateText.Equals("Error") || stateText.Equals("EmergencyStop") || stateText.Equals("Pause")) if (stateText.Equals("Error") || stateText.Equals("EmergencyStop") || stateText.Equals("Pause"))
{ {
isAlarm = true; isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "agv." + Common.agvInfo[i].Name + ".Error.EmergencyStop", "agv状态 " + stateText)); msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "agv." + Common.agvInfo[i].Name + ".Error.EmergencyStop", "agv状态:" + stateText +";"+ mission_text));
} }
if (isAlarm) if (isAlarm)
BLL.AGVManager.updateDeviceAlarmMsg(msglist); BLL.AGVManager.updateDeviceAlarmMsg(msglist);
...@@ -136,12 +136,12 @@ namespace BLL ...@@ -136,12 +136,12 @@ namespace BLL
private void AgvCall() private void AgvCall()
{ {
try while (loop)
{ {
while (loop) Thread.Sleep(1000);
for (int i = 0; i < Common.agvInfo.Count; i++)
{ {
Thread.Sleep(1000); try
for (int i = 0; i < Common.agvInfo.Count; i++)
{ {
if (!loop) break; if (!loop) break;
if (!Common.agvInfo[i].IsCon) continue; //AGV网络连接 if (!Common.agvInfo[i].IsCon) continue; //AGV网络连接
...@@ -154,7 +154,7 @@ namespace BLL ...@@ -154,7 +154,7 @@ namespace BLL
continue; continue;
} }
Common.log.Debug(Common.agvInfo[i].Name + "," + Common.agvInfo[i].PlaceState + "," + Common.agvInfo[i].TaskSend); Common.log.Debug("AgvCall " + Common.agvInfo[i].Name + "," + Common.agvInfo[i].PlaceState + "," + Common.agvInfo[i].TaskSend);
switch (Common.agvInfo[i].PlaceState) switch (Common.agvInfo[i].PlaceState)
{ {
...@@ -184,12 +184,13 @@ namespace BLL ...@@ -184,12 +184,13 @@ namespace BLL
break; break;
} }
} }
catch (Exception ex)
{
Common.log.Error("AgvCall " + ex.Message + ex.StackTrace);
}
} }
} }
catch (Exception ex)
{
Common.log.Error("AgvCall " + ex.Message);
}
} }
...@@ -607,6 +608,9 @@ namespace BLL ...@@ -607,6 +608,9 @@ namespace BLL
rtn = FindA6Leave(out string nextNode); rtn = FindA6Leave(out string nextNode);
if (rtn && !agv.IsExistShelf) if (rtn && !agv.IsExistShelf)
{ {
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["CheckShelf"]);
if (!rtn)
return false;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["MoveA6"]); rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["MoveA6"]);
if (rtn) if (rtn)
{ {
...@@ -768,11 +772,28 @@ namespace BLL ...@@ -768,11 +772,28 @@ namespace BLL
bool rtn; bool rtn;
Agv_Info agv = Common.agvInfo[idx]; Agv_Info agv = Common.agvInfo[idx];
int index = FindNode(agv.Place); int index = FindNode(agv.Place);
if (agv.Place.StartsWith("J"))
{
ProcessStandyTemp(agv);
return;
}
if (index == -1) return; if (index == -1) return;
ClientNode node = Common.nodeInfo[index]; ClientNode node = Common.nodeInfo[index];
switch (agv.Place) switch (agv.Place)
{ {
case "J1":
case "J2":
case "J3":
case "J4":
case "J5":
case "J6":
case "J7":
case "J8":
Common.log.Debug(agv.Place +"MoveFinish");
//ResetNodeState(node, agv);
CheckA5A6State_SmallShelf(agv);
break;
case "A5": case "A5":
if (node.Action == ClientAction.MayEnter) if (node.Action == ClientAction.MayEnter)
{ {
...@@ -786,7 +807,7 @@ namespace BLL ...@@ -786,7 +807,7 @@ namespace BLL
{ {
rtn = Common.server.ReadyEnter(agv.Place); rtn = Common.server.ReadyEnter(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place), false);
} }
break; break;
case "A6": case "A6":
...@@ -813,7 +834,7 @@ namespace BLL ...@@ -813,7 +834,7 @@ namespace BLL
{ {
rtn = Common.server.ReadyEnter(agv.Place); rtn = Common.server.ReadyEnter(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place), false);
} }
} }
else if (node.Action == ClientAction.NeedLeave) else if (node.Action == ClientAction.NeedLeave)
...@@ -825,7 +846,7 @@ namespace BLL ...@@ -825,7 +846,7 @@ namespace BLL
} }
rtn = Common.server.ReadyLeave(agv.Place); rtn = Common.server.ReadyLeave(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place), false);
} }
else if (node.Action == ClientAction.NeedEnterLeave) else if (node.Action == ClientAction.NeedEnterLeave)
{ {
...@@ -833,13 +854,13 @@ namespace BLL ...@@ -833,13 +854,13 @@ namespace BLL
{ {
rtn = Common.server.ReadyEnter(agv.Place); rtn = Common.server.ReadyEnter(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyEnter信号", agv.Name, agv.Place), false);
} }
else else
{ {
rtn = Common.server.ReadyLeave(agv.Place); rtn = Common.server.ReadyLeave(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place), false);
} }
} }
break; break;
...@@ -925,7 +946,7 @@ namespace BLL ...@@ -925,7 +946,7 @@ namespace BLL
{ {
rtn = Common.server.ReadyEnter(agv.Place); rtn = Common.server.ReadyEnter(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}载小料架到达{1}[RFID={2}],服务器发送ReadyEnter信号", agv.Name, agv.Place, agv.RFID),false); Common.LogInfo(string.Format("{0}载小料架到达{1}[RFID={2}],服务器发送ReadyEnter信号", agv.Name, agv.Place, agv.RFID), false);
} }
else if (agv.IsExistShelf)//有负载,可能软件重启导致RFID丢失 else if (agv.IsExistShelf)//有负载,可能软件重启导致RFID丢失
{ {
...@@ -938,7 +959,7 @@ namespace BLL ...@@ -938,7 +959,7 @@ namespace BLL
{ {
rtn = Common.server.ReadyLeave(agv.Place); rtn = Common.server.ReadyLeave(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place), false);
} }
break; break;
...@@ -972,7 +993,8 @@ namespace BLL ...@@ -972,7 +993,8 @@ namespace BLL
case "G14": case "G14":
case "G15": case "G15":
case "G16": case "G16":
case "E21":
case "E22":
if (node.Action == ClientAction.MayEnter) if (node.Action == ClientAction.MayEnter)
{ {
if (agv.TaskSend == "Leave") return; if (agv.TaskSend == "Leave") return;
...@@ -993,17 +1015,16 @@ namespace BLL ...@@ -993,17 +1015,16 @@ namespace BLL
{ {
rtn = Common.server.ReadyEnter(agv.Place); rtn = Common.server.ReadyEnter(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}载小料架到达{1}[RFID={2}],服务器发送ReadyEnter信号", agv.Name, agv.Place, agv.RFID),false); Common.LogInfo(string.Format("{0}载小料架到达{1}[RFID={2}],服务器发送ReadyEnter信号", agv.Name, agv.Place, agv.RFID), false);
} }
else//其他地方到E区域,则是空车 else//其他地方到E区域,则是空车
{ {
rtn = Common.server.ReadyLeave(agv.Place); rtn = Common.server.ReadyLeave(agv.Place);
if (!rtn) return; if (!rtn) return;
Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place),false); Common.LogInfo(string.Format("{0}到达{1},服务器发送ReadyLeave信号", agv.Name, agv.Place), false);
} }
break; break;
case "E21":
case "G21": case "G21":
//Feeder区,入料 //Feeder区,入料
//if (!Common.IsAllowLeaveOrEnter) //if (!Common.IsAllowLeaveOrEnter)
...@@ -1018,8 +1039,6 @@ namespace BLL ...@@ -1018,8 +1039,6 @@ namespace BLL
} }
break; break;
case "E22":
case "G22": case "G22":
//Feeder区,出料 //Feeder区,出料
//if (!Common.IsAllowLeaveOrEnter) //if (!Common.IsAllowLeaveOrEnter)
...@@ -1038,7 +1057,23 @@ namespace BLL ...@@ -1038,7 +1057,23 @@ namespace BLL
} }
private void ProcessStandyTemp(Agv_Info agv)
{
switch (agv.Place)
{
case "J1":
case "J2":
case "J3":
case "J4":
case "J5":
case "J6":
case "J7":
case "J8":
//ResetNodeState(node, agv);
CheckA5A6State_SmallShelf(agv);
break;
}
}
/// <summary> /// <summary>
/// 获取大料架解绑情况 /// 获取大料架解绑情况
/// </summary> /// </summary>
...@@ -1844,7 +1879,7 @@ namespace BLL ...@@ -1844,7 +1879,7 @@ namespace BLL
if (Common.nodeInfo[i].Name.StartsWith("G") && Common.nodeInfo[i].AgvName.Equals("").Equals(false))//有小车在目标任务点(限制4C车间),等待结束后再接任务 if (Common.nodeInfo[i].Name.StartsWith("G") && Common.nodeInfo[i].AgvName.Equals("").Equals(false))//有小车在目标任务点(限制4C车间),等待结束后再接任务
{ {
Common.LogInfo("节点[" + loc + "]当前有任务,延迟A6出满料架任务["+rfid+"]",false); Common.LogInfo("节点[" + loc + "]当前有任务,延迟A6出满料架任务[" + rfid + "]", false);
return false; return false;
} }
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn(); this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column15 = new System.Windows.Forms.DataGridViewButtonColumn(); this.Column15 = new System.Windows.Forms.DataGridViewButtonColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnAddMission = new System.Windows.Forms.Button();
this.cmbBoxLineName = new System.Windows.Forms.ComboBox(); this.cmbBoxLineName = new System.Windows.Forms.ComboBox();
this.btnDeleteMission = new System.Windows.Forms.Button(); this.btnDeleteMission = new System.Windows.Forms.Button();
this.dgvLineMission = new System.Windows.Forms.DataGridView(); this.dgvLineMission = new System.Windows.Forms.DataGridView();
...@@ -94,7 +95,7 @@ ...@@ -94,7 +95,7 @@
this.BtnMissionReady = new System.Windows.Forms.Button(); this.BtnMissionReady = new System.Windows.Forms.Button();
this.LstAgvPlace = new System.Windows.Forms.ListBox(); this.LstAgvPlace = new System.Windows.Forms.ListBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.btnAddMission = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
...@@ -423,6 +424,16 @@ ...@@ -423,6 +424,16 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "产线任务"; this.groupBox1.Text = "产线任务";
// //
// btnAddMission
//
this.btnAddMission.Location = new System.Drawing.Point(395, 275);
this.btnAddMission.Name = "btnAddMission";
this.btnAddMission.Size = new System.Drawing.Size(100, 48);
this.btnAddMission.TabIndex = 39;
this.btnAddMission.Text = "添加任务";
this.btnAddMission.UseVisualStyleBackColor = true;
this.btnAddMission.Click += new System.EventHandler(this.btnAddMission_Click);
//
// cmbBoxLineName // cmbBoxLineName
// //
this.cmbBoxLineName.FormattingEnabled = true; this.cmbBoxLineName.FormattingEnabled = true;
...@@ -512,6 +523,7 @@ ...@@ -512,6 +523,7 @@
// //
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.button1);
this.tabPage3.Controls.Add(this.btnSetRFID); this.tabPage3.Controls.Add(this.btnSetRFID);
this.tabPage3.Controls.Add(this.txtAgvRFID); this.tabPage3.Controls.Add(this.txtAgvRFID);
this.tabPage3.Controls.Add(this.groupBox2); this.tabPage3.Controls.Add(this.groupBox2);
...@@ -827,15 +839,15 @@ ...@@ -827,15 +839,15 @@
this.tableLayoutPanel3.Size = new System.Drawing.Size(1746, 776); this.tableLayoutPanel3.Size = new System.Drawing.Size(1746, 776);
this.tableLayoutPanel3.TabIndex = 7; this.tableLayoutPanel3.TabIndex = 7;
// //
// btnAddMission // button1
// //
this.btnAddMission.Location = new System.Drawing.Point(395, 275); this.button1.Location = new System.Drawing.Point(632, 85);
this.btnAddMission.Name = "btnAddMission"; this.button1.Name = "button1";
this.btnAddMission.Size = new System.Drawing.Size(100, 48); this.button1.Size = new System.Drawing.Size(109, 44);
this.btnAddMission.TabIndex = 39; this.button1.TabIndex = 35;
this.btnAddMission.Text = "添加任务"; this.button1.Text = "设置负载信号";
this.btnAddMission.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.btnAddMission.Click += new System.EventHandler(this.btnAddMission_Click); this.button1.Click += new System.EventHandler(this.button1_Click_1);
// //
// FrmMain // FrmMain
// //
...@@ -936,6 +948,7 @@ ...@@ -936,6 +948,7 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.Button btnAddMission; private System.Windows.Forms.Button btnAddMission;
private System.Windows.Forms.Button button1;
} }
} }
...@@ -84,9 +84,11 @@ namespace AGVControl ...@@ -84,9 +84,11 @@ namespace AGVControl
private void Control_AgvChanged(int agvIndex) private void Control_AgvChanged(int agvIndex)
{ {
Invoke(new Action(() => { DgvAgv.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfo[agvIndex].StateID.Equals(12) ?Color.Red: Color.Black; }));
Invoke(new Action(() => Invoke(new Action(() =>
{ {
DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow()); DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow());
})); }));
try try
{ {
...@@ -548,5 +550,17 @@ namespace AGVControl ...@@ -548,5 +550,17 @@ namespace AGVControl
Common.log.Error("手动添加任务失败:" + ex.Message); Common.log.Error("手动添加任务失败:" + ex.Message);
} }
} }
private void button1_Click_1(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
{
Common.agvInfo[idx].IsExistShelf = !Common.agvInfo[idx].IsExistShelf;
Common.LogInfo("手动设置 " + Common.agvInfo[idx].Name + " 负载状态=" + Common.agvInfo[idx].IsExistShelf);
}
}
} }
} }
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AgvServer" type="log4net.Appender.RollingFileAppender">
<file value="logs/AgvServer.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<appender name="LineWebService" type="log4net.Appender.RollingFileAppender">
<file value="logs/LineWebService.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<logger>
<level value="Debug"/>
<appender-ref ref="LineWebService"/>
</logger>
<root>
<level value="Debug"/>
<appender-ref ref="AgvServer"/>
</root>
</log4net>
<appSettings>
<add key="ITS" value="http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIGetBoxDestInfo?boxRFID=" />
<add key="WebService" value="http://127.0.0.1/BenQMIR/Webservice/AGVService.asmx/" />
<add key="http.server" value="http://10.85.199.25/myproject/" />
<add key="FLEET" value="10.85.199.3" />
<add key="AutoCharge" value="True" />
<add key="ChargeWait" value="1" />
<add key="ChargeThreshold" value="20,70" />
<add key="MiR_R1763" value="True," />
<add key="MiR_R1764" value="False," />
<add key="MiR_R1767" value="False," />
<add key="MiR_R1768" value="False," />
<add key="A5" value="True" />
<add key="A6" value="True" />
<add key="E1" value="True" />
<add key="E2" value="True" />
<add key="E3" value="True" />
<add key="E4" value="True" />
<add key="E5" value="True" />
<add key="E6" value="True" />
<add key="E7" value="false" />
<add key="E8" value="True" />
<add key="E9" value="True" />
<add key="E10" value="True" />
<add key="E11" value="True" />
<add key="E12" value="True" />
<add key="E13" value="false" />
<add key="E14" value="True" />
<add key="E15" value="True" />
<add key="E16" value="True" />
<add key="E21" value="True" />
<add key="E22" value="True" />
<add key="G1" value="false" />
<add key="G2" value="false" />
<add key="G3" value="false" />
<add key="G4" value="false" />
<add key="G5" value="false" />
<add key="G6" value="false" />
<add key="G7" value="false" />
<add key="G8" value="false" />
<add key="G9" value="false" />
<add key="G10" value="false" />
<add key="G11" value="false" />
<add key="G12" value="false" />
<add key="G13" value="false" />
<add key="G14" value="false" />
<add key="G15" value="false" />
<add key="G16" value="false" />
<add key="G21" value="false" />
<add key="G22" value="false" />
</appSettings>
<system.serviceModel>
<services>
<!--添加服务-->
<service name="LineWebService.ClsWebService" behaviorConfiguration="CalculatorServiceBehavior">
<!--name 必须与代码中的host实例初始化的服务一样
behaviorConfiguration 行为配置 -->
<host>
<baseAddresses>
<!--添加调用服务地址-->
<add baseAddress="http://10.85.199.1/BenQMIR/Webservice/AGVService.asmx/"/>
</baseAddresses>
</host>
<!--添加契约接口 contract="WcfDemo.IService1" WcfDemo.IService1为契约接口 binding="wsHttpBinding" wsHttpBinding为通过Http调用-->
<endpoint address="" binding="wsHttpBinding" contract="LineWebService.IWebService"></endpoint>
</service>
</services>
<!--定义CalculatorServiceBehavior的行为-->
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
\ No newline at end of file \ No newline at end of file
此文件的差异太大,无法显示。
3c8ffd86e3797a74878796235b856b8b11c5da99 a19fae3396b30dee05467fd25bbc1bf9f2e67891
...@@ -48,3 +48,6 @@ C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj ...@@ -48,3 +48,6 @@ C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.exe C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.exe
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.pdb C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\AsaPL.AgvClient.dll
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\log4net.dll
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\AsaPL.AgvClient.pdb
7f7cf6947289818288a68ab66d5fcb72219f75c1 f2c4345434d8c56490cc359d0d6ac5832ab39fd4
...@@ -20,3 +20,10 @@ C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient ...@@ -20,3 +20,10 @@ C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient.pdb C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient.pdb
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csprojAssemblyReference.cache C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csprojAssemblyReference.cache
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csproj.CoreCompileInputs.cache C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csproj.CoreCompileInputs.cache
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\bin\Debug\AsaPL.AgvClient.dll
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\bin\Debug\AsaPL.AgvClient.pdb
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csprojAssemblyReference.cache
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csproj.CoreCompileInputs.cache
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AgvClient.csproj.CopyComplete
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient.dll
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AgvClient\obj\Debug\AsaPL.AgvClient.pdb
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!