Commit ac0f8736 张东亮

0730

1 个父辈 7671eff8
...@@ -435,7 +435,7 @@ namespace AGVControl ...@@ -435,7 +435,7 @@ namespace AGVControl
/// <summary> /// <summary>
/// 负载 /// 负载
/// </summary> /// </summary>
public bool IsExistShelf { private set; get; } = false; public bool IsExistShelf { private set; get; } = true;
/// <summary> /// <summary>
/// 小车的状态,(从小车获取) /// 小车的状态,(从小车获取)
/// </summary> /// </summary>
......
...@@ -142,7 +142,6 @@ namespace BLL ...@@ -142,7 +142,6 @@ namespace BLL
Thread.Sleep(1500); Thread.Sleep(1500);
for (int i = 0; i < Common.agvInfo.Count; i++) for (int i = 0; i < Common.agvInfo.Count; i++)
{ {
Thread.Sleep(1000);
if (!loop) break; if (!loop) break;
if (!Common.agvInfo[i].IsCon) continue; //AGV网络连接 if (!Common.agvInfo[i].IsCon) continue; //AGV网络连接
if (!Common.agvInfo[i].IsUse) continue; //AGV是否可用 if (!Common.agvInfo[i].IsUse) continue; //AGV是否可用
...@@ -597,7 +596,7 @@ namespace BLL ...@@ -597,7 +596,7 @@ namespace BLL
return false; return false;
//A6出满料 //A6出满料
rtn = FindA6Leave(out string nextNode); rtn = FindA6Leave(out string nextNode);
if (rtn) if (rtn && !agv.IsExistShelf)
{ {
rtn = Common.mir.Add_Mission(agv, Common.agvMission["MoveA6"]); rtn = Common.mir.Add_Mission(agv, Common.agvMission["MoveA6"]);
if (rtn) if (rtn)
...@@ -877,6 +876,10 @@ namespace BLL ...@@ -877,6 +876,10 @@ namespace BLL
return; return;
} }
} }
StatusCharge(agv, true);
agv.Msg = string.Format("{0} 大料架[RFID={1}]解绑,A5、A6暂无空位,运往[{2}]", agv.Name, agv.RFID,"待机位");
Common.LogInfo(string.Format("{0} 大料架[RFID={1}]解绑,A5、A6暂无空位,运往[{2}]", agv.Name, agv.RFID, "待机位"));
} }
} }
...@@ -1054,7 +1057,10 @@ namespace BLL ...@@ -1054,7 +1057,10 @@ namespace BLL
return false; return false;
} }
} }
catch { return false; } catch (Exception ex)
{
Common.log.Error(ex.Message);
return false; }
return false; return false;
} }
...@@ -1802,11 +1808,12 @@ namespace BLL ...@@ -1802,11 +1808,12 @@ namespace BLL
} }
} }
#endregion #endregion
//if (Common.nodeInfo[i].AgvName.Equals("").Equals(false))//有小车在目标任务点,等待结束后再接任务
//{ if (Common.nodeInfo[i].Name.StartsWith("G") && Common.nodeInfo[i].AgvName.Equals("").Equals(false))//有小车在目标任务点(限制4C车间),等待结束后再接任务
// Common.LogInfo("节点[" + loc + "]当前有任务,延迟A6出满料架任务"); {
// return false; Common.LogInfo("节点[" + loc + "]当前有任务,延迟A6出满料架任务");
//} return false;
}
//检查是否有车接到满料架任务,有则不再重复分配 //检查是否有车接到满料架任务,有则不再重复分配
int id = Common.agvInfo.FindIndex(s => s.RFID == rfid); int id = Common.agvInfo.FindIndex(s => s.RFID == rfid);
......
...@@ -205,7 +205,7 @@ namespace AGVControl ...@@ -205,7 +205,7 @@ namespace AGVControl
{ {
Common.agvInfo[e.RowIndex].IsUse = !Common.agvInfo[e.RowIndex].IsUse; Common.agvInfo[e.RowIndex].IsUse = !Common.agvInfo[e.RowIndex].IsUse;
DgvAgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.agvInfo[e.RowIndex].IsUse.ToString(); DgvAgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.agvInfo[e.RowIndex].IsUse.ToString();
Common.appConfig.AppSettings.Settings[Common.agvInfo[e.RowIndex].Name].Value = Common.agvInfo[e.RowIndex].IsUse.ToString()+","+ Common.agvInfo[e.RowIndex].RFID; Common.appConfig.AppSettings.Settings[Common.agvInfo[e.RowIndex].Name].Value = Common.agvInfo[e.RowIndex].IsUse.ToString() + "," + Common.agvInfo[e.RowIndex].RFID;
Common.appConfig.Save(); Common.appConfig.Save();
} }
else if (e.ColumnIndex == 13) //清除缓存 else if (e.ColumnIndex == 13) //清除缓存
...@@ -495,7 +495,7 @@ namespace AGVControl ...@@ -495,7 +495,7 @@ namespace AGVControl
Task.Factory.StartNew(new Action(() => Task.Factory.StartNew(new Action(() =>
{ {
Common.IsAllowLeaveOrEnter = true; Common.IsAllowLeaveOrEnter = true;
Common.LogInfo("IsAllowLeaveOrEnter="+ Common.IsAllowLeaveOrEnter); Common.LogInfo("IsAllowLeaveOrEnter=" + Common.IsAllowLeaveOrEnter);
Thread.Sleep(20000); Thread.Sleep(20000);
Common.IsAllowLeaveOrEnter = false; Common.IsAllowLeaveOrEnter = false;
Common.LogInfo("IsAllowLeaveOrEnter=" + Common.IsAllowLeaveOrEnter); Common.LogInfo("IsAllowLeaveOrEnter=" + Common.IsAllowLeaveOrEnter);
...@@ -512,9 +512,41 @@ namespace AGVControl ...@@ -512,9 +512,41 @@ namespace AGVControl
if (Common.agvInfo[idx].IsCon) if (Common.agvInfo[idx].IsCon)
{ {
Common.agvInfo[idx].RFID = txtAgvRFID.Text.ToUpper(); Common.agvInfo[idx].RFID = txtAgvRFID.Text.ToUpper();
Common.LogInfo("手动设置 " + Common.agvInfo[idx].Name +" RFID="+ txtAgvRFID.Text); Common.LogInfo("手动设置 " + Common.agvInfo[idx].Name + " RFID=" + txtAgvRFID.Text);
}
}
private void btnAddMission_Click(object sender, EventArgs e)
{
try
{
if (cmbBoxLineName.SelectedItem == null || cmbBoxLineName.SelectedIndex == 0)
{
ShowEmptyTask();
return;
}
if (cmbBoxLineName.SelectedItem.ToString().StartsWith("A"))
return;
if (MessageBox.Show("确定添加产线任务[" + cmbBoxLineName.SelectedItem.ToString() + "]") == DialogResult.Cancel)
return;
if (Common.AddLinePlace(Common.agvProductionLine[cmbBoxLineName.SelectedItem.ToString()]))
{
ShowEmptyTask();
Common.LogInfo("手动添加任务成功:" + cmbBoxLineName.SelectedItem.ToString());
} }
else
{
ShowEmptyTask();
Common.LogInfo("手动添加任务失败");
} }
} }
catch (Exception ex)
{
ShowEmptyTask();
Common.log.Error("手动添加任务失败:" + ex.Message);
}
}
}
} }
...@@ -47,4 +47,3 @@ C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj ...@@ -47,4 +47,3 @@ C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.CopyComplete C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.CopyComplete
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
C:\myproject\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
...@@ -151,7 +151,6 @@ namespace BLL ...@@ -151,7 +151,6 @@ namespace BLL
catch { return false; } catch { return false; }
return false; return false;
} }
private class Msg private class Msg
{ {
public string msg { get; set; } public string msg { get; set; }
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
// //
// button6 // button6
// //
this.button6.Location = new System.Drawing.Point(676, 167); this.button6.Location = new System.Drawing.Point(735, 41);
this.button6.Name = "button6"; this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(132, 54); this.button6.Size = new System.Drawing.Size(132, 54);
this.button6.TabIndex = 9; this.button6.TabIndex = 9;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!