Commit 13dd469a 张东亮

运行版

1 个父辈 3af05d87
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
......
...@@ -39,6 +39,17 @@ ...@@ -39,6 +39,17 @@
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/> <conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<appender name="AGVManager" type="log4net.Appender.RollingFileAppender">
<file value="logs/AGVManager.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<param name="MaxSizeRollBackups" value="30"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout>
</appender>
<logger name="MiR_API"> <logger name="MiR_API">
<level value="Error"/> <level value="Error"/>
<appender-ref ref="MiR_API"/> <appender-ref ref="MiR_API"/>
...@@ -47,7 +58,11 @@ ...@@ -47,7 +58,11 @@
<level value="Info"/> <level value="Info"/>
<appender-ref ref="AgvServer"/> <appender-ref ref="AgvServer"/>
</logger> </logger>
<root> <logger name="AGVManager">
<level value="Debug"/>
<appender-ref ref="AGVManager"/>
</logger>
<root name="AGV_3D_SMD">
<level value="Info"/> <level value="Info"/>
<appender-ref ref="AGV_3D_SMD"/> <appender-ref ref="AGV_3D_SMD"/>
</root> </root>
......
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panelNode = new System.Windows.Forms.Panel();
this.groupBoxNode = new System.Windows.Forms.GroupBox();
this.DgvNode = new System.Windows.Forms.DataGridView();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox();
...@@ -48,27 +58,17 @@ ...@@ -48,27 +58,17 @@
this.lblStandy3 = new System.Windows.Forms.Label(); this.lblStandy3 = new System.Windows.Forms.Label();
this.lblStandy4 = new System.Windows.Forms.Label(); this.lblStandy4 = new System.Windows.Forms.Label();
this.lblLimit = new System.Windows.Forms.Label(); this.lblLimit = new System.Windows.Forms.Label();
this.panelNode = new System.Windows.Forms.Panel();
this.groupBoxNode = new System.Windows.Forms.GroupBox();
this.DgvNode = new System.Windows.Forms.DataGridView();
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel3.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panelNode.SuspendLayout();
this.groupBoxNode.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout();
this.panelNode.SuspendLayout();
this.groupBoxNode.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tableLayoutPanel3 // tableLayoutPanel3
...@@ -110,6 +110,132 @@ ...@@ -110,6 +110,132 @@
this.tabPage1.Text = "状态显示"; this.tabPage1.Text = "状态显示";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.panelNode, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(1170, 418);
this.tableLayoutPanel2.TabIndex = 34;
//
// panelNode
//
this.panelNode.Controls.Add(this.groupBoxNode);
this.panelNode.Location = new System.Drawing.Point(3, 3);
this.panelNode.Name = "panelNode";
this.panelNode.Size = new System.Drawing.Size(723, 412);
this.panelNode.TabIndex = 0;
//
// groupBoxNode
//
this.groupBoxNode.Controls.Add(this.DgvNode);
this.groupBoxNode.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBoxNode.Location = new System.Drawing.Point(0, 0);
this.groupBoxNode.Name = "groupBoxNode";
this.groupBoxNode.Size = new System.Drawing.Size(723, 412);
this.groupBoxNode.TabIndex = 0;
this.groupBoxNode.TabStop = false;
this.groupBoxNode.Text = "节点状态";
//
// DgvNode
//
this.DgvNode.AllowUserToAddRows = false;
this.DgvNode.AllowUserToDeleteRows = false;
this.DgvNode.AllowUserToResizeColumns = false;
this.DgvNode.AllowUserToResizeRows = false;
this.DgvNode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DgvNode.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.DgvNode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.DgvNode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DgvNode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column6,
this.Column7,
this.Column10,
this.Column9,
this.Column5,
this.Column16});
this.DgvNode.Dock = System.Windows.Forms.DockStyle.Fill;
this.DgvNode.Location = new System.Drawing.Point(3, 17);
this.DgvNode.MultiSelect = false;
this.DgvNode.Name = "DgvNode";
this.DgvNode.ReadOnly = true;
this.DgvNode.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.DgvNode.RowHeadersVisible = false;
this.DgvNode.RowHeadersWidth = 50;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.DgvNode.RowsDefaultCellStyle = dataGridViewCellStyle2;
this.DgvNode.RowTemplate.Height = 23;
this.DgvNode.Size = new System.Drawing.Size(717, 392);
this.DgvNode.TabIndex = 3;
this.DgvNode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvNode_CellClick);
//
// Column6
//
this.Column6.FillWeight = 107.563F;
this.Column6.HeaderText = "地点";
this.Column6.MinimumWidth = 6;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column7
//
this.Column7.FillWeight = 107.563F;
this.Column7.HeaderText = "动作";
this.Column7.MinimumWidth = 6;
this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column10
//
this.Column10.FillWeight = 47.05883F;
this.Column10.HeaderText = "等级";
this.Column10.MinimumWidth = 6;
this.Column10.Name = "Column10";
this.Column10.ReadOnly = true;
this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column9
//
this.Column9.FillWeight = 107.563F;
this.Column9.HeaderText = "RFID";
this.Column9.MinimumWidth = 6;
this.Column9.Name = "Column9";
this.Column9.ReadOnly = true;
this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column5
//
this.Column5.FillWeight = 107.563F;
this.Column5.HeaderText = "连接";
this.Column5.MinimumWidth = 6;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column16
//
this.Column16.FillWeight = 107.563F;
this.Column16.HeaderText = "调用";
this.Column16.MinimumWidth = 6;
this.Column16.Name = "Column16";
this.Column16.ReadOnly = true;
//
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox1); this.tabPage3.Controls.Add(this.groupBox1);
...@@ -257,131 +383,6 @@ ...@@ -257,131 +383,6 @@
this.lblLimit.Size = new System.Drawing.Size(35, 12); this.lblLimit.Size = new System.Drawing.Size(35, 12);
this.lblLimit.TabIndex = 6; this.lblLimit.TabIndex = 6;
// //
// panelNode
//
this.panelNode.Controls.Add(this.groupBoxNode);
this.panelNode.Location = new System.Drawing.Point(3, 3);
this.panelNode.Name = "panelNode";
this.panelNode.Size = new System.Drawing.Size(723, 412);
this.panelNode.TabIndex = 0;
//
// groupBoxNode
//
this.groupBoxNode.Controls.Add(this.DgvNode);
this.groupBoxNode.Location = new System.Drawing.Point(0, 0);
this.groupBoxNode.Name = "groupBoxNode";
this.groupBoxNode.Size = new System.Drawing.Size(711, 412);
this.groupBoxNode.TabIndex = 0;
this.groupBoxNode.TabStop = false;
this.groupBoxNode.Text = "节点状态";
//
// DgvNode
//
this.DgvNode.AllowUserToAddRows = false;
this.DgvNode.AllowUserToDeleteRows = false;
this.DgvNode.AllowUserToResizeColumns = false;
this.DgvNode.AllowUserToResizeRows = false;
this.DgvNode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DgvNode.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.DgvNode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.DgvNode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DgvNode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column6,
this.Column7,
this.Column10,
this.Column9,
this.Column5,
this.Column16});
this.DgvNode.Dock = System.Windows.Forms.DockStyle.Fill;
this.DgvNode.Location = new System.Drawing.Point(3, 17);
this.DgvNode.MultiSelect = false;
this.DgvNode.Name = "DgvNode";
this.DgvNode.ReadOnly = true;
this.DgvNode.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.DgvNode.RowHeadersVisible = false;
this.DgvNode.RowHeadersWidth = 50;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.DgvNode.RowsDefaultCellStyle = dataGridViewCellStyle2;
this.DgvNode.RowTemplate.Height = 23;
this.DgvNode.Size = new System.Drawing.Size(705, 392);
this.DgvNode.TabIndex = 3;
this.DgvNode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvNode_CellClick);
//
// Column16
//
this.Column16.FillWeight = 107.563F;
this.Column16.HeaderText = "调用";
this.Column16.MinimumWidth = 6;
this.Column16.Name = "Column16";
this.Column16.ReadOnly = true;
//
// Column5
//
this.Column5.FillWeight = 107.563F;
this.Column5.HeaderText = "连接";
this.Column5.MinimumWidth = 6;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column9
//
this.Column9.FillWeight = 107.563F;
this.Column9.HeaderText = "RFID";
this.Column9.MinimumWidth = 6;
this.Column9.Name = "Column9";
this.Column9.ReadOnly = true;
this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column10
//
this.Column10.FillWeight = 47.05883F;
this.Column10.HeaderText = "等级";
this.Column10.MinimumWidth = 6;
this.Column10.Name = "Column10";
this.Column10.ReadOnly = true;
this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column7
//
this.Column7.FillWeight = 107.563F;
this.Column7.HeaderText = "动作";
this.Column7.MinimumWidth = 6;
this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column6
//
this.Column6.FillWeight = 107.563F;
this.Column6.HeaderText = "地点";
this.Column6.MinimumWidth = 6;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.panelNode, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(1170, 418);
this.tableLayoutPanel2.TabIndex = 34;
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -399,14 +400,14 @@ ...@@ -399,14 +400,14 @@
this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.panelNode.ResumeLayout(false);
this.groupBoxNode.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.ResumeLayout(false);
this.panelNode.ResumeLayout(false);
this.groupBoxNode.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
......
...@@ -27,7 +27,7 @@ namespace AGVControl ...@@ -27,7 +27,7 @@ namespace AGVControl
private void Manual_Load(object sender, EventArgs e) private void Manual_Load(object sender, EventArgs e)
{ {
lblInfo.Text = string.Format("[{0}]", Agv.IP); lblInfo.Text = string.Format("[{0}]", Agv.IP);
cmbBxMission.Items.AddRange(CommonVar.showNameMissionName.Keys.ToArray()); cmbBxMission.Items.AddRange(CommonVar.showNameMissionName.Values.ToArray());
cmbBxMission.SelectedIndex = 0; cmbBxMission.SelectedIndex = 0;
isInit = true; isInit = true;
} }
...@@ -40,37 +40,45 @@ namespace AGVControl ...@@ -40,37 +40,45 @@ namespace AGVControl
btnReSendTask.Enabled = chkBxAuto.Checked; btnReSendTask.Enabled = chkBxAuto.Checked;
btnAssignTask.Enabled = !chkBxAuto.Checked; btnAssignTask.Enabled = !chkBxAuto.Checked;
if (!Agv.IsCon)
{
Agv.IsUse = chkBxAuto.Checked;
return;
}
if (!chkBxAuto.Checked)//自动-》手动 if (!chkBxAuto.Checked)//自动-》手动
{ {
if (Agv.IsCon)
{
MiR_API.Del_Mission(Agv); MiR_API.Del_Mission(Agv);
CommonVar.Standby.DelOccupyInfo(Agv.Name);
CommonVar.Charge.DelOccupyInfo(Agv.Name);
//添加Init任务 //添加Init任务
Agv.AssignTask(SettingString.Init); Agv.AssignTask(SettingString.Init);
} }
CommonVar.Standby.DelOccupyInfo(Agv.Name);
CommonVar.Charge.DelOccupyInfo(Agv.Name);
}
else else
{ {
if (Agv.IsExistShelf) //if (Agv.IsExistShelf)
{ //{
LogUtil.error(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name)); // LogUtil.error(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name));
return; // return;
} //}
if (MessageBox.Show(this, "是否继续上一次的任务?\r\n" + Agv.Msg, "提示", MessageBoxButtons.YesNo).Equals(DialogResult.No)) if (MessageBox.Show(this, "是否继续上一次的任务?\r\n" + Agv.Msg, "提示", MessageBoxButtons.YesNo).Equals(DialogResult.No))
{ {
Agv.CurJob = null; Agv.CurJob = null;
if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge)) if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge))
Agv.Place = ""; Agv.Place = "";
if (Agv.IsCon)
{
MiR_API.Del_Mission(Agv); MiR_API.Del_Mission(Agv);
}
Agv.RFID = ""; Agv.RFID = "";
} }
else else
{ {
if (Agv.IsCon)
{
Agv.Resend(); Agv.Resend();
}
} }
...@@ -130,11 +138,27 @@ namespace AGVControl ...@@ -130,11 +138,27 @@ namespace AGVControl
{ {
if (Agv.IsCon) if (Agv.IsCon)
{ {
if (cmbBxMission.SelectedItem.ToString().Equals(SettingString.Enter) || cmbBxMission.SelectedItem.ToString().Equals(SettingString.Leave)) try
{
var key = CommonVar.showNameMissionName.Where(qq => qq.Value == cmbBxMission.SelectedItem.ToString()).Select(qq => qq.Key);
string taskName = key.ToList()[0];
if(!CommonVar.agvMission.Keys.Contains(taskName))
{
LogUtil.error("无选定任务: "+ taskName);
return;
}
if (taskName.Equals(SettingString.Enter) || taskName.Equals(SettingString.Leave))
if (MessageBox.Show("确定对小车发送进/出任务?", Agv.Name, MessageBoxButtons.YesNo) == DialogResult.No) if (MessageBox.Show("确定对小车发送进/出任务?", Agv.Name, MessageBoxButtons.YesNo) == DialogResult.No)
return; return;
Agv.AssignTask(CommonVar.showNameMissionName[cmbBxMission.SelectedItem.ToString()]);
LogUtil.info(string.Format("{0} 手动发任务 {1}", Agv.Name, cmbBxMission.SelectedItem.ToString())); Agv.AssignTask(taskName);
Agv.StateKanban.ShowInfo("目的地", "");
LogUtil.info(string.Format("{0} 手动发任务 {1}", Agv.Name, taskName));
}
catch(Exception ex)
{
LogUtil.error("手动发任务 ",ex);
}
} }
} }
......
...@@ -114,7 +114,7 @@ namespace AGVControl ...@@ -114,7 +114,7 @@ namespace AGVControl
CommonVar.jobTypeInfo = new List<JobType>(); CommonVar.jobTypeInfo = new List<JobType>();
//CommonVar.jobTypeInfo.Add(new PackingJobType()); //CommonVar.jobTypeInfo.Add(new PackingJobType());
CommonVar.jobTypeInfo.Add(new ReelStringJobType()); CommonVar.jobTypeInfo.Add(new ReelStringJobType());
//CommonVar.jobTypeInfo.Add(new ReturnJobType()); CommonVar.jobTypeInfo.Add(new ReturnJobType());
CommonVar.jobTypeInfo.Add(new ChargeJobType()); CommonVar.jobTypeInfo.Add(new ChargeJobType());
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
......
...@@ -131,8 +131,7 @@ namespace DeviceLibrary ...@@ -131,8 +131,7 @@ namespace DeviceLibrary
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap); string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
log.Debug("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】"); msgList.ForEach(new Action<AlarmMsg>(k => log.Debug("deviceAlarmList " + k.ToString()))); ;
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr); RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null) if (data == null)
...@@ -267,6 +266,10 @@ namespace DeviceLibrary ...@@ -267,6 +266,10 @@ namespace DeviceLibrary
this.msgValue = value; this.msgValue = value;
this.type = type; this.type = type;
} }
public override string ToString()
{
return string.Format("[name:{0},msgKey:{1},msgValue:{2},type:{3}]",name,msgKey,msgValue,type);
}
} }
public class RfidData public class RfidData
{ {
......
...@@ -28,7 +28,7 @@ namespace DeviceLibrary ...@@ -28,7 +28,7 @@ namespace DeviceLibrary
{ {
Station = new Dictionary<string, string>(); Station = new Dictionary<string, string>();
Station.Add(AutoCharge1, ""); Station.Add(AutoCharge1, "");
//Station.Add(AutoCharge2, ""); Station.Add(AutoCharge2, "");
string s = AppConfigHelper.GetValue(SettingString.ChargeThreshold); string s = AppConfigHelper.GetValue(SettingString.ChargeThreshold);
string[] arr = s.Split(','); string[] arr = s.Split(',');
BatteryMin = Convert.ToInt32(arr[0]); BatteryMin = Convert.ToInt32(arr[0]);
...@@ -113,28 +113,27 @@ namespace DeviceLibrary ...@@ -113,28 +113,27 @@ namespace DeviceLibrary
public bool HasEmptyChargeStation(Agv_Info agv) public bool HasEmptyChargeStation(Agv_Info agv)
{ {
//lock(loc) lock (loc)
//{ {
// if (SettingString.SingleMission_IP1.Equals(agv.IP)) //if (SettingString.SingleMission_IP1.Equals(agv.IP))
// return true; // return true;
// else //else
// { //{
// if (Station[AutoCharge2].Equals("")) // if (Station[AutoCharge2].Equals(""))
// { // {
// return true; // return true;
// } // }
// }
// //foreach (string item in Station.Keys)
// //{
// // if (Station[item].Equals(""))
// // {
// // return true;
// // }
// //}
//} //}
//return false; foreach (string item in Station.Keys)
{
if (Station[item].Equals(""))
{
return true; return true;
} }
}
}
return false;
}
/// <summary> /// <summary>
/// 开始充电任务 /// 开始充电任务
/// </summary> /// </summary>
......
任务别称,任务名称,任务GUID 任务别称,任务名称,任务GUID
小车初始化,Init,219cd91a-61da-11eb-96a9-0001297a1dca 小车初始化,Init,219cd91a-61da-11eb-96a9-0001297a1dca
VMI出口,MoveA1,a6416bc3-61f7-11eb-96a9-0001297a1dca VMI出口,MoveA1,60213bb2-764c-11eb-a016-0001297a1dca
VMI入口,MoveA2,8c0a0fc6-61f7-11eb-96a9-0001297a1dca VMI入口,MoveA2,fa9d938e-764b-11eb-a016-0001297a1dca
分盘线入口,MoveA8,cd0544f8-de10-11ea-a3e4-94c691a7387d 分盘线入口,MoveA8,526a32cf-7648-11eb-a016-0001297a1dca
分盘线空料串出口,MoveA7,71e01c6d-de10-11ea-a3e4-94c691a7387d 分盘线空料串出口,MoveA7,cc67bf9e-7646-11eb-a016-0001297a1dca
分盘线满料串出口,MoveA9,71e01c6d-de10-11ea-a3e4-94c691a7387d 分盘线满料串出口,MoveA9,bdd2d648-7648-11eb-a016-0001297a1dca
云仓T1入口,MoveT1_1,632f434e-61f1-11eb-96a9-0001297a1dca 云仓T1入口,MoveT1_1,e1c6d054-764c-11eb-a016-0001297a1dca
云仓T1出口,MoveT1_2,bff9d729-61f1-11eb-96a9-0001297a1dca 云仓T1出口,MoveT1_2,3a5bded2-764d-11eb-a016-0001297a1dca
云仓T2入口,MoveT2_1,e6b1129f-61f1-11eb-96a9-0001297a1dca 云仓T2入口,MoveT2_1,af70f09c-764d-11eb-a016-0001297a1dca
云仓T2出口,MoveT2_2,0a721ff0-61f2-11eb-96a9-0001297a1dca 云仓T2出口,MoveT2_2,12993811-764e-11eb-a016-0001297a1dca
云仓T3入口,MoveT3_1,2f3ddde9-61f2-11eb-96a9-0001297a1dca 云仓T3入口,MoveT3_1,6b3adaad-764e-11eb-a016-0001297a1dca
云仓T3出口,MoveT3_2,78996774-61f2-11eb-96a9-0001297a1dca 云仓T3出口,MoveT3_2,a53c20d0-764e-11eb-a016-0001297a1dca
云仓T5入口,MoveT5_1,bdabf3f6-61f2-11eb-96a9-0001297a1dca 云仓T5入口,MoveT5_1,b96f0275-764f-11eb-a016-0001297a1dca
云仓T5出口,MoveT5_2,19f39838-61f4-11eb-96a9-0001297a1dca 云仓T5出口,MoveT5_2,ee79e316-764f-11eb-a016-0001297a1dca
紧急料T4入口,MoveT4_1,90aa9c04-61f2-11eb-96a9-0001297a1dca 紧急料T4入口,MoveT4_1,062cec40-764f-11eb-a016-0001297a1dca
紧急料T4出口,MoveT4_2,a8f9be71-61f2-11eb-96a9-0001297a1dca 紧急料T4出口,MoveT4_2,41b15aa4-764f-11eb-a016-0001297a1dca
点料机空料串入口[D1],MoveD1,219cd91a-61da-11eb-96a9-0001297a1dca 点料机空料串入口[D1],MoveD1,1bb1c9a5-764a-11eb-a016-0001297a1dca
点料机满料串出口[D2],MoveD2,219cd91a-61da-11eb-96a9-0001297a1dca 点料机满料串出口[D2],MoveD2,5e746f14-764a-11eb-a016-0001297a1dca
点料机退料口[D3],MoveD3,219cd91a-61da-11eb-96a9-0001297a1dca 点料机退料口[D3],MoveD3,9efe2765-764a-11eb-a016-0001297a1dca
点料机退料口[D4],MoveD4,219cd91a-61da-11eb-96a9-0001297a1dca 点料机退料口[D4],MoveD4,ded74706-764a-11eb-a016-0001297a1dca
退料线入口,MoveD23,5dc60886-ee00-11ea-a03e-94c691a7387d 退料线入口,MoveD23,3f42b016-7684-11eb-a016-0001297a1dca
退料线出口,MoveD24,9a965176-ee00-11ea-a03e-94c691a7387d 退料线出口,MoveD24,b30aaf43-7684-11eb-a016-0001297a1dca
待机位,MoveStandby,615cef05-61f4-11eb-96a9-0001297a1dca 待机位,MoveStandby,615cef05-61f4-11eb-96a9-0001297a1dca
充电位1,AutoCharge1,d90853ec-5f06-11eb-9d80-0001297a1dca 充电位1,AutoCharge1,d90853ec-5f06-11eb-9d80-0001297a1dca
充电位2,AutoCharge2,6b57174e-75a2-11eb-8565-0001297a1dca
小车进料,Enter,ce64c188-61da-11eb-96a9-0001297a1dca 小车进料,Enter,ce64c188-61da-11eb-96a9-0001297a1dca
小车出料,Leave,65c1203c-61e1-11eb-96a9-0001297a1dca 小车出料,Leave,65c1203c-61e1-11eb-96a9-0001297a1dca
Fleet ID,agv名称,IP,授权码,IOID Fleet ID,agv名称,IP,授权码,IOID
1,14号车,10.85.199.18,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53 1,14号车,10.85.199.18,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,d38637b1-6150-11eb-b885-0001297a1dca
2,15号车,10.85.199.133,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,d38637b1-6150-11eb-b885-0001297a1dca
3,16号车,10.85.199.143,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,d38637b1-6150-11eb-b885-0001297a1dca
4,17号车,10.85.199.64,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,d38637b1-6150-11eb-b885-0001297a1dca
...@@ -90,8 +90,6 @@ namespace DeviceLibrary ...@@ -90,8 +90,6 @@ namespace DeviceLibrary
//获取AGV状态 //获取AGV状态
rtn = MiR_API.Get_State(CommonVar.agvInfo[i], out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.AgvPosition position); rtn = MiR_API.Get_State(CommonVar.agvInfo[i], out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.AgvPosition position);
Thread.Sleep(50); Thread.Sleep(50);
//rtn = MiR_API.Get_IO_Status(CommonVar.agvInfo[i], out bool[] input, out bool[] output);
//Thread.Sleep(50);
change = CommonVar.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position); change = CommonVar.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position);
//更新状态stateID.Equals(eAGVState.Executing) //更新状态stateID.Equals(eAGVState.Executing)
......
...@@ -185,7 +185,7 @@ namespace DeviceLibrary ...@@ -185,7 +185,7 @@ namespace DeviceLibrary
Msg = ""; Msg = "";
Position = new Agv_Info.AgvPosition(); Position = new Agv_Info.AgvPosition();
displayBoard = new DisplayBoard(); displayBoard = new DisplayBoard();
RunInfos = new List<string>() { "目的地", "RFID", "负载", "运行模式","任务信息", "AGV运行信息" }; RunInfos = new List<string>() { "状态","目的地", "RFID", "负载", "运行模式","任务信息", "AGV运行信息" };
StateKanban = new AGV_UI.Status(name, RunInfos); StateKanban = new AGV_UI.Status(name, RunInfos);
} }
...@@ -229,10 +229,6 @@ namespace DeviceLibrary ...@@ -229,10 +229,6 @@ namespace DeviceLibrary
TimeSpan lastTimeSpan = DateTime.Now - IoStartTime; TimeSpan lastTimeSpan = DateTime.Now - IoStartTime;
IsExistShelf = (lastTimeSpan.TotalMilliseconds >= IoLastTime); IsExistShelf = (lastTimeSpan.TotalMilliseconds >= IoLastTime);
} }
else
{
IsExistShelf = true;
}
} }
else else
{ {
...@@ -245,6 +241,11 @@ namespace DeviceLibrary ...@@ -245,6 +241,11 @@ namespace DeviceLibrary
if (!StateID.Equals(stateID) || !CurTaskState.Equals(stateText) || !Battery.Equals(battery) if (!StateID.Equals(stateID) || !CurTaskState.Equals(stateText) || !Battery.Equals(battery)
|| !MissionText.Equals(missionText) || !IsExistShelf.Equals(preShelfState)) || !MissionText.Equals(missionText) || !IsExistShelf.Equals(preShelfState))
isChange = true; isChange = true;
if(!StateID.Equals(stateID))
{
StateID = stateID;
StateKanban.ShowInfo("状态", stateID.ToString());
}
if (!CurTaskState.Equals(stateText)) if (!CurTaskState.Equals(stateText))
{ {
...@@ -266,6 +267,7 @@ namespace DeviceLibrary ...@@ -266,6 +267,7 @@ namespace DeviceLibrary
else else
PlaceAliceName = Place; PlaceAliceName = Place;
} }
StateKanban.ShowInfo("目的地", PlaceAliceName); StateKanban.ShowInfo("目的地", PlaceAliceName);
StateKanban.ShowInfo("RFID", RFID); StateKanban.ShowInfo("RFID", RFID);
if (!IsExistShelf.Equals(preShelfState)) if (!IsExistShelf.Equals(preShelfState))
...@@ -308,29 +310,27 @@ namespace DeviceLibrary ...@@ -308,29 +310,27 @@ namespace DeviceLibrary
if (offlineTimeOut) if (offlineTimeOut)
{ {
isAlarm = true; isAlarm = true;
displayBoard.Add(Name, "Agv." + Name + ".Msg", "在" + PlaceAliceName + "离线" + (DateTime.Now - offlineStartTime).TotalSeconds.ToString("f2") + "秒"); displayBoard.Add(Name, "lineAgv." + Name + ".Msg", "在" + PlaceAliceName + "离线" + (DateTime.Now - offlineStartTime).TotalSeconds.ToString("f2") + "秒");
} }
if (standTimeOut) else if (standTimeOut)
{ {
isAlarm = true; isAlarm = true;
displayBoard.Add(Name, "Agv." + Name + ".Msg", "在" + PlaceAliceName + "停留超时" + (DateTime.Now - standStartTime).TotalMinutes.ToString("f2") + "分钟"); displayBoard.Add(Name, "lineAgv." + Name + ".Msg", "在" + PlaceAliceName + "停留超时" + (DateTime.Now - standStartTime).TotalMinutes.ToString("f2") + "分钟");
} }
else if (StateID.Equals(eAGVState.Error) || StateID.Equals(eAGVState.EmergencyStop) || StateID.Equals(eAGVState.Pause))
if (StateID.Equals(eAGVState.Error) || StateID.Equals(eAGVState.EmergencyStop) || StateID.Equals(eAGVState.Pause))
{ {
isAlarm = true; isAlarm = true;
displayBoard.Add(Name, "Agv." + Name + ".Msg", "agv状态:" + StateID.ToString()); displayBoard.Add(Name, "lineAgv." + Name + ".Msg", "状态:" + StateID.ToString());
} }
if (!isAlarm) if (!isAlarm)
{ {
if (!Msg.Equals("")) if (!Msg.Equals(""))
displayBoard.Add(Name, "Agv." + Name + ".Msg", Msg, 1); displayBoard.Add(Name, "lineAgv." + Name + ".Msg", Msg, 1);
else else
{ {
if ((Place.Contains(SettingString.AutoCharge) || Place.Contains(SettingString.Standby))) if ((Place.Contains(SettingString.AutoCharge) || Place.Contains(SettingString.Standby)))
{ {
displayBoard.Add(Name, "Agv." + Name + ".Place", Place, 1); displayBoard.Add(Name, "lineAgv." + Name + ".Place", Place, 1);
} }
} }
......
...@@ -214,7 +214,9 @@ namespace DeviceLibrary ...@@ -214,7 +214,9 @@ namespace DeviceLibrary
{ {
try try
{ {
if (info.IsUse)
info.CurTaskID = Convert.ToInt32(id); info.CurTaskID = Convert.ToInt32(id);
info.CurTaskGUID = mission_id; info.CurTaskGUID = mission_id;
log.Info(string.Format("{0} Add_Mission [{1}]", info.Name, key.ToList()[0])); log.Info(string.Format("{0} Add_Mission [{1}]", info.Name, key.ToList()[0]));
...@@ -474,13 +476,13 @@ namespace DeviceLibrary ...@@ -474,13 +476,13 @@ namespace DeviceLibrary
/// <param name="author">授权码</param> /// <param name="author">授权码</param>
/// <param name="position">输出位置</param> /// <param name="position">输出位置</param>
/// <returns></returns> /// <returns></returns>
public static bool Get_Position(string ip,string author, out Agv_Info.AgvPosition position) public static bool Get_Position(string ip, string author, out Agv_Info.AgvPosition position)
{ {
position = new Agv_Info.AgvPosition(); position = new Agv_Info.AgvPosition();
try try
{ {
string url = "http://" + ip + "/api/v2.0.0/status?whitelist=position"; string url = "http://" + ip + "/api/v2.0.0/status?whitelist=position";
string json = HttpGet(url, ip,author); string json = HttpGet(url, ip, author);
if (string.IsNullOrWhiteSpace(json)) return false; if (string.IsNullOrWhiteSpace(json)) return false;
JavaScriptSerializer serializer = new JavaScriptSerializer(); JavaScriptSerializer serializer = new JavaScriptSerializer();
Dictionary<string, object> dic = (Dictionary<string, object>)serializer.DeserializeObject(json); Dictionary<string, object> dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
...@@ -508,7 +510,7 @@ namespace DeviceLibrary ...@@ -508,7 +510,7 @@ namespace DeviceLibrary
if (agv.CurTaskID == -1) if (agv.CurTaskID == -1)
return true; return true;
if(agv.Use_Fleet) if (agv.Use_Fleet)
{ {
string ip = AppConfigHelper.GetValue(SettingString.FLEET); string ip = AppConfigHelper.GetValue(SettingString.FLEET);
string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + agv.CurTaskID; string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + agv.CurTaskID;
...@@ -532,7 +534,7 @@ namespace DeviceLibrary ...@@ -532,7 +534,7 @@ namespace DeviceLibrary
} }
else else
{ {
string url = "http://"+agv.IP+"/api/v2.0.0/mission_queue/" + agv.CurTaskID; string url = "http://" + agv.IP + "/api/v2.0.0/mission_queue/" + agv.CurTaskID;
string json = HttpGet(url, agv.IP, agv.Authorization); string json = HttpGet(url, agv.IP, agv.Authorization);
log.Debug("URL: " + url + "\n" + "Return: " + json); log.Debug("URL: " + url + "\n" + "Return: " + json);
if (string.IsNullOrWhiteSpace(json)) return false; if (string.IsNullOrWhiteSpace(json)) return false;
......
...@@ -28,7 +28,7 @@ namespace DeviceLibrary ...@@ -28,7 +28,7 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public override string RunInfo public override string RunInfo
{ {
get { return string.Format("充电任务:{0} [任务名称={1}][任务状态={2}]", runInfo,CurTaskName,CurTaskState); } get { return string.Format("充电任务:{0}", runInfo); }
} }
private JobStep<CHARGE_STEP> ChargeStep = new JobStep<CHARGE_STEP>(CHARGE_STEP.NONE); private JobStep<CHARGE_STEP> ChargeStep = new JobStep<CHARGE_STEP>(CHARGE_STEP.NONE);
...@@ -41,7 +41,7 @@ namespace DeviceLibrary ...@@ -41,7 +41,7 @@ namespace DeviceLibrary
{ {
string msg = agv.Name + " "; string msg = agv.Name + " ";
bool rtn = false; bool rtn = false;
agv.Msg = ""; agv.Msg = RunInfo;
CurTaskState = CommonVar.GetTakJobState(agv); CurTaskState = CommonVar.GetTakJobState(agv);
if (ChargeStep.IsStep(CHARGE_STEP.NONE)) if (ChargeStep.IsStep(CHARGE_STEP.NONE))
......
...@@ -76,7 +76,7 @@ namespace DeviceLibrary ...@@ -76,7 +76,7 @@ namespace DeviceLibrary
to = CommonVar.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID); ; return string.Format("取料串任务: {0} [{1}->{2}]", runInfo, from, to); ;
} }
/// <summary> /// <summary>
/// 任务执行 /// 任务执行
...@@ -87,7 +87,7 @@ namespace DeviceLibrary ...@@ -87,7 +87,7 @@ namespace DeviceLibrary
string msg = agv.Name + " "; string msg = agv.Name + " ";
bool rtn = false; bool rtn = false;
agv.Msg = GetShowInfo(); agv.Msg = GetShowInfo();
agv.RFID = RFID;
CurTaskState = CommonVar.GetTakJobState(agv); CurTaskState = CommonVar.GetTakJobState(agv);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
......
...@@ -70,7 +70,7 @@ namespace DeviceLibrary ...@@ -70,7 +70,7 @@ namespace DeviceLibrary
to = CommonVar.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID); return string.Format("送料串任务: {0} [{1}->{2}]", runInfo, from, to);
} }
/// <summary> /// <summary>
/// 任务执行 /// 任务执行
...@@ -81,7 +81,7 @@ namespace DeviceLibrary ...@@ -81,7 +81,7 @@ namespace DeviceLibrary
string msg = agv.Name + " "; string msg = agv.Name + " ";
bool rtn = false; bool rtn = false;
agv.Msg = GetShowInfo(); agv.Msg = GetShowInfo();
agv.RFID = RFID;
CurTaskState = CommonVar.GetTakJobState(agv); CurTaskState = CommonVar.GetTakJobState(agv);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
......
...@@ -28,7 +28,7 @@ namespace DeviceLibrary ...@@ -28,7 +28,7 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public override string RunInfo public override string RunInfo
{ {
get { return string.Format("待机任务:{0} [任务名称={1}][任务状态={2}]", runInfo,CurTaskName,CurTaskState); } get { return string.Format("待机任务:{0}", runInfo); }
} }
private JobStep<EXECUTE_STEP> curJobStep = new JobStep<EXECUTE_STEP>(EXECUTE_STEP.NONE); private JobStep<EXECUTE_STEP> curJobStep = new JobStep<EXECUTE_STEP>(EXECUTE_STEP.NONE);
...@@ -41,7 +41,7 @@ namespace DeviceLibrary ...@@ -41,7 +41,7 @@ namespace DeviceLibrary
{ {
string msg = agv.Name + " "; string msg = agv.Name + " ";
bool rtn = false; bool rtn = false;
agv.Msg = ""; agv.Msg = RunInfo;
CurTaskState = CommonVar.GetTakJobState(agv); CurTaskState = CommonVar.GetTakJobState(agv);
if (curJobStep.IsStep(EXECUTE_STEP.NONE)) if (curJobStep.IsStep(EXECUTE_STEP.NONE))
......
...@@ -16,10 +16,12 @@ namespace DeviceLibrary ...@@ -16,10 +16,12 @@ namespace DeviceLibrary
{ {
if (currentAgv.Battery < CommonVar.Charge.BatteryMax - 10 && CommonVar.Charge.HasEmptyChargeStation(currentAgv)) if (currentAgv.Battery < CommonVar.Charge.BatteryMax - 10 && CommonVar.Charge.HasEmptyChargeStation(currentAgv))
{ {
currentAgv.RFID = "";
return new ChargeJob(currentAgv.Place); return new ChargeJob(currentAgv.Place);
} }
else else
{ {
currentAgv.RFID = "";
return new StandyJob(currentAgv.Place); return new StandyJob(currentAgv.Place);
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!