Commit 0295cdf2 LN

出料皮带线修改

1 个父辈 0ddfd175
......@@ -91,6 +91,12 @@
<Compile Include="FrmIOMsg.Designer.cs">
<DependentUpon>FrmIOMsg.cs</DependentUpon>
</Compile>
<Compile Include="FrmRFIPEdit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmRFIPEdit.Designer.cs">
<DependentUpon>FrmRFIPEdit.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -163,6 +169,9 @@
<EmbeddedResource Include="FrmIOMsg.resx">
<DependentUpon>FrmIOMsg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmRFIPEdit.resx">
<DependentUpon>FrmRFIPEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -452,7 +452,7 @@
this.btnLine1Test.BackColor = System.Drawing.Color.White;
this.btnLine1Test.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLine1Test.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLine1Test.Location = new System.Drawing.Point(549, 19);
this.btnLine1Test.Location = new System.Drawing.Point(543, 19);
this.btnLine1Test.Name = "btnLine1Test";
this.btnLine1Test.Size = new System.Drawing.Size(110, 40);
this.btnLine1Test.TabIndex = 101;
......@@ -510,7 +510,7 @@
this.btnLine2Test.BackColor = System.Drawing.Color.White;
this.btnLine2Test.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLine2Test.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLine2Test.Location = new System.Drawing.Point(663, 19);
this.btnLine2Test.Location = new System.Drawing.Point(662, 19);
this.btnLine2Test.Name = "btnLine2Test";
this.btnLine2Test.Size = new System.Drawing.Size(110, 40);
this.btnLine2Test.TabIndex = 250;
......@@ -534,7 +534,7 @@
this.btnStrart.BackColor = System.Drawing.Color.White;
this.btnStrart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStrart.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStrart.Location = new System.Drawing.Point(332, 22);
this.btnStrart.Location = new System.Drawing.Point(325, 22);
this.btnStrart.Name = "btnStrart";
this.btnStrart.Size = new System.Drawing.Size(100, 34);
this.btnStrart.TabIndex = 267;
......@@ -547,7 +547,7 @@
this.btnlineStop.BackColor = System.Drawing.Color.White;
this.btnlineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnlineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnlineStop.Location = new System.Drawing.Point(443, 22);
this.btnlineStop.Location = new System.Drawing.Point(434, 22);
this.btnlineStop.Name = "btnlineStop";
this.btnlineStop.Size = new System.Drawing.Size(100, 34);
this.btnlineStop.TabIndex = 266;
......@@ -566,7 +566,7 @@
"皮带线3运转测试",
"皮带线1运转-出口定位测试",
"皮带线2运转-出口定位测试"});
this.cmbLineType.Location = new System.Drawing.Point(91, 25);
this.cmbLineType.Location = new System.Drawing.Point(85, 25);
this.cmbLineType.Name = "cmbLineType";
this.cmbLineType.Size = new System.Drawing.Size(231, 28);
this.cmbLineType.TabIndex = 0;
......
......@@ -354,7 +354,7 @@ namespace OnlineStore.AssemblyLine
}
int index = cmbLineType.SelectedIndex;
string moveIo = IO_Type.DLine_Run1;
string waitIo = IO_Type.ExitTray_Check1;
string waitIo = IO_Type.EntryLocation_Check1;
if (index.Equals(1))
{
......@@ -376,7 +376,7 @@ namespace OnlineStore.AssemblyLine
moveIo = IO_Type.DLine_Run2;
waitIo = IO_Type.ExitLocation_Check2;
}
dlineRun.StartLineRun(moveIo, waitIo);
dlineRun.StartLineRun(moveIo, waitIo,null);
cmbLineType.Enabled = false;
}
......
......@@ -35,6 +35,7 @@
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnSwStop = new System.Windows.Forms.Button();
this.btnFLStop1 = new System.Windows.Forms.Button();
this.btnFLStop2Down = new System.Windows.Forms.Button();
this.btnOLine = new System.Windows.Forms.Button();
......@@ -132,9 +133,9 @@
this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(685, 388);
this.groupBox1.Location = new System.Drawing.Point(685, 390);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(604, 89);
this.groupBox1.Size = new System.Drawing.Size(604, 99);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -281,7 +282,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(457, 1);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(220, 479);
this.groupBox4.Size = new System.Drawing.Size(220, 491);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -298,7 +299,7 @@
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(209, 459);
this.tableLayoutPanel2.Size = new System.Drawing.Size(209, 471);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -308,7 +309,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 1);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(220, 479);
this.groupBox3.Size = new System.Drawing.Size(220, 491);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -325,7 +326,7 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(209, 459);
this.tableLayoutPanel1.Size = new System.Drawing.Size(209, 471);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupBox5
......@@ -333,6 +334,7 @@
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnSwStop);
this.groupBox5.Controls.Add(this.btnFLStop1);
this.groupBox5.Controls.Add(this.btnFLStop2Down);
this.groupBox5.Controls.Add(this.btnOLine);
......@@ -353,11 +355,24 @@
this.groupBox5.Controls.Add(this.btnFeedSideWay);
this.groupBox5.Location = new System.Drawing.Point(931, 1);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(362, 387);
this.groupBox5.Size = new System.Drawing.Size(362, 389);
this.groupBox5.TabIndex = 255;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试";
//
// btnSwStop
//
this.btnSwStop.BackColor = System.Drawing.Color.White;
this.btnSwStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSwStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSwStop.Location = new System.Drawing.Point(9, 258);
this.btnSwStop.Name = "btnSwStop";
this.btnSwStop.Size = new System.Drawing.Size(153, 34);
this.btnSwStop.TabIndex = 271;
this.btnSwStop.Text = "环形线阻挡气缸下降";
this.btnSwStop.UseVisualStyleBackColor = false;
this.btnSwStop.Click += new System.EventHandler(this.btnSwStop_Click);
//
// btnFLStop1
//
this.btnFLStop1.BackColor = System.Drawing.Color.White;
......@@ -682,7 +697,7 @@
this.tabControl1.Location = new System.Drawing.Point(5, 52);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1307, 524);
this.tabControl1.Size = new System.Drawing.Size(1307, 526);
this.tabControl1.TabIndex = 257;
//
// tabPage3
......@@ -690,7 +705,7 @@
this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(1299, 494);
this.tabPage3.Size = new System.Drawing.Size(1299, 496);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "状态信息";
this.tabPage3.UseVisualStyleBackColor = true;
......@@ -768,7 +783,7 @@
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1299, 494);
this.tabPage1.Size = new System.Drawing.Size(1299, 496);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " IO列表 ";
this.tabPage1.UseVisualStyleBackColor = true;
......@@ -780,7 +795,7 @@
this.groupBox7.Controls.Add(this.tableLayoutPanel3);
this.groupBox7.Location = new System.Drawing.Point(232, 1);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(220, 479);
this.groupBox7.Size = new System.Drawing.Size(220, 491);
this.groupBox7.TabIndex = 279;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "DI列表";
......@@ -797,7 +812,7 @@
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(209, 459);
this.tableLayoutPanel3.Size = new System.Drawing.Size(209, 471);
this.tableLayoutPanel3.TabIndex = 102;
//
// groupBox8
......@@ -807,7 +822,7 @@
this.groupBox8.Controls.Add(this.tableLayoutPanel4);
this.groupBox8.Location = new System.Drawing.Point(685, 1);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(240, 387);
this.groupBox8.Size = new System.Drawing.Size(240, 389);
this.groupBox8.TabIndex = 280;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "DO列表";
......@@ -824,7 +839,7 @@
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 367);
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 369);
this.tableLayoutPanel4.TabIndex = 103;
//
// tabPage2
......@@ -835,7 +850,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1299, 494);
this.tabPage2.Size = new System.Drawing.Size(1299, 496);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 伺服信息 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -1181,7 +1196,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1318, 591);
this.ClientSize = new System.Drawing.Size(1318, 582);
this.Controls.Add(this.panel1);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
......@@ -1296,6 +1311,7 @@
private System.Windows.Forms.Button btnFLStop1;
private System.Windows.Forms.Button btnFLStop2Down;
private System.Windows.Forms.CheckBox chbBoxSendShelf;
private System.Windows.Forms.Button btnSwStop;
}
}
......@@ -249,12 +249,24 @@ namespace OnlineStore.AssemblyLine
btnSwLocationCylinder.Visible = true;
btnSWTop.Visible = true;
btnFL_TopCylinder.Visible = false;
btnFLStop1.Visible = false;
btnFLStop2Down.Visible = false;
}
else
{
btnSwLocationCylinder.Visible = false;
btnSWTop.Visible = false;
btnFL_TopCylinder.Visible = true;
btnFLStop1.Visible = true;
btnFLStop2Down.Visible = true;
}
if (equipBean.Config.SidesWayNum.Equals(2))
{
btnSwStop.Visible = true;
}
else
{
btnSwStop.Visible = false;
}
txtBp1.Text = equipBean.Config.BatchAxisP1.ToString();
txtBP2.Text = equipBean.Config.BatchAxisP2.ToString();
......@@ -590,6 +602,11 @@ namespace OnlineStore.AssemblyLine
equipBean.OutEndSendShelfOut = chbBoxSendShelf.Checked;
IsInCheck = false;
}
private void btnSwStop_Click(object sender, EventArgs e)
{
BtnMove(btnSwStop, "环形线阻挡气缸下降", "环形线阻挡气缸上升", IO_Type.SW_StopDown);
}
}
}
......
......@@ -47,7 +47,7 @@
//
this.lblConInfo.AutoSize = true;
this.lblConInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblConInfo.Location = new System.Drawing.Point(63, 73);
this.lblConInfo.Location = new System.Drawing.Point(63, 62);
this.lblConInfo.Name = "lblConInfo";
this.lblConInfo.Size = new System.Drawing.Size(80, 20);
this.lblConInfo.TabIndex = 0;
......@@ -57,7 +57,7 @@
//
this.lblRFID.AutoSize = true;
this.lblRFID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblRFID.Location = new System.Drawing.Point(321, 73);
this.lblRFID.Location = new System.Drawing.Point(321, 62);
this.lblRFID.Name = "lblRFID";
this.lblRFID.Size = new System.Drawing.Size(82, 20);
this.lblRFID.TabIndex = 1;
......@@ -67,7 +67,7 @@
//
this.lblBox.AutoSize = true;
this.lblBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBox.Location = new System.Drawing.Point(627, 73);
this.lblBox.Location = new System.Drawing.Point(627, 62);
this.lblBox.Name = "lblBox";
this.lblBox.Size = new System.Drawing.Size(93, 20);
this.lblBox.TabIndex = 2;
......
......@@ -121,12 +121,12 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.logBox);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.lblMoveInfo);
this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.listView1);
this.tabPage1.Controls.Add(this.logBox);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(1328, 609);
......@@ -304,7 +304,7 @@
this.btnClearTray.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearTray.BackColor = System.Drawing.Color.White;
this.btnClearTray.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearTray.Location = new System.Drawing.Point(334, 12);
this.btnClearTray.Location = new System.Drawing.Point(334, 21);
this.btnClearTray.Name = "btnClearTray";
this.btnClearTray.Size = new System.Drawing.Size(105, 35);
this.btnClearTray.TabIndex = 196;
......@@ -317,7 +317,7 @@
this.btnTrayInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnTrayInfo.BackColor = System.Drawing.Color.White;
this.btnTrayInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTrayInfo.Location = new System.Drawing.Point(445, 13);
this.btnTrayInfo.Location = new System.Drawing.Point(445, 22);
this.btnTrayInfo.Name = "btnTrayInfo";
this.btnTrayInfo.Size = new System.Drawing.Size(105, 35);
this.btnTrayInfo.TabIndex = 195;
......@@ -329,7 +329,7 @@
//
this.lblCID.AutoSize = true;
this.lblCID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCID.Location = new System.Drawing.Point(19, 25);
this.lblCID.Location = new System.Drawing.Point(19, 34);
this.lblCID.Name = "lblCID";
this.lblCID.Size = new System.Drawing.Size(33, 20);
this.lblCID.TabIndex = 95;
......@@ -339,7 +339,7 @@
//
this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRun.Location = new System.Drawing.Point(137, 23);
this.chbAutoRun.Location = new System.Drawing.Point(137, 32);
this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(140, 24);
this.chbAutoRun.TabIndex = 94;
......@@ -352,7 +352,7 @@
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(781, 18);
this.chkDebug.Location = new System.Drawing.Point(781, 27);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(72, 24);
this.chkDebug.TabIndex = 194;
......@@ -364,7 +364,7 @@
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(669, 13);
this.btnClearLog.Location = new System.Drawing.Point(669, 22);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190;
......@@ -377,7 +377,7 @@
this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyLog.BackColor = System.Drawing.Color.White;
this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyLog.Location = new System.Drawing.Point(557, 13);
this.btnCopyLog.Location = new System.Drawing.Point(557, 22);
this.btnCopyLog.Name = "btnCopyLog";
this.btnCopyLog.Size = new System.Drawing.Size(105, 35);
this.btnCopyLog.TabIndex = 191;
......@@ -402,6 +402,7 @@
this.groupBox1.TabIndex = 195;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓通信测试";
this.groupBox1.Visible = false;
//
// lblPosId
//
......@@ -500,9 +501,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(460, 168);
this.logBox.Location = new System.Drawing.Point(460, 81);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(860, 362);
this.logBox.Size = new System.Drawing.Size(860, 449);
this.logBox.TabIndex = 106;
this.logBox.Text = "";
//
......@@ -660,14 +661,12 @@
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(159, 6);
this.toolStripSeparator7.Visible = false;
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(162, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Visible = false;
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
//
// toolStripSeparator9
......
......@@ -733,8 +733,8 @@ namespace OnlineStore.AssemblyLine
private void 托盘初始化ToolStripMenuItem_Click(object sender, EventArgs e)
{
//FrmRFIPEdit FRM = new FrmRFIPEdit();
//FRM.ShowDialog();
FrmRFIPEdit FRM = new FrmRFIPEdit();
FRM.ShowDialog();
}
private void iO模块状态ToolStripMenuItem_Click(object sender, EventArgs e)
......
......@@ -30,7 +30,6 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRFIPEdit));
this.label1 = new System.Windows.Forms.Label();
this.btnNext = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.txtIP = new System.Windows.Forms.TextBox();
this.comboxType = new System.Windows.Forms.ComboBox();
......@@ -40,18 +39,10 @@
this.btnRead = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.numNum = new System.Windows.Forms.NumericUpDown();
this.btnFind = new System.Windows.Forms.Button();
this.lblHas = new System.Windows.Forms.Label();
this.btnSearch = new System.Windows.Forms.Button();
this.cmbLocalIp = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.listView1 = new System.Windows.Forms.ListView();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnClose = new System.Windows.Forms.Button();
this.btnConnect = new System.Windows.Forms.Button();
this.btnReadClear = new System.Windows.Forms.Button();
this.lblResult = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numNum)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
......@@ -67,26 +58,13 @@
this.label1.Text = "请选择读卡器:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnNext
//
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(270, 168);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 275;
this.btnNext.Text = "写入";
this.btnNext.UseVisualStyleBackColor = false;
this.btnNext.Visible = false;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnBack
//
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(196, 286);
this.btnBack.Location = new System.Drawing.Point(264, 241);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.Size = new System.Drawing.Size(110, 45);
this.btnBack.TabIndex = 274;
this.btnBack.Text = "退出";
this.btnBack.UseVisualStyleBackColor = false;
......@@ -95,7 +73,7 @@
// txtIP
//
this.txtIP.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIP.Location = new System.Drawing.Point(144, 82);
this.txtIP.Location = new System.Drawing.Point(144, 72);
this.txtIP.Name = "txtIP";
this.txtIP.Size = new System.Drawing.Size(189, 26);
this.txtIP.TabIndex = 276;
......@@ -120,7 +98,7 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(57, 84);
this.label2.Location = new System.Drawing.Point(57, 74);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 20);
this.label2.TabIndex = 278;
......@@ -139,7 +117,7 @@
"C",
"D",
"E"});
this.comType.Location = new System.Drawing.Point(144, 129);
this.comType.Location = new System.Drawing.Point(144, 153);
this.comType.Name = "comType";
this.comType.Size = new System.Drawing.Size(120, 28);
this.comType.TabIndex = 280;
......@@ -149,7 +127,7 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(70, 132);
this.label3.Location = new System.Drawing.Point(70, 156);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 20);
this.label3.TabIndex = 279;
......@@ -160,9 +138,9 @@
//
this.btnRead.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRead.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRead.Location = new System.Drawing.Point(196, 238);
this.btnRead.Location = new System.Drawing.Point(32, 241);
this.btnRead.Name = "btnRead";
this.btnRead.Size = new System.Drawing.Size(120, 45);
this.btnRead.Size = new System.Drawing.Size(110, 45);
this.btnRead.TabIndex = 281;
this.btnRead.Text = "读取测试";
this.btnRead.UseVisualStyleBackColor = false;
......@@ -173,7 +151,7 @@
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(84, 180);
this.label4.Location = new System.Drawing.Point(84, 194);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(51, 20);
this.label4.TabIndex = 282;
......@@ -183,165 +161,70 @@
// numNum
//
this.numNum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numNum.Location = new System.Drawing.Point(144, 178);
this.numNum.Location = new System.Drawing.Point(144, 192);
this.numNum.Name = "numNum";
this.numNum.Size = new System.Drawing.Size(120, 26);
this.numNum.TabIndex = 283;
//
// btnFind
//
this.btnFind.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFind.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFind.Location = new System.Drawing.Point(270, 119);
this.btnFind.Name = "btnFind";
this.btnFind.Size = new System.Drawing.Size(120, 45);
this.btnFind.TabIndex = 284;
this.btnFind.Text = "查找";
this.btnFind.UseVisualStyleBackColor = false;
this.btnFind.Visible = false;
this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
//
// lblHas
//
this.lblHas.AutoSize = true;
this.lblHas.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblHas.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblHas.Location = new System.Drawing.Point(339, 216);
this.lblHas.Name = "lblHas";
this.lblHas.Size = new System.Drawing.Size(51, 20);
this.lblHas.TabIndex = 285;
this.lblHas.Text = "无标签";
this.lblHas.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblHas.Visible = false;
//
// btnSearch
//
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(28, 136);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(120, 45);
this.btnSearch.TabIndex = 287;
this.btnSearch.Text = "搜索IP";
this.btnSearch.UseVisualStyleBackColor = false;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// cmbLocalIp
//
this.cmbLocalIp.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLocalIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbLocalIp.FormattingEnabled = true;
this.cmbLocalIp.Location = new System.Drawing.Point(28, 80);
this.cmbLocalIp.Name = "cmbLocalIp";
this.cmbLocalIp.Size = new System.Drawing.Size(120, 28);
this.cmbLocalIp.TabIndex = 288;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(14, 36);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(106, 20);
this.label5.TabIndex = 289;
this.label5.Text = "请选择本地IP:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.listView1);
this.groupBox1.Controls.Add(this.cmbLocalIp);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnSearch);
this.groupBox1.Location = new System.Drawing.Point(22, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(364, 350);
this.groupBox1.TabIndex = 290;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "搜索RFID";
this.groupBox1.Visible = false;
//
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.FullRowSelect = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(173, 22);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(174, 309);
this.listView1.TabIndex = 291;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.List;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.btnClose);
this.groupBox2.Controls.Add(this.btnConnect);
this.groupBox2.Controls.Add(this.btnReadClear);
this.groupBox2.Controls.Add(this.lblResult);
this.groupBox2.Controls.Add(this.comboxType);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.btnFind);
this.groupBox2.Controls.Add(this.lblHas);
this.groupBox2.Controls.Add(this.btnRead);
this.groupBox2.Controls.Add(this.txtIP);
this.groupBox2.Controls.Add(this.btnNext);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.btnBack);
this.groupBox2.Controls.Add(this.numNum);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.comType);
this.groupBox2.Location = new System.Drawing.Point(392, 12);
this.groupBox2.Location = new System.Drawing.Point(12, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(412, 350);
this.groupBox2.Size = new System.Drawing.Size(420, 313);
this.groupBox2.TabIndex = 291;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "读取RFID";
//
// btnClose
//
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(34, 286);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(120, 45);
this.btnClose.TabIndex = 287;
this.btnClose.Text = "关闭";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Visible = false;
this.btnClose.Click += new System.EventHandler(this.button2_Click);
//
// btnConnect
//
this.btnConnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnConnect.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnConnect.Location = new System.Drawing.Point(34, 238);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(120, 45);
this.btnConnect.TabIndex = 286;
this.btnConnect.Text = "连接";
this.btnConnect.UseVisualStyleBackColor = false;
this.btnConnect.Visible = false;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
// btnReadClear
//
this.btnReadClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadClear.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadClear.Location = new System.Drawing.Point(148, 241);
this.btnReadClear.Name = "btnReadClear";
this.btnReadClear.Size = new System.Drawing.Size(110, 45);
this.btnReadClear.TabIndex = 285;
this.btnReadClear.Text = "读取并清理";
this.btnReadClear.UseVisualStyleBackColor = false;
this.btnReadClear.Click += new System.EventHandler(this.btnReadClear_Click);
//
// lblResult
//
this.lblResult.AutoSize = true;
this.lblResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblResult.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblResult.Location = new System.Drawing.Point(147, 113);
this.lblResult.Name = "lblResult";
this.lblResult.Size = new System.Drawing.Size(79, 20);
this.lblResult.TabIndex = 284;
this.lblResult.Text = "读取到数据";
this.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmRFIPEdit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(816, 374);
this.ClientSize = new System.Drawing.Size(444, 337);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmRFIPEdit";
this.Text = "托盘编码";
this.Load += new System.EventHandler(this.FrmPwd_Load);
((System.ComponentModel.ISupportInitialize)(this.numNum)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
......@@ -351,7 +234,6 @@
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.TextBox txtIP;
private System.Windows.Forms.ComboBox comboxType;
......@@ -361,15 +243,8 @@
private System.Windows.Forms.Button btnRead;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown numNum;
private System.Windows.Forms.Button btnFind;
private System.Windows.Forms.Label lblHas;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.ComboBox cmbLocalIp;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Label lblResult;
private System.Windows.Forms.Button btnReadClear;
}
}
\ No newline at end of file
......@@ -29,14 +29,14 @@ namespace OnlineStore.AssemblyLine
foreach (EquipBase b in LineManager.Line.AllEquipMap.Values)
{
string key = b.Name + "-托盘RF";
string value = TrayManager.GetRFIP(b.DeviceID);
string value = RFIDManager.GetRFIP(b.DeviceID);
rfMap.Add(key, value);
comboxType.Items.Add(key);
}
foreach (FeedingEquip b in LineManager.Line.FeedingEquipMap.Values)
{
string key = b.Name + "-料架RF";
string value = TrayManager.GetRFIP(b.DeviceID, 1);
string value = RFIDManager.GetRFIP(b.DeviceID, 1);
rfMap.Add(key, value);
comboxType.Items.Add(key);
}
......@@ -44,32 +44,21 @@ namespace OnlineStore.AssemblyLine
comType.SelectedIndex = 0;
string hostN = Dns.GetHostName();
IPAddress[] addresss = Dns.GetHostAddresses(hostN);
cmbLocalIp.Items.Clear();
if (addresss != null && addresss.Length > 0)
{
foreach (IPAddress ip in addresss)
{
if (ip.AddressFamily.Equals(AddressFamily.InterNetwork))
{
cmbLocalIp.Items.Add(ip.ToString());
}
}
cmbLocalIp.SelectedIndex = 0;
}
}
private void btnNext_Click(object sender, EventArgs e)
{
//string ip = txtIP.Text;
//char type = comType.Text.ToCharArray()[0];
//int value = (int)numNum.Value;
//DialogResult result = MessageBox.Show( "确定将【"+comboxType.Text+"】当前的托盘编号定为【"+value+"】?", "确定提示", MessageBoxButtons.OKCancel);
//if (result.Equals(DialogResult.OK))
//{
// RFIDManager.WriteData(ip, new RFIDData(value, type));
//IPAddress[] addresss = Dns.GetHostAddresses(hostN);
//cmbLocalIp.Items.Clear();
//if (addresss != null && addresss.Length > 0)
//{
// foreach (IPAddress ip in addresss)
// {
// if (ip.AddressFamily.Equals(AddressFamily.InterNetwork))
// {
// cmbLocalIp.Items.Add(ip.ToString());
// }
// }
// cmbLocalIp.SelectedIndex = 0;
//}
}
private void btnBack_Click(object sender, EventArgs e)
{
......@@ -80,7 +69,7 @@ namespace OnlineStore.AssemblyLine
private void button1_Click(object sender, EventArgs e)
{
string ip = txtIP.Text;
RFIDData data = TrayManager.ReadRFID(ip);
RFIDData data = RFIDManager.ReadRFID(ip);
string resul = "";
if (data != null)
{
......@@ -93,7 +82,8 @@ namespace OnlineStore.AssemblyLine
}
}
MessageBox.Show("读取到数据:" + resul);
lblResult.Text=("读取到数据:" + resul);
LogUtil.info("点击RFID读取数据测试,结果:" + resul);
}
private void comboxType_SelectedIndexChanged(object sender, EventArgs e)
......@@ -104,78 +94,28 @@ namespace OnlineStore.AssemblyLine
if (!txtIP.Text.Equals(V))
{
txtIP.Text = V;
}
//if (RFIDManager.RFReaderMap.ContainsKey(V))
//{
// btnConnect.Enabled = false;
// btnClose.Enabled = true;
//}
//else
//{
// btnClose.Enabled = false;
// btnConnect.Enabled = true;
//}
}
}
}
private void btnFind_Click(object sender, EventArgs e)
{
//string ip = txtIP.Text;
//bool result = RFIDManager.FindRFID(ip);
//if (result)
//{
// lblHas.Text = "有标签";
// lblHas.ForeColor = Color.Green;
//}
//else
//{
// lblHas.Text = "无标签";
// lblHas.ForeColor = Color.Red;
//}
}
private void btnSearch_Click(object sender, EventArgs e)
{
//string text = cmbLocalIp.Text;
//string[] ip = RFIDManager.SearchIP(text);
//foreach(string ipstr in ip)
//{
// listView1.Items.Add(ipstr);
//}
}
private void btnConnect_Click(object sender, EventArgs e)
{
//string ip = txtIP.Text;
//bool result = RFIDManager.ConnectionIP(ip);
//if (RFIDManager.RFReaderMap.ContainsKey(ip))
//{
// btnConnect.Enabled = false;
// btnClose.Enabled = true;
//}
//else
//{
// btnClose.Enabled = false;
// btnConnect.Enabled = true;
//}
//MessageBox.Show("" + result);
}
private void button2_Click(object sender, EventArgs e)
private void btnReadClear_Click(object sender, EventArgs e)
{
string ip = txtIP.Text;
RFIDData data = RFIDManager.ReadRFID(ip,true);
string resul = "";
if (data != null)
{
resul = data.ToStr();
numNum.Value = data.Num;
int selIndex = data.RFType - 64;
if (selIndex >= 0 && selIndex <= comboxType.Items.Count)
{
comboxType.SelectedIndex = selIndex;
}
//string ip = txtIP.Text;
//RFIDManager.CloseRFID(ip);
//if (RFIDManager.RFReaderMap.ContainsKey(ip))
//{
// btnConnect.Enabled = false;
// btnClose.Enabled = true;
//}
//else
//{
// btnClose.Enabled = false;
// btnConnect.Enabled = true;
//}
}
lblResult.Text = ("读取到数据:" + resul);
LogUtil.info("点击RFID读取数据并清理测试,结果:" + resul);
}
}
}
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,Name1#Name1,,,,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,#,,,,,
,,,,,,,,,
DI,0,出料皮带线体1急停,DLine_SuddenStop,0,PRO_AOI_IP_2,0,出料皮带线体1急停,X021,X021
DI,0,出料皮带线体1复位,DLine_Reset,1,PRO_AOI_IP_2,0,出料皮带线体1复位,X022,X022
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,Name1#Name1,,,,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,#,,,,,
,,,,,,,,,
DI,0,出料皮带线体2急停,DLine_SuddenStop,0,PRO_AOI_IP_3,0,出料皮带线体2急停,X041,X041
DI,0,出料皮带线体2复位,DLine_Reset,1,PRO_AOI_IP_3,0,出料皮带线体2复位,X042,X042
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
,,,,,,,,,
PRO,0,流水线总电器箱,PRO_AOI_IP_1,192.168.101.21,,,,,
PRO,0,出料皮带线1,PRO_AOI_IP_2,192.168.101.22,,,,,
PRO,0,出料皮带线2,PRO_AOI_IP_3,192.168.101.23,,,,,
PRO,0,流水线总电器箱,PRO_AOI_IP_1,192.168.209.21,,,,,
PRO,0,出料皮带线1,PRO_AOI_IP_2,192.168.209.22,,,,,
PRO,0,出料皮带线2,PRO_AOI_IP_3,192.168.209.23,,,,,
,,,,,,,,,
PRO,0,上料流水线SL1-模块1,PRO_AOI_IP_11,192.168.101.24,,,,,
PRO,0,上料流水线SL1-模块2,PRO_AOI_IP_12,192.168.101.25,,,,,
PRO,0,上料流水线SL2-模块1,PRO_AOI_IP_13,192.168.101.26,,,,,
PRO,0,上料流水线SL2-模块2,PRO_AOI_IP_14,192.168.101.27,,,,,
PRO,0,上料流水线SL3-模块1,PRO_AOI_IP_15,192.168.101.28,,,,,
PRO,0,上料流水线SL3-模块2,PRO_AOI_IP_16,192.168.101.29,,,,,
PRO,0,下料流水线SL4-模块1,PRO_AOI_IP_17,192.168.101.30,,,,,
PRO,0,下料流水线SL4-模块2,PRO_AOI_IP_18,192.168.101.31,,,,,
PRO,0,上料流水线SL1-模块1,PRO_AOI_IP_11,192.168.209.24,,,,,
PRO,0,上料流水线SL1-模块2,PRO_AOI_IP_12,192.168.209.25,,,,,
PRO,0,上料流水线SL2-模块1,PRO_AOI_IP_13,192.168.209.26,,,,,
PRO,0,上料流水线SL2-模块2,PRO_AOI_IP_14,192.168.209.27,,,,,
PRO,0,上料流水线SL3-模块1,PRO_AOI_IP_15,192.168.209.28,,,,,
PRO,0,上料流水线SL3-模块2,PRO_AOI_IP_16,192.168.209.29,,,,,
PRO,0,下料流水线SL4-模块1,PRO_AOI_IP_17,192.168.209.30,,,,,
PRO,0,下料流水线SL4-模块2,PRO_AOI_IP_18,192.168.209.31,,,,,
,,,,,,,,,
PRO,0,移载装置(上下为伺服)01、02-模块1,PRO_AOI_IP_19,192.168.101.32,,,,,
PRO,0,移载装置(上下为伺服)01、02-模块2,PRO_AOI_IP_20,192.168.101.33,,,,,
PRO,0,移载装置(上下为伺服)03、04-模块1,PRO_AOI_IP_21,192.168.101.34,,,,,
PRO,0,移载装置(上下为伺服)03、04-模块2,PRO_AOI_IP_22,192.168.101.35,,,,,
PRO,0,移载装置(上下为伺服)05、06-模块1,PRO_AOI_IP_23,192.168.101.36,,,,,
PRO,0,移载装置(上下为伺服)05、06-模块2,PRO_AOI_IP_24,192.168.101.37,,,,,
PRO,0,移载装置(上下为伺服)07、08-模块1,PRO_AOI_IP_25,192.168.101.38,,,,,
PRO,0,移载装置(上下为伺服)07、08-模块2,PRO_AOI_IP_26,192.168.101.39,,,,,
PRO,0,移载装置(上下为伺服)09、10-模块1,PRO_AOI_IP_27,192.168.101.40,,,,,
PRO,0,移载装置(上下为伺服)09、10-模块2,PRO_AOI_IP_28,192.168.101.41,,,,,
PRO,0,移载装置(上下为气缸)11、12-模块1,PRO_AOI_IP_29,192.168.101.42,,,,,
PRO,0,移载装置(上下为气缸)11、12-模块2,PRO_AOI_IP_30,192.168.101.43,,,,,
PRO,0,移载装置(上下为气缸)13、14-模块1,PRO_AOI_IP_31,192.168.101.44,,,,,
PRO,0,移载装置(上下为气缸)13、14-模块2,PRO_AOI_IP_32,192.168.101.45,,,,,
PRO,0,移载装置(上下为气缸)15、16-模块1,PRO_AOI_IP_33,192.168.101.46,,,,,
PRO,0,移载装置(上下为气缸)15、16-模块2,PRO_AOI_IP_34,192.168.101.47,,,,,
PRO,0,移载装置(上下为气缸)17、18-模块1,PRO_AOI_IP_35,192.168.101.48,,,,,
PRO,0,移载装置(上下为气缸)17、18-模块2,PRO_AOI_IP_36,192.168.101.49,,,,,
PRO,0,移载装置(上下为伺服)01、02-模块1,PRO_AOI_IP_19,192.168.209.32,,,,,
PRO,0,移载装置(上下为伺服)01、02-模块2,PRO_AOI_IP_20,192.168.209.33,,,,,
PRO,0,移载装置(上下为伺服)03、04-模块1,PRO_AOI_IP_21,192.168.209.34,,,,,
PRO,0,移载装置(上下为伺服)03、04-模块2,PRO_AOI_IP_22,192.168.209.35,,,,,
PRO,0,移载装置(上下为伺服)05、06-模块1,PRO_AOI_IP_23,192.168.209.36,,,,,
PRO,0,移载装置(上下为伺服)05、06-模块2,PRO_AOI_IP_24,192.168.209.37,,,,,
PRO,0,移载装置(上下为伺服)07、08-模块1,PRO_AOI_IP_25,192.168.209.38,,,,,
PRO,0,移载装置(上下为伺服)07、08-模块2,PRO_AOI_IP_26,192.168.209.39,,,,,
PRO,0,移载装置(上下为伺服)09、10-模块1,PRO_AOI_IP_27,192.168.209.40,,,,,
PRO,0,移载装置(上下为伺服)09、10-模块2,PRO_AOI_IP_28,192.168.209.41,,,,,
PRO,0,移载装置(上下为气缸)11、12-模块1,PRO_AOI_IP_29,192.168.209.42,,,,,
PRO,0,移载装置(上下为气缸)11、12-模块2,PRO_AOI_IP_30,192.168.209.43,,,,,
PRO,0,移载装置(上下为气缸)13、14-模块1,PRO_AOI_IP_31,192.168.209.44,,,,,
PRO,0,移载装置(上下为气缸)13、14-模块2,PRO_AOI_IP_32,192.168.209.45,,,,,
PRO,0,移载装置(上下为气缸)15、16-模块1,PRO_AOI_IP_33,192.168.209.46,,,,,
PRO,0,移载装置(上下为气缸)15、16-模块2,PRO_AOI_IP_34,192.168.209.47,,,,,
PRO,0,移载装置(上下为气缸)17、18-模块1,PRO_AOI_IP_35,192.168.209.48,,,,,
PRO,0,移载装置(上下为气缸)17、18-模块2,PRO_AOI_IP_36,192.168.209.49,,,,,
,,,,,,,,,
PRO,0,移栽装置1-托盘-RFID-IP,PRO_RFIP_001,192.168.210.103,,,,,
PRO,0,移栽装置2-托盘-RFID-IP,PRO_RFIP_002,192.168.210.104,,,,,
......@@ -67,8 +67,8 @@ PRO,0,入料流水线3-上料模块-RFID-IP,PRO_RFIP_103-1,192.168.210.115,,,,,
PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,
PRO,0,气压检测信号关闭需要持续的时间,AirCheckSeconds,600,,,,,
PRO,0,IO信号超时时间(毫秒),IOSingle_TimerOut,15000,,,,,
PRO,0,IO模块对应的DI数量,IO_DILength,192.168.101.33#8;192.168.101.35#8;192.168.101.37#8;192.168.101.39#8;192.168.101.41#8;,,,,,
PRO,0,模块对应的DO数量,IO_DOLength,192.168.101.33#8;192.168.101.35#8;192.168.101.37#8;192.168.101.39#8;192.168.101.41#8;,,,,,
PRO,0,IO模块对应的DI数量,IO_DILength,192.168.209.33#8;192.168.209.35#8;192.168.209.37#8;192.168.209.39#8;192.168.209.41#8;,,,,,
PRO,0,模块对应的DO数量,IO_DOLength,192.168.209.33#8;192.168.209.35#8;192.168.209.37#8;192.168.209.39#8;192.168.209.41#8;,,,,,
,,,,,,,,,
,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X001,X001
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,COM2,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM2,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,17,COM5,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,18,COM5,0,,,
......@@ -14,4 +14,4 @@ PRO,0,移栽上下轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,
PRO,0,移栽上下轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,
PRO,0,移栽上下轴走到待机点P1速度,UpdownAxis_P1Speed,400,,,,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,,,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,,,,
\ No newline at end of file
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,,,,
......@@ -35,8 +35,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-MoveInfo");
SecondMoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-SecondMoveInfo");
int id = DeviceID % 100;
TrayLine1 = new OutTrayLineBean("皮带线-" + (id - 1) * 3+1, IO_Type.EntryLocation_Check1, IO_Type.ExitLocation_Check1, IO_Type.ExitTray_Check1,IO_Type.DLine_Run1, IO_Type.EntryTray_Check3, this);
TrayLine2 = new OutTrayLineBean("皮带线-" + (id - 1) * 3+2, IO_Type.EntryLocation_Check2, IO_Type.ExitLocation_Check2, IO_Type.ExitTray_Check2,IO_Type.DLine_Run2,IO_Type.MiddleTray_Check3,this);
TrayLine1 = new OutTrayLineBean("皮带线" + (id - 1) * 3+1, IO_Type.EntryLocation_Check1, IO_Type.ExitLocation_Check1, IO_Type.ExitTray_Check1,IO_Type.DLine_Run1, IO_Type.EntryTray_Check3, this);
TrayLine2 = new OutTrayLineBean("皮带线" + (id - 1) * 3+2, IO_Type.EntryLocation_Check2, IO_Type.ExitLocation_Check2, IO_Type.ExitTray_Check2,IO_Type.DLine_Run2,IO_Type.MiddleTray_Check3,this);
Line3Turn = new LineTurnBean(DeviceID);
}
......@@ -82,7 +82,7 @@ namespace OnlineStore.DeviceLibrary
ResetClearData();
lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.DL_R_CylinderDown);
CylinderMove(MoveInfo, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
CylinderMove(null, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
IOMove(IO_Type.DLine_RunStatus, IO_VALUE.HIGH);
IOMove(IO_Type.DLine_RunAlarm, IO_VALUE.LOW);
......@@ -125,7 +125,6 @@ namespace OnlineStore.DeviceLibrary
default: break;
}
}
}
/// <summary>
......@@ -244,26 +243,50 @@ namespace OnlineStore.DeviceLibrary
{
//判断皮带三还有料盘,需要转动一个工位
LogInfo("皮带线3空闲,且流水线还有料盘,转动一个工位");
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3);
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess);
}
//皮带线3出口无料
if (TrayLine1.MoveInfo.MoveType.Equals(LineMoveType.None) &&
Line3Turn.InTurn.Equals(false) &&
TrayLine1.LastTrayPosition > 0 &&
TrayLine1.LastTrayPosition < 5 &&
IOValue(IO_Type.EntryTray_Check3).Equals(IO_VALUE.LOW))
//皮带线1出口无料
if (TrayLine1.MoveInfo.MoveType.Equals(LineMoveType.None) &&
TrayLine1.LastTrayPosition > 0 &&
TrayLine1.LastTrayPosition < 5
)
{
TrayLine1.LineStartTurn();
if (IOValue(IO_Type.ExitTray_Check1).Equals(IO_VALUE.LOW))
{
//皮带线1出口无料
TrayLine1.LineStartTurn();
}
else if (IOValue(IO_Type.ExitTray_Check1).Equals(IO_VALUE.HIGH))
{
//皮带线1出口有料,皮带3入库无料,且在停止状态
if (Line3Turn.InTurn.Equals(false) && IOValue(IO_Type.EntryTray_Check3).Equals(IO_VALUE.LOW))
{
TrayLine1.Line3CanRun = false;
TrayLine1.LineStartTurn();
}
}
}
//皮带线3出口无料
if (TrayLine2.MoveInfo.MoveType.Equals(LineMoveType.None) &&
Line3Turn.InTurn.Equals(false) &&
TrayLine2.LastTrayPosition > 0 &&
TrayLine2.LastTrayPosition < 5 &&
IOValue(IO_Type.MiddleTray_Check3).Equals(IO_VALUE.LOW))
if (TrayLine2.MoveInfo.MoveType.Equals(LineMoveType.None) &&
TrayLine2.LastTrayPosition > 0 &&
TrayLine2.LastTrayPosition < 5
)
{
TrayLine2.LineStartTurn();
}
if (IOValue(IO_Type.ExitTray_Check2).Equals(IO_VALUE.LOW))
{
//皮带线1出口无料
TrayLine2.LineStartTurn();
}
else if (IOValue(IO_Type.ExitTray_Check2).Equals(IO_VALUE.HIGH))
{
//皮带线1出口有料,皮带3入库无料,且在停止状态
if (Line3Turn.InTurn.Equals(false) && IOValue(IO_Type.MiddleTray_Check3).Equals(IO_VALUE.LOW))
{
TrayLine2.Line3CanRun = false;
TrayLine2.LineStartTurn();
}
}
}
}
IOTimeOutProcess();
......@@ -277,7 +300,35 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.DLine_RunAlarm, IO_VALUE.HIGH);
}
}
/// <summary>
/// 转动结束,最后一盘料的位置+1
/// </summary>
/// <param name="result"></param>
public void Line3EndProcess(bool result)
{
if (result)
{
if (Line3LastTrayP > 0)
{
Line3LastTrayP++;
}
}
}
public virtual string GetMoveStr()
{
string msg = "";
int tLength = 15;
msg += "runStatus:".PadRight(tLength, ' ') + runStatus + "\n";
msg += "lineStatus:".PadRight(tLength, ' ') + lineStatus + "\n";
msg += "MoveType:".PadRight(tLength, ' ') + MoveInfo.MoveType + "\n";
msg += "MoveStep:".PadRight(tLength, ' ') + MoveInfo.SLog + "\n";
msg += "Line1-Move:".PadRight(tLength, ' ') + TrayLine1.MoveInfo.MoveType +" " + TrayLine1.MoveInfo.MoveStep + "\n";
msg += "Line2-Move:".PadRight(tLength, ' ') + TrayLine2.MoveInfo.MoveType + " " + TrayLine2.MoveInfo.MoveStep + "\n";
msg += "LastTrayP:".PadRight(tLength, ' ') + TrayLine1.LastTrayPosition+" " + TrayLine2.LastTrayPosition + " " + Line3LastTrayP + " " + "\n";
msg += "Line3CanRun:".PadRight(tLength, ' ') + TrayLine1.Line3CanRun + " " + TrayLine2.Line3CanRun + " " + "\n";
return msg;
}
public override bool StartInStoreMove(InOutParam param)
{
return false;
......
......@@ -103,36 +103,50 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_01_WaitTime))
{
MoveInfo.NextMoveStep(LineMoveStep.DO_02_ScanCode);
LogInfo("检测到皮带线3出口有料,开始扫码");
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitDLineScanCode());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
try
List<string> cameraList = Config.GetCameraList();
if (cameraList.Count > 0)
{
Task<List<string>> scanTask = Task.Factory.StartNew(delegate
LogInfo("检测到皮带线3出口有料,开始扫码");
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitDLineScanCode());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
try
{
LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
if (LastCodeList.Count <= 0)
Task<List<string>> scanTask = Task.Factory.StartNew(delegate
{
LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
}
return LastCodeList;
});
if (LastCodeList.Count <= 0)
{
LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
}
return LastCodeList;
});
}
catch (Exception ex)
{
LogUtil.error("FI_13_ScanCode扫码出错:" + ex.ToString());
}
}
catch (Exception ex)
else
{
LogUtil.error("FI_13_ScanCode扫码出错:" + ex.ToString());
LogInfo("检测到皮带线3出口有料,未取到相机名称,不扫码,等待1000后继续");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_02_ScanCode))
{
MoveInfo.NextMoveStep(LineMoveStep.DO_03_GetTraySize);
LogInfo("检测到皮带线3出口有料,根据二维码从服务器获取料盘尺寸");
string lastCode = "";
foreach (string code in LastCodeList)
{
lastCode += code;
}
//TODO
LastWidth = 7;
LastHeight = 8;
LogInfo("检测到皮带线3出口有料,二维码[" + lastCode + "] 获取料盘尺寸【" + LastWidth + "X" + LastHeight + "】");
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize))
{
......@@ -155,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DO_05_LineRun);
LogInfo("检测到皮带线3出口有料,转动皮带线,同时转动分盘装置");
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH);
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3);
Line3Turn.StartLineRun(IO_Type.DLine_Run3, IO_Type.Location_Check3, Line3EndProcess);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Location_Check3, IO_VALUE.HIGH));
......
......@@ -518,7 +518,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " " + "[" + posId + "] " + msg);
}
}
public string GetMoveStr()
public virtual string GetMoveStr()
{
string msg = "";
int tLength = 15;
......
......@@ -68,24 +68,24 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
internal bool DLineStopOut(int dlineId, int LineNum)
{
foreach (DischargeLine line in DisLineMap.Values)
{
if ((line.DeviceID % 100).Equals(dlineId))
{
if (LineNum.Equals(1) && line.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
line.MoveInfo.EndMove();
}
else if (LineNum.Equals(2) && line.SecondMoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
line.SecondMoveInfo.EndMove();
}
}
}
return false;
}
//internal bool DLineStopOut(int dlineId, int LineNum)
//{
// foreach (DischargeLine line in DisLineMap.Values)
// {
// if ((line.DeviceID % 100).Equals(dlineId))
// {
// if (LineNum.Equals(1) && line.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
// {
// line.MoveInfo.EndMove();
// }
// else if (LineNum.Equals(2) && line.SecondMoveInfo.MoveType.Equals(LineMoveType.OutStore))
// {
// line.SecondMoveInfo.EndMove();
// }
// }
// }
// return false;
//}
private bool isInprocess = false;
private DateTime lastProTime = DateTime.Now;
private void InOutTimerProcess()
......@@ -197,32 +197,38 @@ namespace OnlineStore.DeviceLibrary
if (!wait.IsEnd)
{
List<WriteIOInfo> wLists = checkWaitInfo.WriteIoList;
TimeSpan rwSpan = DateTime.Now - preRWTime;
if (span.TotalMilliseconds > LineManager.Config.IOSingle_TimerOut)
//一分钟还未检测到
if (span.TotalMilliseconds > LineManager.Config.IOSingle_TimerOut && NoAlarm())
{
ConfigIO io = Config.getWaitIO(wait.IoType);
if (NoAlarm())
{
WarnMsg = Name + " 等待" + NotOkMsg + "超时";
Alarm(LineAlarmType.IoSingleTimeOut);
LogUtil.error(checkWaitInfo.Name + ":" + checkWaitInfo.MoveStep + "等待" + NotOkMsg + "超时", 101);
}
isOk = false;
break;
ConfigIO io = baseConfig.getWaitIO(wait.IoType);
WarnMsg = Name + "等待" + NotOkMsg + " 超时";
Alarm(LineAlarmType.IoSingleTimeOut);
LogUtil.error(MoveInfo.Name + WarnMsg, DeviceID + 13);
}
else if (rwSpan.TotalSeconds > 3 && span.TotalSeconds > 3 && (wLists != null) && wLists.Count > 0)
else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6)
{
preRWTime = DateTime.Now;
string msg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "]" + " 已等待 " + NotOkMsg + Math.Abs(span.TotalSeconds) + "秒,重写DO:";
foreach (WriteIOInfo ww in wLists)
string msg = checkWaitInfo.Name + " " + NotOkMsg + "已等待 " + Math.Abs(span.TotalSeconds) + "秒,重写DO:";
bool isLog = false;
foreach (WaitResultInfo ww in list)
{
if (ww != null && ww.WaitType.Equals(2) && baseConfig.DOList.ContainsKey(ww.IoType))
{
isLog = true;
IOMove(ww.IoType, ww.IoValue);
msg += ww.ToStr() + ",";
}
}
if (isLog)
{
IOMove(ww.IoType, ww.IoValue);
msg += "[" + ww.IoType + "=" + ww.IoValue + "],";
LogUtil.error(msg);
}
LogUtil.error(msg);
}
isOk = false;
break;
}
}
else if (wait.WaitType.Equals(WaitEnum.W003_Time))
{
......
......@@ -30,7 +30,7 @@ namespace OnlineStore.DeviceLibrary
private LineTurnBean lineRun = null;
internal LineMoveInfo MoveInfo = null;
internal bool Line3CanRun = false;
internal bool Line3CanRun = true ;
public OutTrayLineBean(string name, string entryLocationS, string exitLocationS, string exittrayS, string lineRundo, string line3checkDi, DischargeLine equipBean)
{
lineRun = new LineTurnBean(equipBean.DeviceID);
......@@ -95,13 +95,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DLO_03_LineRun);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "入口出口都没有料盘,转动皮带线到入口定位亮");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
lineRun.StartLineRun(LineRun_Do, EntryLocation_Check);
lineRun.StartLineRun(LineRun_Do, EntryLocation_Check, null);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_03_LineRun))
{
if (lineRun.InTurn.Equals(false))
{
LastTrayPosition++;
MoveInfo.NextMoveStep(LineMoveStep.DLO_04_CanReviceTray);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "可以放入料盘,------------等待移栽放下料盘--------");
if (equipBean.IsDebug)
......@@ -123,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DLO_06_LineRun_OutLocation_Check);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------料盘已放下--------皮带线转动到出口定位信号亮");
LastTrayPosition = 1;
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check);
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check,null);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_06_LineRun_OutLocation_Check))
{
......@@ -136,9 +135,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_07_LineRun))
{
if (lineRun.InTurn.Equals(false))
{
Line3CanRun = true;
LastTrayPosition++;
{
if (equipBean.IOValue(ExitTray_Check).Equals(IO_VALUE.HIGH))
{
......@@ -186,15 +183,26 @@ namespace OnlineStore.DeviceLibrary
}
MoveInfo.NextMoveStep(LineMoveStep.DLO_07_LineRun);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "最后一盘料位置【" + LastTrayPosition + "】,出口有料盘,继续转动一个工位");
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check);
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check,LineEndProcess);
}
public void LineStartTurn()
{
LogUtil.info(Name + "转动一个工位");
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check);
LastTrayPosition++;
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check,LineEndProcess);
}
/// <summary>
/// 转动结束,最后一盘料的位置+1
/// </summary>
/// <param name="result"></param>
public void LineEndProcess(bool result)
{
if (result&&LastTrayPosition>0)
{
LastTrayPosition++;
Line3CanRun = true;
}
}
#endregion
......@@ -202,6 +210,8 @@ namespace OnlineStore.DeviceLibrary
public class LineTurnBean
{
public delegate void TurnEndDel(bool result);
public TurnEndDel turnEnd = null;
public bool InTurn = false;
private string LastMoveDO = "";
private string LastCheckDI = "";
......@@ -218,9 +228,10 @@ namespace OnlineStore.DeviceLibrary
InTurn = false;
}
}
public void StartLineRun(string moveDO, string checkDI, int timeOutMS = 30000)
public void StartLineRun(string moveDO, string checkDI, TurnEndDel endProcess, int timeOutMS = 30000)
{
InTurn = true;
this.turnEnd = endProcess;
Task.Factory.StartNew(delegate
{
LineRunAndWait(moveDO, checkDI, timeOutMS);
......@@ -245,7 +256,7 @@ namespace OnlineStore.DeviceLibrary
if (!InTurn)
{
isStop = true;
result = "停止运动";
result = "手动停止";
}
else if (span.TotalMilliseconds > timeOutMS)
{
......@@ -272,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
if (!InTurn)
{
isStop = true;
result = "停止运动";
result = "手动停止";
}
else if (span.TotalMilliseconds > timeOutMS)
{
......@@ -288,12 +299,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info("停止运动:" + result + " " + moveDO);
IOManager.IOMove(moveDO, IO_VALUE.LOW, subType);
turnEnd?.Invoke(result.Equals(""));
InTurn = false;
return result;
}
}
}
}
}
......@@ -315,24 +315,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("出库 " + MoveInfo.SLog + " : 上下气缸上升,同时出库皮带线开始出库准备");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove();
int id = DeviceID % 100;
if (id.Equals(1))
{
LineManager.Line.DisLineMap[301].TrayLine1.StartOut(MoveInfo.MoveParam);
}
else if (id.Equals(2))
{
LineManager.Line.DisLineMap[301].TrayLine2.StartOut(MoveInfo.MoveParam);
}
else if (id.Equals(3))
{
LineManager.Line.DisLineMap[302].TrayLine1.StartOut(MoveInfo.MoveParam);
}
else if (id.Equals(4))
{
LineManager.Line.DisLineMap[302].TrayLine2.StartOut(MoveInfo.MoveParam);
}
StartLineOut();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_04_UpDownCylinderUp))
{
......@@ -353,10 +336,14 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown);
OutLog("出库:" + MoveInfo.SLog + " ,上下气缸下降)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
//判断是否可以下降
if (LineIsReady())
{
MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown);
OutLog("出库:" + MoveInfo.SLog + " ,上下气缸下降)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown))
{
......@@ -374,12 +361,12 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter);
OutLog("出库:" + MoveInfo.SLog + ",前后气缸后退,等待4000 ");
OutLog("出库:" + MoveInfo.SLog + ",前后气缸后退,等待4000 ,出料皮带线开始继续运动");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000));
//出料皮带线停止出库
LineManager.Line.DLineStopOut(Config.DLineEquipNum, Config.DLineLineNum);
DisLineCanContiune();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_10_BeforeAfterCylinderAfter))
{
......@@ -389,8 +376,75 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove();
}
}
private OutTrayLineBean GetDisLine()
{
try
{
int id = DeviceID % 100;
if (id.Equals(1))
{
return LineManager.Line.DisLineMap[301].TrayLine1;
}
else if (id.Equals(2))
{
return LineManager.Line.DisLineMap[301].TrayLine2;
}
else if (id.Equals(3))
{
return LineManager.Line.DisLineMap[302].TrayLine1;
}
else if (id.Equals(4))
{
return LineManager.Line.DisLineMap[302].TrayLine2;
}
}
catch (Exception ex)
{
LogUtil.error(Name + ex.ToString());
}return null;
}
private void DisLineCanContiune()
{
OutTrayLineBean outline = GetDisLine();
if (outline != null)
{
outline.MoveInfo.NextMoveStep(LineMoveStep.DLO_05_TrayIsOk);
LogUtil.info(Name +"放料到皮带线完成,皮带线"+outline.MoveInfo.Name+" "+outline.MoveInfo.SLog);
}
else
{
LogUtil.error(Name + "未找到对应的皮带线");
}
}
private bool LineIsReady()
{
OutTrayLineBean outline = GetDisLine();
if (outline != null)
{
return outline.MoveInfo.MoveStep.Equals(LineMoveStep.DLO_04_CanReviceTray);
}
else
{
LogUtil.error(Name + "未找到对应的皮带线");
}
return false;
}
private void StartLineOut()
{
OutTrayLineBean outline = GetDisLine();
if (outline != null)
{
outline.StartOut(MoveInfo.MoveParam);
}
else
{
LogUtil.error(Name + "未找到对应的皮带线");
}
}
#endregion
......
......@@ -74,7 +74,7 @@ namespace OnlineStore.DeviceLibrary
return new RFIDData(-1, -1);
}
internal static string GetRFIP(int subType, int rtType = 0)
public static string GetRFIP(int subType, int rtType = 0)
{
string ip = "";
string rtName = DeviceConfig.RFIP_Str + "_" + subType.ToString().PadLeft(3, '0');
......
......@@ -149,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
}
private static int codeCount = ConfigAppSettings.GetIntValue(Setting_Init.CodeCount);
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraNameList = null)
public static List<string> CameraScan(List<string> cameraList = null)
{
if (codeCount < 1)
{
......@@ -157,14 +157,18 @@ namespace OnlineStore.DeviceLibrary
}
List<string> codeList = new List<string>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if (cameraNameList == null)
if (cameraList == null || cameraList.Count <= 0)
{
return codeList;
}
try
{
foreach (string cameraName in cameraNameList)
foreach (string cameraName in cameraList)
{
if (cameraName.Trim().Equals(""))
{
continue;
}
using (Bitmap bitmap = GetCamerImage(cameraName))
{
if (bitmap == null)
......
......@@ -304,7 +304,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// DI 皮带线3入口料盘检测, EntryTray_Check3,9, PRO_AOI_IP_2,0, 皮带线3入口料盘检测, X030, X030
/// </summary>
public static string EntryTray_Check3 = " EntryTray_Check3";
public static string EntryTray_Check3 = "EntryTray_Check3";
/// <summary>
/// DI 皮带线3中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_2,0,皮带线3中间位置料盘检测,X031,X031
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!