Commit 672bcc80 张东亮

页面刷新问题

1 个父辈 00ced36a
...@@ -18,13 +18,17 @@ ...@@ -18,13 +18,17 @@
</layout> </layout>
</appender> </appender>
<appender name="LineWebService" type="log4net.Appender.RollingFileAppender"> <appender name="LineWebService" type="log4net.Appender.RollingFileAppender">
<file value="logs/LineWebService.log"/> <file value="logs/UnlockInfo.log"/>
<param name="Encoding" value="UTF-8"/> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/> <appendToFile value="true"/>
<rollingStyle value="Date"/> <param name="MaxSizeRollBackups" value="10" />
<datePattern value="yyyy-MM-dd"/> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="100MB" />
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/> <conversionPattern value="[%date]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<logger name ="LineWebService"> <logger name ="LineWebService">
......
...@@ -629,14 +629,14 @@ namespace AGVControl ...@@ -629,14 +629,14 @@ namespace AGVControl
{ {
nodeName = FullShelfDestInfo.location; nodeName = FullShelfDestInfo.location;
Common.GetLineNameByNodeName(nodeName, out string line); Common.GetLineNameByNodeName(nodeName, out string line);
Common.LogInfo("A6出满料架的产线有空料架,优先处理 " + FullShelfDestInfo.ShowInfo(line)); Common.log.Debug("A6出满料架的产线有空料架,优先处理 " + FullShelfDestInfo.ShowInfo(line));
return true; return true;
} }
else if (FullShelfDestInfo.location.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP)) else if (FullShelfDestInfo.location.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP))
{ {
nodeName = FullShelfDestInfo.location; nodeName = FullShelfDestInfo.location;
Common.GetLineNameByNodeName(nodeName, out string line); Common.GetLineNameByNodeName(nodeName, out string line);
Common.LogInfo("A6出满料架的产线有空料架,优先处理 " + FullShelfDestInfo.ShowInfo(line)); Common.log.Debug("A6出满料架的产线有空料架,优先处理 " + FullShelfDestInfo.ShowInfo(line));
return true; return true;
} }
...@@ -646,7 +646,7 @@ namespace AGVControl ...@@ -646,7 +646,7 @@ namespace AGVControl
{ {
if (FullShelfDestInfo != null) if (FullShelfDestInfo != null)
{ {
Common.LogInfo("A6的出料信息不正确,请检查:" + FullShelfDestInfo.ShowInfo("ERROR")); Common.log.Error("A6的出料信息不正确,请检查:" + FullShelfDestInfo.ShowInfo("ERROR"));
//return false; //return false;
} }
} }
...@@ -667,13 +667,13 @@ namespace AGVControl ...@@ -667,13 +667,13 @@ namespace AGVControl
if (loc.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(agv.IP)) if (loc.StartsWith(SettingString.C4_Name_Prefix) && SettingString.C4_AGV_IPs.Contains(agv.IP))
{ {
nodeName = loc; nodeName = loc;
Common.LogInfo("双层线正在出的工单目标产线有空料架,优先处4C-" + loc); //Common.LogInfo("双层线正在出的工单目标产线有空料架,优先处4C-" + loc);
return true; return true;
} }
else if (loc.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP)) else if (loc.StartsWith(SettingString.D4_Name_Prefix) && !SettingString.C4_AGV_IPs.Contains(agv.IP))
{ {
nodeName = loc; nodeName = loc;
Common.LogInfo("双层线正在出的工单目标产线有空料架,优先处理4D-" + loc); Common.log.Debug("双层线正在出的工单目标产线有空料架,优先处理4D-" + loc);
return true; return true;
} }
} }
...@@ -874,7 +874,8 @@ namespace AGVControl ...@@ -874,7 +874,8 @@ namespace AGVControl
{ {
// if (warnMsg.Equals("")) // if (warnMsg.Equals(""))
{ {
warnMsg = string.Format("料架[{0}]在接驳台[{1}]最外侧,但没有解绑信息,请检查", clientNode.RFID, clientNode.Name); string res = AGVManager.GetRFIDs(clientNode.Name);
warnMsg = string.Format("[{1}]最外侧是料架[{0}],但没有解绑信息,请检查接驳台:料架由里到外顺序:{2}", clientNode.RFID, clientNode.Name,res);
Common.LogInfo(warnMsg); Common.LogInfo(warnMsg);
} }
return false; return false;
......
...@@ -77,11 +77,16 @@ namespace AGVControl.BLL ...@@ -77,11 +77,16 @@ namespace AGVControl.BLL
{ {
if (NodeStateInProcess) return; if (NodeStateInProcess) return;
NodeStateInProcess = true; NodeStateInProcess = true;
List<AlarmMsg> msglist = new List<AlarmMsg>();
try try
{ {
String tmp = ""; String tmp = "";
for (int j = 0; j < Common.nodeInfo.Count; j++) for (int j = 0; j < Common.nodeInfo.Count; j++)
{ {
if (!Common.nodeInfo[j].Online)
{
msglist.Add(new AlarmMsg(Common.nodeInfo[j].AliceName, "lineAgv." + Common.nodeInfo[j].Name + ".OffLine", "离线"));
}
if (Common.nodeInfo[j].Name.StartsWith(SettingString.D4_Name_Prefix) || Common.nodeInfo[j].Name.StartsWith(SettingString.C4_Name_Prefix)) if (Common.nodeInfo[j].Name.StartsWith(SettingString.D4_Name_Prefix) || Common.nodeInfo[j].Name.StartsWith(SettingString.C4_Name_Prefix))
{ {
if (!Common.nodeInfo[j].Name.Equals(SettingString.C4FeederIn) && !Common.nodeInfo[j].Name.Equals(SettingString.C4FeederOut) && if (!Common.nodeInfo[j].Name.Equals(SettingString.C4FeederIn) && !Common.nodeInfo[j].Name.Equals(SettingString.C4FeederOut) &&
...@@ -111,6 +116,7 @@ namespace AGVControl.BLL ...@@ -111,6 +116,7 @@ namespace AGVControl.BLL
} }
} }
} }
AGVManager.updateDeviceAlarmMsg(msglist);
} }
catch(Exception ex) catch(Exception ex)
{ {
...@@ -119,29 +125,19 @@ namespace AGVControl.BLL ...@@ -119,29 +125,19 @@ namespace AGVControl.BLL
NodeStateInProcess = false; NodeStateInProcess = false;
} }
private bool AgvStateInProcess = false; private bool AgvStateInProcess = false;
private eAGVState preAGVState = eAGVState.None; //private eAGVState preAGVState = eAGVState.None;
private void AgvStateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void AgvStateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
bool rtn; bool rtn;
if (AgvStateInProcess) return; if (AgvStateInProcess) return;
AgvStateInProcess = true; AgvStateInProcess = true;
List<AlarmMsg> msglist = new List<AlarmMsg>(); List<AlarmMsg> msglist = new List<AlarmMsg>();
String tmp = "";
for (int j = 0; j < Common.nodeInfo.Count; j++)
{
if (!Common.nodeInfo[j].Online)
{
msglist.Add(new AlarmMsg(Common.nodeInfo[j].AliceName, "lineAgv." + Common.nodeInfo[j].Name + ".OffLine", "离线"));
}
}
AGVManager.updateDeviceAlarmMsg(msglist);
for (int i = 0; i < Common.agvInfo.Count; i++) for (int i = 0; i < Common.agvInfo.Count; i++)
{ {
//上报异常 //上报异常
bool isAlarm = false; bool isAlarm = false;
if (msglist.Count > 0) //if (msglist.Count > 0)
msglist.Clear(); // msglist.Clear();
try try
{ {
if (!CheckOnline(i)) continue; if (!CheckOnline(i)) continue;
...@@ -153,18 +149,16 @@ namespace AGVControl.BLL ...@@ -153,18 +149,16 @@ namespace AGVControl.BLL
Thread.Sleep(50); Thread.Sleep(50);
if (rtn) change = Common.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position); if (rtn) change = Common.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position);
//更新状态stateID.Equals(eAGVState.Executing) // if (change)
if (change)
{ {
AgvChanged?.Invoke(i); AgvChanged?.Invoke(i);
} }
Common.log.Debug("获取AGV状态");
Thread.Sleep(50); Thread.Sleep(50);
rtn = Common.mir.Get_IO_Status(Common.agvInfo[i], out bool[] input, out bool[] output); //rtn = Common.mir.Get_IO_Status(Common.agvInfo[i], out bool[] input, out bool[] output);
Common.log.Debug("获取IO状态"); //Common.log.Debug("获取IO状态");
preAGVState = Common.agvInfo[i].StateID; //preAGVState = Common.agvInfo[i].StateID;
if (Common.agvInfo[i].StandTimeOut) if (Common.agvInfo[i].StandTimeOut)
{ {
......
...@@ -120,7 +120,7 @@ namespace BLL ...@@ -120,7 +120,7 @@ namespace BLL
else else
{ {
res = new Result() { Succeed = true, ResultData = RFID, ErrorMessage = "" }; res = new Result() { Succeed = true, ResultData = RFID, ErrorMessage = "" };
Log.Info(string.Format("Unlock Request(GET) [emptyStation={0},rfid={1}]", line, RFID)); Log.Info(string.Format("Unlock Request(GET) [emptyStation={0},rfid={1}]", line, RFID.ToUpper()));
Common.LogInfo("任务[GET]:" + value + " 出空料架 [emptyStation=" + line + ",rfid=" + RFID.ToUpper() + "]"); Common.LogInfo("任务[GET]:" + value + " 出空料架 [emptyStation=" + line + ",rfid=" + RFID.ToUpper() + "]");
} }
} }
......
...@@ -27,7 +27,7 @@ namespace AGVControl ...@@ -27,7 +27,7 @@ namespace AGVControl
{ {
if (item.Name.StartsWith("A") || item.Name.Equals(SettingString.D4FeederIn) || item.Name.Equals(SettingString.C4FeederIn)) if (item.Name.StartsWith("A") || item.Name.Equals(SettingString.D4FeederIn) || item.Name.Equals(SettingString.C4FeederIn))
continue; continue;
NodeUnlockMissions.Add(item.Name, new UnlockedShelf(item.Name)); NodeUnlockMissions.Add(item.Name, new UnlockedShelf());
UnlockMissions = new Dictionary<string, UnlockInfo>(); UnlockMissions = new Dictionary<string, UnlockInfo>();
} }
} }
...@@ -75,8 +75,12 @@ namespace AGVControl ...@@ -75,8 +75,12 @@ namespace AGVControl
{ {
UnlockMissions[nodeName] = new UnlockInfo(nodeName, NodeUnlockMissions[nodeName].EmptyCnt, NodeUnlockMissions[nodeName].GetRfidWithTime()); UnlockMissions[nodeName] = new UnlockInfo(nodeName, NodeUnlockMissions[nodeName].EmptyCnt, NodeUnlockMissions[nodeName].GetRfidWithTime());
WriteUnlockLineInfo(); WriteUnlockLineInfo();
Common.WriteIni(nodeName, SettingString.EmptyShelfCnt, NodeUnlockMissions[nodeName].EmptyCnt.ToString());
Common.LogInfo(string.Format("{0}解绑任务添加成功:RFID={1}", nodeName, rfid));
MissionChanged?.Invoke(UnlockMissions); MissionChanged?.Invoke(UnlockMissions);
} }
else
Common.LogInfo(string.Format("{0}解绑任务添加失败:RFID={1}", nodeName, rfid));
return rtn; return rtn;
} }
public bool DelMission(string nodeName, string rfid) public bool DelMission(string nodeName, string rfid)
...@@ -86,8 +90,12 @@ namespace AGVControl ...@@ -86,8 +90,12 @@ namespace AGVControl
{ {
UnlockMissions[nodeName] = new UnlockInfo(nodeName, NodeUnlockMissions[nodeName].EmptyCnt, NodeUnlockMissions[nodeName].GetRfidWithTime()); UnlockMissions[nodeName] = new UnlockInfo(nodeName, NodeUnlockMissions[nodeName].EmptyCnt, NodeUnlockMissions[nodeName].GetRfidWithTime());
WriteUnlockLineInfo(); WriteUnlockLineInfo();
Common.WriteIni(nodeName, SettingString.EmptyShelfCnt, NodeUnlockMissions[nodeName].EmptyCnt.ToString());
Common.LogInfo(string.Format("{0}解绑任务删除成功:RFID={1}", nodeName, rfid));
MissionChanged?.Invoke(UnlockMissions); MissionChanged?.Invoke(UnlockMissions);
} }
else
Common.LogInfo(string.Format("{0}解绑任务删除失败:RFID={1}", nodeName, rfid));
return rtn; return rtn;
} }
/// <summary> /// <summary>
......
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
this.DgvAgv.Size = new System.Drawing.Size(1105, 141); this.DgvAgv.Size = new System.Drawing.Size(1105, 141);
this.DgvAgv.TabIndex = 3; this.DgvAgv.TabIndex = 3;
this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick); this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick);
this.DgvAgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellContentClick);
// //
// Column1 // Column1
// //
...@@ -713,7 +714,7 @@ ...@@ -713,7 +714,7 @@
// //
// btnClearStationRFID // btnClearStationRFID
// //
this.btnClearStationRFID.Location = new System.Drawing.Point(161, 67); this.btnClearStationRFID.Location = new System.Drawing.Point(151, 91);
this.btnClearStationRFID.Margin = new System.Windows.Forms.Padding(2); this.btnClearStationRFID.Margin = new System.Windows.Forms.Padding(2);
this.btnClearStationRFID.Name = "btnClearStationRFID"; this.btnClearStationRFID.Name = "btnClearStationRFID";
this.btnClearStationRFID.Size = new System.Drawing.Size(125, 35); this.btnClearStationRFID.Size = new System.Drawing.Size(125, 35);
...@@ -740,10 +741,10 @@ ...@@ -740,10 +741,10 @@
// //
// btnUpdateStatus // btnUpdateStatus
// //
this.btnUpdateStatus.Location = new System.Drawing.Point(8, 102); this.btnUpdateStatus.Location = new System.Drawing.Point(151, 23);
this.btnUpdateStatus.Margin = new System.Windows.Forms.Padding(2); this.btnUpdateStatus.Margin = new System.Windows.Forms.Padding(2);
this.btnUpdateStatus.Name = "btnUpdateStatus"; this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(125, 39); this.btnUpdateStatus.Size = new System.Drawing.Size(125, 35);
this.btnUpdateStatus.TabIndex = 41; this.btnUpdateStatus.TabIndex = 41;
this.btnUpdateStatus.Text = "物料状态上报"; this.btnUpdateStatus.Text = "物料状态上报";
this.btnUpdateStatus.UseVisualStyleBackColor = true; this.btnUpdateStatus.UseVisualStyleBackColor = true;
...@@ -751,7 +752,7 @@ ...@@ -751,7 +752,7 @@
// //
// btnGetStationRfid // btnGetStationRfid
// //
this.btnGetStationRfid.Location = new System.Drawing.Point(161, 23); this.btnGetStationRfid.Location = new System.Drawing.Point(8, 91);
this.btnGetStationRfid.Margin = new System.Windows.Forms.Padding(2); this.btnGetStationRfid.Margin = new System.Windows.Forms.Padding(2);
this.btnGetStationRfid.Name = "btnGetStationRfid"; this.btnGetStationRfid.Name = "btnGetStationRfid";
this.btnGetStationRfid.Size = new System.Drawing.Size(125, 35); this.btnGetStationRfid.Size = new System.Drawing.Size(125, 35);
......
...@@ -403,14 +403,13 @@ namespace AGVControl ...@@ -403,14 +403,13 @@ namespace AGVControl
try try
{ {
agvRunInfo[i].Text = Common.agvInfo[i].RunInfo(); agvRunInfo[i].Text = Common.agvInfo[i].RunInfo();
Application.DoEvents();
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("显示" + Common.agvInfo[i].Name + "运行信息异常"); Common.log.Error("显示" + Common.agvInfo[i].Name + "运行信息异常");
} }
} }
Application.DoEvents();
//if (!Common.doubleLine_WO.Equals("")) //if (!Common.doubleLine_WO.Equals(""))
lblWO.Text = Common.doubleLine_WO; lblWO.Text = Common.doubleLine_WO;
// if (!AGVManager.A6_Target.Equals("")) // if (!AGVManager.A6_Target.Equals(""))
...@@ -668,19 +667,52 @@ namespace AGVControl ...@@ -668,19 +667,52 @@ namespace AGVControl
{ {
if (txtBoxLineName.Text.Equals("")) if (txtBoxLineName.Text.Equals(""))
return; return;
string res = AGVManager.GetRFIDs(txtBoxLineName.Text.ToUpper()); try
this.Invoke(new Action(() => { label11.Text = string.Format("由里到外料架顺序:{0}", res); })); {
Task.Factory.StartNew(new Action(() => {
string res = AGVManager.GetRFIDs(txtBoxLineName.Text.ToUpper());
this.Invoke(new Action(() => { label11.Text = string.Format("由里到外料架顺序:{0}", res); }));
}));
}
catch { }
} }
private void btnClearStationRFID_Click(object sender, EventArgs e) private void btnClearStationRFID_Click(object sender, EventArgs e)
{ {
if (!txtBoxLineName.Text.Equals("") && !txtBoxRFID.Text.Equals("")) if (!txtBoxLineName.Text.Equals("") && !txtBoxRFID.Text.Equals(""))
{ {
bool rtn = AGVManager.ClearRFID(txtBoxLineName.Text.ToUpper(), txtBoxRFID.Text.ToUpper()); try
this.Invoke(new Action(() => { label11.Text = rtn ? "清除接驳RFID成功:" + txtBoxLineName.Text + " " + txtBoxRFID.Text : "清除接驳RFID失败:" + txtBoxLineName.Text + " " + txtBoxRFID.Text; })); {
txtBoxLineName.Text = ""; Task.Factory.StartNew(new Action(() => {
txtBoxRFID.Text = ""; bool rtn = AGVManager.ClearRFID(txtBoxLineName.Text.ToUpper(), txtBoxRFID.Text.ToUpper());
this.Invoke(new Action(() => { label11.Text = rtn ? "清除接驳RFID成功:" + txtBoxLineName.Text + " " + txtBoxRFID.Text : "清除接驳RFID失败:" + txtBoxLineName.Text + " " + txtBoxRFID.Text; }));
txtBoxLineName.Text = "";
txtBoxRFID.Text = "";
Common.LogInfo(rtn ? "手动清除接驳RFID成功:" + txtBoxLineName.Text + " " + txtBoxRFID.Text : "手动清除接驳RFID失败:" + txtBoxLineName.Text + " " + txtBoxRFID.Text);
}));
}
catch { }
} }
} }
/// <summary>
/// 点击小车状态刷新
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DgvAgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
Invoke(new Action(() =>
{
try
{
for (int i = 0; i < Common.agvInfo.Count; i++)
{
DgvAgv.Rows[i].SetValues(Common.agvInfo[i].ToRow());
}
}
catch { }
}));
}
} }
} }
...@@ -195,27 +195,10 @@ namespace AGVControl ...@@ -195,27 +195,10 @@ namespace AGVControl
else else
return string.Format("设备:{1}{0}RFID:{2}{0}任务信息:[任务名称={3}][任务状态={4}]{0}当前步骤:{5}{0}执行信息:{6}", return string.Format("设备:{1}{0}RFID:{2}{0}任务信息:[任务名称={3}][任务状态={4}]{0}当前步骤:{5}{0}执行信息:{6}",
"\r\n", Name, RFID, curJobTaskName, curJobTaskState, Msg, MissionText); "\r\n", Name, RFID, curJobTaskName, curJobTaskState, Msg, MissionText);
//if (RFID.StartsWith("C"))
//{
// return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}BoxDestInfo:{8}{0}GetRack:{9}{0}MissionText:{10}",
// "\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, BoxDestInfo, BLL.AGVManager.GetRackBy(RFID), MissionText);
//}
//else if (RFID.StartsWith("D"))
//{
// return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}BoxDestInfo:{8}{0}MissionText:{9}",
// "\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, BoxDestInfo, MissionText);
//}
//else
// return string.Format("Name:{1}{0}RFID:{2}{0}CurJob:{3}{0}CurJobTaskInfo:[TaskName={4}][TaskID={5}][TaskState={6}]{0}RunInfo:{7}{0}MissionText:{8}",
// "\r\n", Name, RFID, CurJob.ToString(), curJobTaskName, curJobTaskID, curJobTaskState, Msg, MissionText);
} }
else else
return string.Format("设备:{1}{0}RFID:{2}{0}任务信息:[任务名称={3}][任务状态={4}]{0}执行信息:{5}", return string.Format("设备:{1}{0}RFID:{2}{0}任务信息:[任务名称={3}][任务状态={4}]{0}执行信息:{5}",
"\r\n", Name, RFID, curJobTaskName, curJobTaskState, MissionText); "\r\n", Name, RFID, curJobTaskName, curJobTaskState, MissionText);
//return string.Format("Name:{1}{0}RFID:{2}{0}CurTaskInfo:[TaskName={3}][TaskID={4}][TaskState={5}]{0}MissionText:{6}",
// "\r\n", Name, RFID, curJobTaskName, curJobTaskID, curJobTaskState, MissionText);
} }
/// <summary> /// <summary>
/// 任务重发 /// 任务重发
......
...@@ -12,9 +12,8 @@ namespace AGVControl ...@@ -12,9 +12,8 @@ namespace AGVControl
/// 已解绑料架信息 /// 已解绑料架信息
/// </summary> /// </summary>
/// <param name="nodeName"></param> /// <param name="nodeName"></param>
public UnlockedShelf(string nodeName) public UnlockedShelf()
{ {
this.NodeName = nodeName;
Rfids = new Dictionary<string, string>(); Rfids = new Dictionary<string, string>();
} }
/// <summary> /// <summary>
...@@ -56,19 +55,8 @@ namespace AGVControl ...@@ -56,19 +55,8 @@ namespace AGVControl
System.Threading.Interlocked.Increment(ref tmp); System.Threading.Interlocked.Increment(ref tmp);
EmptyCnt = tmp; EmptyCnt = tmp;
Rfids.Add(rfid, DateTime.Now.ToString("yyyy/MM/dd/HH:mm:ss,fff")); Rfids.Add(rfid, DateTime.Now.ToString("yyyy/MM/dd/HH:mm:ss,fff"));
Common.WriteIni(NodeName, SettingString.EmptyShelfCnt, EmptyCnt.ToString());
//using (System.IO.StreamWriter file = new System.IO.StreamWriter(Common.CONFIG_PATH + "UnlockInfo.txt"))
//{
// foreach (var item in Rfids.Keys)
// {
// file.WriteLine(string.Format("{0},{1}", Rfids[item], item));
// }
//}
Common.LogInfo(string.Format("{0}解绑任务添加成功:RFID={1}", NodeName, rfid));
return true; return true;
} }
Common.LogInfo(string.Format("{0}解绑任务添加失败:RFID={1}", NodeName, rfid));
return false; return false;
} }
/// <summary> /// <summary>
...@@ -88,16 +76,6 @@ namespace AGVControl ...@@ -88,16 +76,6 @@ namespace AGVControl
Rfids.Clear(); Rfids.Clear();
} }
//Rfids.Remove(rfid); //Rfids.Remove(rfid);
Common.WriteIni(NodeName, SettingString.EmptyShelfCnt, EmptyCnt.ToString());
//using (System.IO.StreamWriter file = new System.IO.StreamWriter(Common.CONFIG_PATH + "UnlockInfo.txt"))
//{
// foreach (var item in Rfids.Keys)
// {
// file.WriteLine(string.Format("{0},{1}", Rfids[item], item));
// }
//}
Common.LogInfo(string.Format("{0}解绑任务删除成功:RFID={1}", NodeName, rfid));
return true; return true;
} }
} }
...@@ -107,7 +85,6 @@ namespace AGVControl ...@@ -107,7 +85,6 @@ namespace AGVControl
Rfids.Clear(); Rfids.Clear();
return true; return true;
} }
Common.LogInfo(string.Format("{0}解绑任务删除失败:RFID={1}", NodeName, rfid));
return false; return false;
} }
} }
......
...@@ -62,6 +62,8 @@ namespace AGVControl ...@@ -62,6 +62,8 @@ namespace AGVControl
runInfo = "在待机位,电量充足[" + agv.Battery + "%],等待任务"; runInfo = "在待机位,电量充足[" + agv.Battery + "%],等待任务";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && Common.CheckIsInAirDoor(agvPlace)) else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && Common.CheckIsInAirDoor(agvPlace))
{ {
......
...@@ -145,13 +145,25 @@ namespace AGVControl ...@@ -145,13 +145,25 @@ namespace AGVControl
{ {
if (!Common.Check4CTarget(agv, FullShelfPlace))//未占用 if (!Common.Check4CTarget(agv, FullShelfPlace))//未占用
{ {
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE); if (Common.CheckIsInAirDoor(FullShelfPlace))
runInfo = "从临时待机位送往[" + FullShelfPlace + "][RFID=" + RFID + "]"; {
msg += runInfo; SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_AIR_DOOR);
SendFullShelfStep.Msg = msg; runInfo = "到临时待机位,去产线先过风淋门[" + FullShelfPlace + "][RFID=" + RFID + "]";
Common.DeleteStandyInfo(agv); msg += runInfo;
Common.MoveToNode(agv, FullShelfPlace); SendFullShelfStep.Msg = msg;
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); Common.DoorMission(agv, SettingString.DoorAirIn);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
else
{
SendFullShelfStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_AGV_REACH_LINE);
runInfo = "从临时待机位送往[" + FullShelfPlace + "][RFID=" + RFID + "]";
msg += runInfo;
SendFullShelfStep.Msg = msg;
Common.DeleteStandyInfo(agv);
Common.MoveToNode(agv, FullShelfPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
}
} }
} }
} }
......
...@@ -18,13 +18,17 @@ ...@@ -18,13 +18,17 @@
</layout> </layout>
</appender> </appender>
<appender name="LineWebService" type="log4net.Appender.RollingFileAppender"> <appender name="LineWebService" type="log4net.Appender.RollingFileAppender">
<file value="logs/LineWebService.log"/> <file value="logs/UnlockInfo.log"/>
<param name="Encoding" value="UTF-8"/> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/> <appendToFile value="true"/>
<rollingStyle value="Date"/> <param name="MaxSizeRollBackups" value="10" />
<datePattern value="yyyy-MM-dd"/> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="100MB" />
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/> <conversionPattern value="[%date]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<logger name ="LineWebService"> <logger name ="LineWebService">
......
{"NodeUnlockMissions":{"D1":{"NodeName":"D1","EmptyCnt":0,"Rfids":{}},"D2":{"NodeName":"D2","EmptyCnt":0,"Rfids":{}},"D3":{"NodeName":"D3","EmptyCnt":1,"Rfids":{"D3":"2020/12/05/22:50:48,047"}},"D4":{"NodeName":"D4","EmptyCnt":0,"Rfids":{}},"D5":{"NodeName":"D5","EmptyCnt":0,"Rfids":{}},"D6":{"NodeName":"D6","EmptyCnt":0,"Rfids":{}},"D8":{"NodeName":"D8","EmptyCnt":0,"Rfids":{}},"D9":{"NodeName":"D9","EmptyCnt":0,"Rfids":{}},"D10":{"NodeName":"D10","EmptyCnt":0,"Rfids":{}},"D11":{"NodeName":"D11","EmptyCnt":0,"Rfids":{}},"D12":{"NodeName":"D12","EmptyCnt":0,"Rfids":{}},"D14":{"NodeName":"D14","EmptyCnt":0,"Rfids":{}},"D15":{"NodeName":"D15","EmptyCnt":0,"Rfids":{}},"D16":{"NodeName":"D16","EmptyCnt":0,"Rfids":{}},"D22":{"NodeName":"D22","EmptyCnt":0,"Rfids":{}},"C1":{"NodeName":"C1","EmptyCnt":0,"Rfids":{}},"C2":{"NodeName":"C2","EmptyCnt":0,"Rfids":{}},"C3":{"NodeName":"C3","EmptyCnt":0,"Rfids":{}},"C4":{"NodeName":"C4","EmptyCnt":0,"Rfids":{}},"C5":{"NodeName":"C5","EmptyCnt":0,"Rfids":{}},"C6":{"NodeName":"C6","EmptyCnt":0,"Rfids":{}},"C7":{"NodeName":"C7","EmptyCnt":0,"Rfids":{}},"C8":{"NodeName":"C8","EmptyCnt":0,"Rfids":{}},"C9":{"NodeName":"C9","EmptyCnt":0,"Rfids":{}},"C10":{"NodeName":"C10","EmptyCnt":0,"Rfids":{}},"C14":{"NodeName":"C14","EmptyCnt":0,"Rfids":{}},"C15":{"NodeName":"C15","EmptyCnt":0,"Rfids":{}},"C22":{"NodeName":"C22","EmptyCnt":0,"Rfids":{}}}} {"NodeUnlockMissions":{"D1":{"NodeName":"D1","EmptyCnt":0,"Rfids":{}},"D2":{"NodeName":"D2","EmptyCnt":1,"Rfids":{"D4":"2020/12/06/11:51:42,731"}},"D3":{"NodeName":"D3","EmptyCnt":1,"Rfids":{"D3":"2020/12/05/22:50:48,047"}},"D4":{"NodeName":"D4","EmptyCnt":0,"Rfids":{}},"D5":{"NodeName":"D5","EmptyCnt":0,"Rfids":{}},"D6":{"NodeName":"D6","EmptyCnt":0,"Rfids":{}},"D8":{"NodeName":"D8","EmptyCnt":0,"Rfids":{}},"D9":{"NodeName":"D9","EmptyCnt":0,"Rfids":{}},"D10":{"NodeName":"D10","EmptyCnt":0,"Rfids":{}},"D11":{"NodeName":"D11","EmptyCnt":0,"Rfids":{}},"D12":{"NodeName":"D12","EmptyCnt":0,"Rfids":{}},"D14":{"NodeName":"D14","EmptyCnt":0,"Rfids":{}},"D15":{"NodeName":"D15","EmptyCnt":0,"Rfids":{}},"D16":{"NodeName":"D16","EmptyCnt":0,"Rfids":{}},"D22":{"NodeName":"D22","EmptyCnt":0,"Rfids":{}},"C1":{"NodeName":"C1","EmptyCnt":0,"Rfids":{}},"C2":{"NodeName":"C2","EmptyCnt":0,"Rfids":{}},"C3":{"NodeName":"C3","EmptyCnt":0,"Rfids":{}},"C4":{"NodeName":"C4","EmptyCnt":0,"Rfids":{}},"C5":{"NodeName":"C5","EmptyCnt":0,"Rfids":{}},"C6":{"NodeName":"C6","EmptyCnt":0,"Rfids":{}},"C7":{"NodeName":"C7","EmptyCnt":0,"Rfids":{}},"C8":{"NodeName":"C8","EmptyCnt":0,"Rfids":{}},"C9":{"NodeName":"C9","EmptyCnt":0,"Rfids":{}},"C10":{"NodeName":"C10","EmptyCnt":0,"Rfids":{}},"C14":{"NodeName":"C14","EmptyCnt":0,"Rfids":{}},"C15":{"NodeName":"C15","EmptyCnt":0,"Rfids":{}},"C22":{"NodeName":"C22","EmptyCnt":0,"Rfids":{}}}}
...@@ -12,3 +12,5 @@ RFID= ...@@ -12,3 +12,5 @@ RFID=
RFID= RFID=
[MiR_R1580] [MiR_R1580]
RFID= RFID=
[D2]
EmptyShelfCnt=1
...@@ -71,3 +71,4 @@ E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLi ...@@ -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.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
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
E:\Neotel\Projects\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!