Commit 02f9b237 LN

io操作按钮调整

1 个父辈 351aea0a
...@@ -90,6 +90,12 @@ ...@@ -90,6 +90,12 @@
<Compile Include="FrmDischargeLine.Designer.cs"> <Compile Include="FrmDischargeLine.Designer.cs">
<DependentUpon>FrmDischargeLine.cs</DependentUpon> <DependentUpon>FrmDischargeLine.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmEquipBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmEquipBase.Designer.cs">
<DependentUpon>FrmEquipBase.cs</DependentUpon>
</Compile>
<Compile Include="FrmProvidingEquip.cs"> <Compile Include="FrmProvidingEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
......
...@@ -16,34 +16,19 @@ ...@@ -16,34 +16,19 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProvidingEquip)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDischargeLine));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.txtSlaveId = new System.Windows.Forms.TextBox(); this.txtSlaveId = new System.Windows.Forms.TextBox();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox(); this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.btnReadAllDi = new System.Windows.Forms.Button();
this.btnReadAllDo = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button(); this.btnCloseAll = new System.Windows.Forms.Button();
this.btnStop2Up = new System.Windows.Forms.Button();
this.btnStop1Up = new System.Windows.Forms.Button(); this.btnStop1Up = new System.Windows.Forms.Button();
this.btnClampSlack = new System.Windows.Forms.Button();
this.btnUpDownUp = new System.Windows.Forms.Button();
this.btnBeforeAfterBefore = new System.Windows.Forms.Button();
this.btnTopUp = new System.Windows.Forms.Button();
this.chbDebug = new System.Windows.Forms.CheckBox(); this.chbDebug = new System.Windows.Forms.CheckBox();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.lblStoreStatus = new System.Windows.Forms.Label(); this.lblStoreStatus = new System.Windows.Forms.Label();
...@@ -57,6 +42,14 @@ ...@@ -57,6 +42,14 @@
this.lblTrayNum = new System.Windows.Forms.Label(); this.lblTrayNum = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label(); this.lblInstoreList = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.btnOpenDo = new System.Windows.Forms.Button();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -74,19 +67,17 @@ ...@@ -74,19 +67,17 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName); this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.cmbWriteIO); this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.btnWriteSingleDO); this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime); this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi); this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.btnReadAllDo); this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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(497, 6); this.groupBox1.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
...@@ -95,17 +86,6 @@ ...@@ -95,17 +86,6 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(153, 114);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(51, 21);
this.checkBox1.TabIndex = 256;
this.checkBox1.Text = "打开";
this.checkBox1.UseVisualStyleBackColor = true;
//
// txtSlaveId // txtSlaveId
// //
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -117,26 +97,6 @@ ...@@ -117,26 +97,6 @@
this.txtSlaveId.Text = "0"; this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false; this.txtSlaveId.Visible = false;
// //
// txtDOIndex
//
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(304, 68);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 242;
this.txtDOIndex.Text = "0";
//
// txtDoName
//
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(79, 68);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23);
this.txtDoName.TabIndex = 241;
this.txtDoName.Text = "0";
//
// chbAutoRead // chbAutoRead
// //
this.chbAutoRead.AutoSize = true; this.chbAutoRead.AutoSize = true;
...@@ -151,28 +111,6 @@ ...@@ -151,28 +111,6 @@
this.chbAutoRead.UseVisualStyleBackColor = true; this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false; this.chbAutoRead.Visible = false;
// //
// label17
//
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(9, 71);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17);
this.label17.TabIndex = 240;
this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label14
//
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(233, 71);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17);
this.label14.TabIndex = 239;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbWriteIO // cmbWriteIO
// //
this.cmbWriteIO.DisplayMember = "ProName"; this.cmbWriteIO.DisplayMember = "ProName";
...@@ -189,67 +127,6 @@ ...@@ -189,67 +127,6 @@
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem); this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged); this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// btnWriteSingleDO
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(220, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(140, 34);
this.btnWriteSingleDO.TabIndex = 232;
this.btnWriteSingleDO.Text = "写入DO";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
//
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(79, 113);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(59, 23);
this.txtWriteTime.TabIndex = 238;
this.txtWriteTime.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(13, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237;
this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnReadAllDi
//
this.btnReadAllDi.BackColor = System.Drawing.Color.White;
this.btnReadAllDi.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDi.Location = new System.Drawing.Point(44, 154);
this.btnReadAllDi.Name = "btnReadAllDi";
this.btnReadAllDi.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDi.TabIndex = 244;
this.btnReadAllDi.Text = "读取所有DI";
this.btnReadAllDi.UseVisualStyleBackColor = false;
this.btnReadAllDi.Click += new System.EventHandler(this.btnReadAllDi_Click);
//
// btnReadAllDo
//
this.btnReadAllDo.BackColor = System.Drawing.Color.White;
this.btnReadAllDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDo.Location = new System.Drawing.Point(220, 154);
this.btnReadAllDo.Name = "btnReadAllDo";
this.btnReadAllDo.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDo.TabIndex = 245;
this.btnReadAllDo.Text = "读取所有DO";
this.btnReadAllDo.UseVisualStyleBackColor = false;
this.btnReadAllDo.Click += new System.EventHandler(this.btnReadAllDo_Click);
//
// groupBox4 // groupBox4
// //
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -309,12 +186,7 @@ ...@@ -309,12 +186,7 @@
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnCloseAll); this.groupBox5.Controls.Add(this.btnCloseAll);
this.groupBox5.Controls.Add(this.btnStop2Up);
this.groupBox5.Controls.Add(this.btnStop1Up); this.groupBox5.Controls.Add(this.btnStop1Up);
this.groupBox5.Controls.Add(this.btnClampSlack);
this.groupBox5.Controls.Add(this.btnUpDownUp);
this.groupBox5.Controls.Add(this.btnBeforeAfterBefore);
this.groupBox5.Controls.Add(this.btnTopUp);
this.groupBox5.Location = new System.Drawing.Point(897, 6); this.groupBox5.Location = new System.Drawing.Point(897, 6);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(382, 208); this.groupBox5.Size = new System.Drawing.Size(382, 208);
...@@ -327,7 +199,7 @@ ...@@ -327,7 +199,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White; this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(44, 164); this.btnCloseAll.Location = new System.Drawing.Point(220, 26);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34); this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259; this.btnCloseAll.TabIndex = 259;
...@@ -335,19 +207,6 @@ ...@@ -335,19 +207,6 @@
this.btnCloseAll.UseVisualStyleBackColor = false; this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click); this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
// //
// btnStop2Up
//
this.btnStop2Up.BackColor = System.Drawing.Color.White;
this.btnStop2Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop2Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop2Up.Location = new System.Drawing.Point(220, 27);
this.btnStop2Up.Name = "btnStop2Up";
this.btnStop2Up.Size = new System.Drawing.Size(140, 34);
this.btnStop2Up.TabIndex = 258;
this.btnStop2Up.Text = "阻挡气缸2下降";
this.btnStop2Up.UseVisualStyleBackColor = false;
this.btnStop2Up.Click += new System.EventHandler(this.btnStop2Up_Click);
//
// btnStop1Up // btnStop1Up
// //
this.btnStop1Up.BackColor = System.Drawing.Color.White; this.btnStop1Up.BackColor = System.Drawing.Color.White;
...@@ -357,62 +216,10 @@ ...@@ -357,62 +216,10 @@
this.btnStop1Up.Name = "btnStop1Up"; this.btnStop1Up.Name = "btnStop1Up";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34); this.btnStop1Up.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256; this.btnStop1Up.TabIndex = 256;
this.btnStop1Up.Text = "阻挡气缸1下降"; this.btnStop1Up.Text = "定位气缸上升";
this.btnStop1Up.UseVisualStyleBackColor = false; this.btnStop1Up.UseVisualStyleBackColor = false;
this.btnStop1Up.Click += new System.EventHandler(this.btnStop1Up_Click); this.btnStop1Up.Click += new System.EventHandler(this.btnStop1Up_Click);
// //
// btnClampSlack
//
this.btnClampSlack.BackColor = System.Drawing.Color.White;
this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampSlack.Location = new System.Drawing.Point(220, 116);
this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255;
this.btnClampSlack.Text = "夹料气缸夹紧";
this.btnClampSlack.UseVisualStyleBackColor = false;
this.btnClampSlack.Click += new System.EventHandler(this.btnClampSlack_Click);
//
// btnUpDownUp
//
this.btnUpDownUp.BackColor = System.Drawing.Color.White;
this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownUp.Location = new System.Drawing.Point(220, 72);
this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252;
this.btnUpDownUp.Text = "上下气缸上升";
this.btnUpDownUp.UseVisualStyleBackColor = false;
this.btnUpDownUp.Click += new System.EventHandler(this.btnUpDownUp_Click);
//
// btnBeforeAfterBefore
//
this.btnBeforeAfterBefore.BackColor = System.Drawing.Color.White;
this.btnBeforeAfterBefore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBeforeAfterBefore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBeforeAfterBefore.Location = new System.Drawing.Point(44, 116);
this.btnBeforeAfterBefore.Name = "btnBeforeAfterBefore";
this.btnBeforeAfterBefore.Size = new System.Drawing.Size(140, 34);
this.btnBeforeAfterBefore.TabIndex = 249;
this.btnBeforeAfterBefore.Text = "前后气缸前进";
this.btnBeforeAfterBefore.UseVisualStyleBackColor = false;
this.btnBeforeAfterBefore.Click += new System.EventHandler(this.btnBeforeAfterBefore_Click);
//
// btnTopUp
//
this.btnTopUp.BackColor = System.Drawing.Color.White;
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(44, 72);
this.btnTopUp.Name = "btnTopUp";
this.btnTopUp.Size = new System.Drawing.Size(140, 34);
this.btnTopUp.TabIndex = 246;
this.btnTopUp.Text = "顶升气缸上升";
this.btnTopUp.UseVisualStyleBackColor = false;
this.btnTopUp.Click += new System.EventHandler(this.btnTopUp_Click);
//
// chbDebug // chbDebug
// //
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
...@@ -577,7 +384,101 @@ ...@@ -577,7 +384,101 @@
this.panel1.Size = new System.Drawing.Size(1295, 68); this.panel1.Size = new System.Drawing.Size(1295, 68);
this.panel1.TabIndex = 258; this.panel1.TabIndex = 258;
// //
// FrmProvidingEquip // txtDOIndex
//
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(328, 67);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 268;
this.txtDOIndex.Text = "0";
//
// txtDoName
//
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(71, 67);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 267;
this.txtDoName.Text = "0";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(19, 70);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 266;
this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(272, 70);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 265;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnOpenDo
//
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(169, 107);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(100, 34);
this.btnOpenDo.TabIndex = 264;
this.btnOpenDo.Text = "打开";
this.btnOpenDo.UseVisualStyleBackColor = false;
this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
//
// btnWriteSingleDO
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(275, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(100, 34);
this.btnWriteSingleDO.TabIndex = 261;
this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
//
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(82, 113);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(66, 23);
this.txtWriteTime.TabIndex = 263;
this.txtWriteTime.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(19, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 262;
this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmDischargeLine
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
...@@ -587,8 +488,8 @@ ...@@ -587,8 +488,8 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmProvidingEquip"; this.Name = "FrmDischargeLine";
this.Text = "移栽——"; this.Text = "出料流水线——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
...@@ -615,23 +516,10 @@ ...@@ -615,23 +516,10 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.ComboBox cmbWriteIO; private System.Windows.Forms.ComboBox cmbWriteIO;
private System.Windows.Forms.CheckBox chbAutoRead; private System.Windows.Forms.CheckBox chbAutoRead;
private System.Windows.Forms.Button btnReadAllDi;
private System.Windows.Forms.Button btnReadAllDo;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.TextBox txtSlaveId; private System.Windows.Forms.TextBox txtSlaveId;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack;
private System.Windows.Forms.Button btnUpDownUp;
private System.Windows.Forms.Button btnBeforeAfterBefore;
private System.Windows.Forms.Button btnTopUp;
private System.Windows.Forms.Label lblThisSta; private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.Label lblStoreStatus; private System.Windows.Forms.Label lblStoreStatus;
private System.Windows.Forms.Button btnStart; private System.Windows.Forms.Button btnStart;
...@@ -639,16 +527,22 @@ ...@@ -639,16 +527,22 @@
private System.Windows.Forms.Button btnReset; private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnOutStore; private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.CheckBox chbDebug; private System.Windows.Forms.CheckBox chbDebug;
private System.Windows.Forms.Button btnStop2Up;
private System.Windows.Forms.Button btnStop1Up; private System.Windows.Forms.Button btnStop1Up;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll; private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum; private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList; private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
} }
} }
...@@ -20,11 +20,9 @@ using OnlineStore.Common; ...@@ -20,11 +20,9 @@ using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
public partial class FrmDischargeLine : FrmBase public partial class FrmDischargeLine : FrmEquipBase
{ {
private bool IsLoad = false; private bool IsLoad = false;
private string portName = "";
private short SlvAddr = 0;
private DischargeLine dischargeLine; private DischargeLine dischargeLine;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmDischargeLine(DischargeLine moveEquip) public FrmDischargeLine(DischargeLine moveEquip)
...@@ -123,11 +121,19 @@ namespace OnlineStore.AssemblyLine ...@@ -123,11 +121,19 @@ namespace OnlineStore.AssemblyLine
LogUtil.error(LOGGER, ex.StackTrace); LogUtil.error(LOGGER, ex.StackTrace);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e)
{
WriteDO(IO_VALUE.HIGH);
}
private void btnWriteSingleDO_Click(object sender, EventArgs e) private void btnWriteSingleDO_Click(object sender, EventArgs e)
{ {
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW; // IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0) if (time > 0)
...@@ -140,6 +146,7 @@ namespace OnlineStore.AssemblyLine ...@@ -140,6 +146,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private ConfigIO GetSelectDO() private ConfigIO GetSelectDO()
{ {
string text = cmbWriteIO.SelectedValue.ToString(); string text = cmbWriteIO.SelectedValue.ToString();
...@@ -227,16 +234,7 @@ namespace OnlineStore.AssemblyLine ...@@ -227,16 +234,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void btnReadAllDi_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDI(deviceName, (byte)slaveId);
}
public void FormStatus(bool isStart) public void FormStatus(bool isStart)
{ {
btnStart.Enabled = !isStart; btnStart.Enabled = !isStart;
...@@ -246,16 +244,7 @@ namespace OnlineStore.AssemblyLine ...@@ -246,16 +244,7 @@ namespace OnlineStore.AssemblyLine
btnOutStore.Enabled = isStart; btnOutStore.Enabled = isStart;
} }
private void btnReadAllDo_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDO(deviceName, (byte)slaveId );
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
...@@ -348,99 +337,32 @@ namespace OnlineStore.AssemblyLine ...@@ -348,99 +337,32 @@ namespace OnlineStore.AssemblyLine
} }
private void btnStop1Up_Click(object sender, EventArgs e) private void btnStop1Up_Click(object sender, EventArgs e)
{ {
if (btnStop1Up.Text.Equals("阻挡气缸1下降")) LogUtil.info("点击【" + btnStop1Up.Text + "】 ");
{ if (btnStop1Up.Text.Equals("定位气缸上升"))
dischargeLine.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); {
btnStop1Up.Text = "阻挡气缸1上升"; dischargeLine.CylinderMove(null, IO_Type.SeparateDevice_Down, IO_Type.SeparateDevice_Up);
btnStop1Up.Text = "定位气缸下降";
btnStop1Up.BackColor = Color.Aqua; btnStop1Up.BackColor = Color.Aqua;
} }
else else
{
dischargeLine.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
btnStop1Up.Text = "阻挡气缸1下降";
btnStop1Up.BackColor = Color.White;
}
}
private void btnStop2Up_Click(object sender, EventArgs e)
{
if (btnStop2Up.Text.Equals("阻挡气缸2下降"))
{ {
dischargeLine.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH); dischargeLine.CylinderMove(null, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
btnStop2Up.Text = "阻挡气缸2上升"; btnStop1Up.Text = "定位气缸上升";
btnStop2Up.BackColor = Color.Aqua; btnStop1Up.BackColor = Color.SkyBlue;
} }
else
{
dischargeLine.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
btnStop2Up.Text = "阻挡气缸2下降";
btnStop2Up.BackColor = Color.White;
}
} }
private void btnTopUp_Click(object sender, EventArgs e)
private void btnCloseAll_Click(object sender, EventArgs e)
{ {
if (btnTopUp.Text.Equals("顶升气缸上升")) IOManager.CloseDeviceDO(new List<ConfigIO>(dischargeLine.Config.DOList.Values));
foreach (Control con in groupBox5.Controls)
{ {
dischargeLine.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); if (con is Button)
btnTopUp.Text = "顶升气缸下降"; {
btnTopUp.BackColor = Color.Aqua; con.BackColor = BackColor = Color.White;
} }
else
{
dischargeLine.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
btnTopUp.Text = "顶升气缸上升";
btnTopUp.BackColor = Color.SkyBlue;
}
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
{
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进"))
{
dischargeLine.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
btnBeforeAfterBefore.Text = "前后气缸后退";
btnBeforeAfterBefore.BackColor = Color.Aqua;
}
else
{
dischargeLine.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
btnBeforeAfterBefore.Text = "前后气缸前进";
btnBeforeAfterBefore.BackColor = Color.SkyBlue;
}
}
private void btnUpDownUp_Click(object sender, EventArgs e)
{
if (btnUpDownUp.Text.Equals("上下气缸上升"))
{
dischargeLine.CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
btnUpDownUp.Text = "上下气缸下降";
btnUpDownUp.BackColor = Color.Aqua;
}
else
{
dischargeLine.CylinderMove(null, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
btnUpDownUp.Text = "上下气缸上升";
btnUpDownUp.BackColor = Color.SkyBlue;
}
}
private void btnClampSlack_Click(object sender, EventArgs e)
{
if (btnClampSlack.Text.Equals("夹料气缸夹紧"))
{
dischargeLine.CylinderMove(null, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
btnClampSlack.Text = "夹料气缸放松";
btnClampSlack.BackColor = Color.Aqua;
}
else
{
dischargeLine.CylinderMove(null, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
btnClampSlack.Text = "夹料气缸夹紧";
btnClampSlack.BackColor = Color.SkyBlue;
} }
} }
private void btnCloseAll_Click(object sender, EventArgs e)
{
IOManager.instance.CloseAllDO();
}
} }
......
namespace OnlineStore.AssemblyLine
{
partial class FrmEquipBase
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "FrmEquipBase";
}
#endregion
}
}
\ No newline at end of file \ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.AssemblyLine
{
public partial class FrmEquipBase : FrmBase
{
public FrmEquipBase()
{
InitializeComponent();
}
}
}
...@@ -19,31 +19,31 @@ ...@@ -19,31 +19,31 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFeedingEquip)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFeedingEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.txtSlaveId = new System.Windows.Forms.TextBox();
this.txtDOIndex = new System.Windows.Forms.TextBox(); this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox(); this.txtDoName = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.label17 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.btnOpenDo = new System.Windows.Forms.Button();
this.txtSlaveId = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.btnWriteSingleDO = new System.Windows.Forms.Button(); this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox(); this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.btnReadAllDi = new System.Windows.Forms.Button();
this.btnReadAllDo = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.Toroid_LocationCylinder = new System.Windows.Forms.Button();
this.btnToroid_TopCylinder = new System.Windows.Forms.Button();
this.btnCloseAll = new System.Windows.Forms.Button(); this.btnCloseAll = new System.Windows.Forms.Button();
this.btnStop2Up = new System.Windows.Forms.Button(); this.btnOutTopCylinder = new System.Windows.Forms.Button();
this.btnStop1Up = new System.Windows.Forms.Button(); this.btnLocationCylinder = new System.Windows.Forms.Button();
this.btnClampSlack = new System.Windows.Forms.Button(); this.btnTrayLocationCylinder = new System.Windows.Forms.Button();
this.btnUpDownUp = new System.Windows.Forms.Button(); this.btnFeedSideWayCylinder = new System.Windows.Forms.Button();
this.btnBeforeAfterBefore = new System.Windows.Forms.Button(); this.btnFeedCylinder = new System.Windows.Forms.Button();
this.btnTopUp = new System.Windows.Forms.Button(); this.btnFeedSideWay = new System.Windows.Forms.Button();
this.chbDebug = new System.Windows.Forms.CheckBox(); this.chbDebug = new System.Windows.Forms.CheckBox();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.lblStoreStatus = new System.Windows.Forms.Label(); this.lblStoreStatus = new System.Windows.Forms.Label();
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
this.label46 = new System.Windows.Forms.Label(); this.label46 = new System.Windows.Forms.Label();
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btnFL_TopCylinder = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -138,105 +139,109 @@ ...@@ -138,105 +139,109 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName); this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.cmbWriteIO); this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Controls.Add(this.btnWriteSingleDO); this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime); this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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(3, 534); this.groupBox1.Location = new System.Drawing.Point(3, 494);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(394, 205); this.groupBox1.Size = new System.Drawing.Size(394, 245);
this.groupBox1.TabIndex = 105; this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(153, 114);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(51, 21);
this.checkBox1.TabIndex = 256;
this.checkBox1.Text = "打开";
this.checkBox1.UseVisualStyleBackColor = true;
//
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(417, 26);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
this.txtSlaveId.TabIndex = 255;
this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false;
//
// txtDOIndex // txtDOIndex
// //
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(304, 68); this.txtDOIndex.Location = new System.Drawing.Point(326, 71);
this.txtDOIndex.MaxLength = 10; this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex"; this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23); this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 242; this.txtDOIndex.TabIndex = 260;
this.txtDOIndex.Text = "0"; this.txtDOIndex.Text = "0";
// //
// txtDoName // txtDoName
// //
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(79, 68); this.txtDoName.Location = new System.Drawing.Point(69, 71);
this.txtDoName.MaxLength = 10; this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName"; this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23); this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 241; this.txtDoName.TabIndex = 259;
this.txtDoName.Text = "0"; this.txtDoName.Text = "0";
// //
// chbAutoRead
//
this.chbAutoRead.AutoSize = true;
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(370, 69);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
this.chbAutoRead.Text = "自动读取";
this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false;
//
// label17 // label17
// //
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(9, 71); this.label17.Location = new System.Drawing.Point(17, 74);
this.label17.Name = "label17"; this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17); this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 240; this.label17.TabIndex = 258;
this.label17.Text = "设备IP:"; this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label14 // label14
// //
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(233, 71); this.label14.Location = new System.Drawing.Point(270, 74);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17); this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 239; this.label14.TabIndex = 257;
this.label14.Text = "地址:"; this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// btnOpenDo
//
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(167, 111);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(100, 34);
this.btnOpenDo.TabIndex = 256;
this.btnOpenDo.Text = "打开";
this.btnOpenDo.UseVisualStyleBackColor = false;
this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
//
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(417, 26);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
this.txtSlaveId.TabIndex = 255;
this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false;
//
// chbAutoRead
//
this.chbAutoRead.AutoSize = true;
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(370, 69);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
this.chbAutoRead.Text = "自动读取";
this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false;
//
// cmbWriteIO // cmbWriteIO
// //
this.cmbWriteIO.DisplayMember = "ProName"; this.cmbWriteIO.DisplayMember = "ProName";
...@@ -258,21 +263,21 @@ ...@@ -258,21 +263,21 @@
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White; this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(220, 107); this.btnWriteSingleDO.Location = new System.Drawing.Point(273, 111);
this.btnWriteSingleDO.Name = "btnWriteSingleDO"; this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(140, 34); this.btnWriteSingleDO.Size = new System.Drawing.Size(100, 34);
this.btnWriteSingleDO.TabIndex = 232; this.btnWriteSingleDO.TabIndex = 232;
this.btnWriteSingleDO.Text = "写入DO"; this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false; this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click); this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
// //
// txtWriteTime // txtWriteTime
// //
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(79, 113); this.txtWriteTime.Location = new System.Drawing.Point(80, 117);
this.txtWriteTime.MaxLength = 10; this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime"; this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(59, 23); this.txtWriteTime.Size = new System.Drawing.Size(66, 23);
this.txtWriteTime.TabIndex = 238; this.txtWriteTime.TabIndex = 238;
this.txtWriteTime.Text = "0"; this.txtWriteTime.Text = "0";
// //
...@@ -281,39 +286,13 @@ ...@@ -281,39 +286,13 @@
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(13, 116); this.label5.Location = new System.Drawing.Point(17, 120);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17); this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237; this.label5.TabIndex = 237;
this.label5.Text = "定时(ms):"; this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// btnReadAllDi
//
this.btnReadAllDi.BackColor = System.Drawing.Color.White;
this.btnReadAllDi.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDi.Location = new System.Drawing.Point(44, 154);
this.btnReadAllDi.Name = "btnReadAllDi";
this.btnReadAllDi.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDi.TabIndex = 244;
this.btnReadAllDi.Text = "读取所有DI";
this.btnReadAllDi.UseVisualStyleBackColor = false;
this.btnReadAllDi.Click += new System.EventHandler(this.btnReadAllDi_Click);
//
// btnReadAllDo
//
this.btnReadAllDo.BackColor = System.Drawing.Color.White;
this.btnReadAllDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDo.Location = new System.Drawing.Point(220, 154);
this.btnReadAllDo.Name = "btnReadAllDo";
this.btnReadAllDo.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDo.TabIndex = 245;
this.btnReadAllDo.Text = "读取所有DO";
this.btnReadAllDo.UseVisualStyleBackColor = false;
this.btnReadAllDo.Click += new System.EventHandler(this.btnReadAllDo_Click);
//
// groupBox4 // groupBox4
// //
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -321,7 +300,7 @@ ...@@ -321,7 +300,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2); this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(488, 6); this.groupBox4.Location = new System.Drawing.Point(488, 6);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(240, 524); this.groupBox4.Size = new System.Drawing.Size(240, 485);
this.groupBox4.TabIndex = 104; this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表"; this.groupBox4.Text = "DO列表";
...@@ -338,7 +317,7 @@ ...@@ -338,7 +317,7 @@
this.tableLayoutPanel2.RowCount = 2; 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.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(229, 504); this.tableLayoutPanel2.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox3 // groupBox3
...@@ -348,7 +327,7 @@ ...@@ -348,7 +327,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1); this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 6); this.groupBox3.Location = new System.Drawing.Point(6, 6);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(240, 524); this.groupBox3.Size = new System.Drawing.Size(240, 485);
this.groupBox3.TabIndex = 103; this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表"; this.groupBox3.Text = "DI列表";
...@@ -365,33 +344,63 @@ ...@@ -365,33 +344,63 @@
this.tableLayoutPanel1.RowCount = 2; 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.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(229, 504); this.tableLayoutPanel1.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// groupBox5 // groupBox5
// //
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 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))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnFL_TopCylinder);
this.groupBox5.Controls.Add(this.Toroid_LocationCylinder);
this.groupBox5.Controls.Add(this.btnToroid_TopCylinder);
this.groupBox5.Controls.Add(this.btnCloseAll); this.groupBox5.Controls.Add(this.btnCloseAll);
this.groupBox5.Controls.Add(this.btnStop2Up); this.groupBox5.Controls.Add(this.btnOutTopCylinder);
this.groupBox5.Controls.Add(this.btnStop1Up); this.groupBox5.Controls.Add(this.btnLocationCylinder);
this.groupBox5.Controls.Add(this.btnClampSlack); this.groupBox5.Controls.Add(this.btnTrayLocationCylinder);
this.groupBox5.Controls.Add(this.btnUpDownUp); this.groupBox5.Controls.Add(this.btnFeedSideWayCylinder);
this.groupBox5.Controls.Add(this.btnBeforeAfterBefore); this.groupBox5.Controls.Add(this.btnFeedCylinder);
this.groupBox5.Controls.Add(this.btnTopUp); this.groupBox5.Controls.Add(this.btnFeedSideWay);
this.groupBox5.Location = new System.Drawing.Point(974, 15); this.groupBox5.Location = new System.Drawing.Point(974, 6);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(340, 239); this.groupBox5.Size = new System.Drawing.Size(340, 485);
this.groupBox5.TabIndex = 255; this.groupBox5.TabIndex = 255;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
// //
// Toroid_LocationCylinder
//
this.Toroid_LocationCylinder.BackColor = System.Drawing.Color.White;
this.Toroid_LocationCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Toroid_LocationCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Toroid_LocationCylinder.Location = new System.Drawing.Point(162, 160);
this.Toroid_LocationCylinder.Name = "Toroid_LocationCylinder";
this.Toroid_LocationCylinder.Size = new System.Drawing.Size(140, 34);
this.Toroid_LocationCylinder.TabIndex = 261;
this.Toroid_LocationCylinder.Text = "环形线横移定位上升";
this.Toroid_LocationCylinder.UseVisualStyleBackColor = false;
this.Toroid_LocationCylinder.Click += new System.EventHandler(this.Toroid_LocationCylinder_Click);
//
// btnToroid_TopCylinder
//
this.btnToroid_TopCylinder.BackColor = System.Drawing.Color.White;
this.btnToroid_TopCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnToroid_TopCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnToroid_TopCylinder.Location = new System.Drawing.Point(14, 160);
this.btnToroid_TopCylinder.Name = "btnToroid_TopCylinder";
this.btnToroid_TopCylinder.Size = new System.Drawing.Size(140, 34);
this.btnToroid_TopCylinder.TabIndex = 260;
this.btnToroid_TopCylinder.Text = "环形线横移顶升上升";
this.btnToroid_TopCylinder.UseVisualStyleBackColor = false;
this.btnToroid_TopCylinder.Click += new System.EventHandler(this.btnToroid_TopCylinder_Click);
//
// btnCloseAll // btnCloseAll
// //
this.btnCloseAll.BackColor = System.Drawing.Color.White; this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(14, 164); this.btnCloseAll.Location = new System.Drawing.Point(14, 276);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34); this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259; this.btnCloseAll.TabIndex = 259;
...@@ -399,83 +408,83 @@ ...@@ -399,83 +408,83 @@
this.btnCloseAll.UseVisualStyleBackColor = false; this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click); this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
// //
// btnStop2Up // btnOutTopCylinder
// //
this.btnStop2Up.BackColor = System.Drawing.Color.White; this.btnOutTopCylinder.BackColor = System.Drawing.Color.White;
this.btnStop2Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOutTopCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop2Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOutTopCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop2Up.Location = new System.Drawing.Point(162, 27); this.btnOutTopCylinder.Location = new System.Drawing.Point(162, 27);
this.btnStop2Up.Name = "btnStop2Up"; this.btnOutTopCylinder.Name = "btnOutTopCylinder";
this.btnStop2Up.Size = new System.Drawing.Size(140, 34); this.btnOutTopCylinder.Size = new System.Drawing.Size(140, 34);
this.btnStop2Up.TabIndex = 258; this.btnOutTopCylinder.TabIndex = 258;
this.btnStop2Up.Text = "阻挡气缸2下降"; this.btnOutTopCylinder.Text = "SL出口顶升上升";
this.btnStop2Up.UseVisualStyleBackColor = false; this.btnOutTopCylinder.UseVisualStyleBackColor = false;
this.btnStop2Up.Click += new System.EventHandler(this.btnStop2Up_Click); this.btnOutTopCylinder.Click += new System.EventHandler(this.btnOutTopCylinder_Click);
// //
// btnStop1Up // btnLocationCylinder
// //
this.btnStop1Up.BackColor = System.Drawing.Color.White; this.btnLocationCylinder.BackColor = System.Drawing.Color.White;
this.btnStop1Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnLocationCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop1Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnLocationCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop1Up.Location = new System.Drawing.Point(14, 27); this.btnLocationCylinder.Location = new System.Drawing.Point(14, 27);
this.btnStop1Up.Name = "btnStop1Up"; this.btnLocationCylinder.Name = "btnLocationCylinder";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34); this.btnLocationCylinder.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256; this.btnLocationCylinder.TabIndex = 256;
this.btnStop1Up.Text = "阻挡气缸1下降"; this.btnLocationCylinder.Text = "SL定位气缸上升";
this.btnStop1Up.UseVisualStyleBackColor = false; this.btnLocationCylinder.UseVisualStyleBackColor = false;
this.btnStop1Up.Click += new System.EventHandler(this.btnStop1Up_Click); this.btnLocationCylinder.Click += new System.EventHandler(this.btnLocationCylinder_Click);
// //
// btnClampSlack // btnTrayLocationCylinder
// //
this.btnClampSlack.BackColor = System.Drawing.Color.White; this.btnTrayLocationCylinder.BackColor = System.Drawing.Color.White;
this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnTrayLocationCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnTrayLocationCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampSlack.Location = new System.Drawing.Point(162, 116); this.btnTrayLocationCylinder.Location = new System.Drawing.Point(162, 116);
this.btnClampSlack.Name = "btnClampSlack"; this.btnTrayLocationCylinder.Name = "btnTrayLocationCylinder";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34); this.btnTrayLocationCylinder.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255; this.btnTrayLocationCylinder.TabIndex = 255;
this.btnClampSlack.Text = "夹料气缸夹紧"; this.btnTrayLocationCylinder.Text = "SL升降盘定位气缸前进";
this.btnClampSlack.UseVisualStyleBackColor = false; this.btnTrayLocationCylinder.UseVisualStyleBackColor = false;
this.btnClampSlack.Click += new System.EventHandler(this.btnClampSlack_Click); this.btnTrayLocationCylinder.Click += new System.EventHandler(this.btnTrayLocationCylinder_Click);
// //
// btnUpDownUp // btnFeedSideWayCylinder
// //
this.btnUpDownUp.BackColor = System.Drawing.Color.White; this.btnFeedSideWayCylinder.BackColor = System.Drawing.Color.White;
this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnFeedSideWayCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnFeedSideWayCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownUp.Location = new System.Drawing.Point(162, 72); this.btnFeedSideWayCylinder.Location = new System.Drawing.Point(162, 72);
this.btnUpDownUp.Name = "btnUpDownUp"; this.btnFeedSideWayCylinder.Name = "btnFeedSideWayCylinder";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34); this.btnFeedSideWayCylinder.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252; this.btnFeedSideWayCylinder.TabIndex = 252;
this.btnUpDownUp.Text = "上下气缸上升"; this.btnFeedSideWayCylinder.Text = "SL上料横移气缸取料";
this.btnUpDownUp.UseVisualStyleBackColor = false; this.btnFeedSideWayCylinder.UseVisualStyleBackColor = false;
this.btnUpDownUp.Click += new System.EventHandler(this.btnUpDownUp_Click); this.btnFeedSideWayCylinder.Click += new System.EventHandler(this.btnFeedSideWayCylinder_Click);
// //
// btnBeforeAfterBefore // btnFeedCylinder
// //
this.btnBeforeAfterBefore.BackColor = System.Drawing.Color.White; this.btnFeedCylinder.BackColor = System.Drawing.Color.White;
this.btnBeforeAfterBefore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnFeedCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBeforeAfterBefore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnFeedCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBeforeAfterBefore.Location = new System.Drawing.Point(14, 116); this.btnFeedCylinder.Location = new System.Drawing.Point(14, 116);
this.btnBeforeAfterBefore.Name = "btnBeforeAfterBefore"; this.btnFeedCylinder.Name = "btnFeedCylinder";
this.btnBeforeAfterBefore.Size = new System.Drawing.Size(140, 34); this.btnFeedCylinder.Size = new System.Drawing.Size(140, 34);
this.btnBeforeAfterBefore.TabIndex = 249; this.btnFeedCylinder.TabIndex = 249;
this.btnBeforeAfterBefore.Text = "前后气缸前进"; this.btnFeedCylinder.Text = "SL上料气缸放松";
this.btnBeforeAfterBefore.UseVisualStyleBackColor = false; this.btnFeedCylinder.UseVisualStyleBackColor = false;
this.btnBeforeAfterBefore.Click += new System.EventHandler(this.btnBeforeAfterBefore_Click); this.btnFeedCylinder.Click += new System.EventHandler(this.btnFeedCylinder_Click);
// //
// btnTopUp // btnFeedSideWay
// //
this.btnTopUp.BackColor = System.Drawing.Color.White; this.btnFeedSideWay.BackColor = System.Drawing.Color.White;
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnFeedSideWay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnFeedSideWay.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(14, 72); this.btnFeedSideWay.Location = new System.Drawing.Point(14, 72);
this.btnTopUp.Name = "btnTopUp"; this.btnFeedSideWay.Name = "btnFeedSideWay";
this.btnTopUp.Size = new System.Drawing.Size(140, 34); this.btnFeedSideWay.Size = new System.Drawing.Size(140, 34);
this.btnTopUp.TabIndex = 246; this.btnFeedSideWay.TabIndex = 246;
this.btnTopUp.Text = "顶升气缸上升"; this.btnFeedSideWay.Text = "SL上料横移机构上升";
this.btnTopUp.UseVisualStyleBackColor = false; this.btnFeedSideWay.UseVisualStyleBackColor = false;
this.btnTopUp.Click += new System.EventHandler(this.btnTopUp_Click); this.btnFeedSideWay.Click += new System.EventHandler(this.btnFeedSideWay_Click);
// //
// chbDebug // chbDebug
// //
...@@ -498,7 +507,7 @@ ...@@ -498,7 +507,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(124, 19); this.lblThisSta.Location = new System.Drawing.Point(124, 19);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(743, 77); this.lblThisSta.Size = new System.Drawing.Size(781, 77);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
...@@ -618,9 +627,9 @@ ...@@ -618,9 +627,9 @@
this.groupBox6.Controls.Add(this.lblTrayNum); this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(403, 536); this.groupBox6.Location = new System.Drawing.Point(403, 496);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(873, 199); this.groupBox6.Size = new System.Drawing.Size(911, 245);
this.groupBox6.TabIndex = 278; this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
...@@ -646,7 +655,7 @@ ...@@ -646,7 +655,7 @@
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(6, 115); this.lblInstoreList.Location = new System.Drawing.Point(6, 115);
this.lblInstoreList.Name = "lblInstoreList"; this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(862, 81); this.lblInstoreList.Size = new System.Drawing.Size(900, 81);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
// //
// groupBox7 // groupBox7
...@@ -656,7 +665,7 @@ ...@@ -656,7 +665,7 @@
this.groupBox7.Controls.Add(this.tableLayoutPanel3); this.groupBox7.Controls.Add(this.tableLayoutPanel3);
this.groupBox7.Location = new System.Drawing.Point(247, 6); this.groupBox7.Location = new System.Drawing.Point(247, 6);
this.groupBox7.Name = "groupBox7"; this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(240, 524); this.groupBox7.Size = new System.Drawing.Size(240, 485);
this.groupBox7.TabIndex = 279; this.groupBox7.TabIndex = 279;
this.groupBox7.TabStop = false; this.groupBox7.TabStop = false;
this.groupBox7.Text = "DI列表"; this.groupBox7.Text = "DI列表";
...@@ -673,7 +682,7 @@ ...@@ -673,7 +682,7 @@
this.tableLayoutPanel3.RowCount = 2; 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.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(229, 504); this.tableLayoutPanel3.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel3.TabIndex = 102; this.tableLayoutPanel3.TabIndex = 102;
// //
// groupBox8 // groupBox8
...@@ -683,7 +692,7 @@ ...@@ -683,7 +692,7 @@
this.groupBox8.Controls.Add(this.tableLayoutPanel4); this.groupBox8.Controls.Add(this.tableLayoutPanel4);
this.groupBox8.Location = new System.Drawing.Point(728, 6); this.groupBox8.Location = new System.Drawing.Point(728, 6);
this.groupBox8.Name = "groupBox8"; this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(240, 524); this.groupBox8.Size = new System.Drawing.Size(240, 485);
this.groupBox8.TabIndex = 280; this.groupBox8.TabIndex = 280;
this.groupBox8.TabStop = false; this.groupBox8.TabStop = false;
this.groupBox8.Text = "DO列表"; this.groupBox8.Text = "DO列表";
...@@ -700,7 +709,7 @@ ...@@ -700,7 +709,7 @@
this.tableLayoutPanel4.RowCount = 2; 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.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, 504); this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel4.TabIndex = 103; this.tableLayoutPanel4.TabIndex = 103;
// //
// tabPage2 // tabPage2
...@@ -1408,6 +1417,19 @@ ...@@ -1408,6 +1417,19 @@
this.panel1.Size = new System.Drawing.Size(1328, 68); this.panel1.Size = new System.Drawing.Size(1328, 68);
this.panel1.TabIndex = 258; this.panel1.TabIndex = 258;
// //
// btnFL_TopCylinder
//
this.btnFL_TopCylinder.BackColor = System.Drawing.Color.White;
this.btnFL_TopCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFL_TopCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFL_TopCylinder.Location = new System.Drawing.Point(14, 206);
this.btnFL_TopCylinder.Name = "btnFL_TopCylinder";
this.btnFL_TopCylinder.Size = new System.Drawing.Size(140, 34);
this.btnFL_TopCylinder.TabIndex = 262;
this.btnFL_TopCylinder.Text = "FL顶升上升";
this.btnFL_TopCylinder.UseVisualStyleBackColor = false;
this.btnFL_TopCylinder.Click += new System.EventHandler(this.btnFL_TopCylinder_Click);
//
// FrmFeedingEquip // FrmFeedingEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -1419,7 +1441,7 @@ ...@@ -1419,7 +1441,7 @@
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmFeedingEquip"; this.Name = "FrmFeedingEquip";
this.Text = "移栽——"; this.Text = "入料模块——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
...@@ -1453,23 +1475,17 @@ ...@@ -1453,23 +1475,17 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtWriteTime; private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnWriteSingleDO; private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.ComboBox cmbWriteIO; private System.Windows.Forms.ComboBox cmbWriteIO;
private System.Windows.Forms.CheckBox chbAutoRead; private System.Windows.Forms.CheckBox chbAutoRead;
private System.Windows.Forms.Button btnReadAllDi;
private System.Windows.Forms.Button btnReadAllDo;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.TextBox txtSlaveId; private System.Windows.Forms.TextBox txtSlaveId;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack; private System.Windows.Forms.Button btnTrayLocationCylinder;
private System.Windows.Forms.Button btnUpDownUp; private System.Windows.Forms.Button btnFeedSideWayCylinder;
private System.Windows.Forms.Button btnBeforeAfterBefore; private System.Windows.Forms.Button btnFeedCylinder;
private System.Windows.Forms.Button btnTopUp; private System.Windows.Forms.Button btnFeedSideWay;
private System.Windows.Forms.Label lblThisSta; private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.Label lblStoreStatus; private System.Windows.Forms.Label lblStoreStatus;
private System.Windows.Forms.Button btnStart; private System.Windows.Forms.Button btnStart;
...@@ -1478,8 +1494,8 @@ ...@@ -1478,8 +1494,8 @@
private System.Windows.Forms.Button btnInStore; private System.Windows.Forms.Button btnInStore;
private System.Windows.Forms.Button btnOutStore; private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.CheckBox chbDebug; private System.Windows.Forms.CheckBox chbDebug;
private System.Windows.Forms.Button btnStop2Up; private System.Windows.Forms.Button btnOutTopCylinder;
private System.Windows.Forms.Button btnStop1Up; private System.Windows.Forms.Button btnLocationCylinder;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
...@@ -1531,7 +1547,6 @@ ...@@ -1531,7 +1547,6 @@
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnAxisOff; private System.Windows.Forms.Button btnAxisOff;
private System.Windows.Forms.Button btnAxisOn; private System.Windows.Forms.Button btnAxisOn;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll; private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
public System.Windows.Forms.TextBox txtP1; public System.Windows.Forms.TextBox txtP1;
...@@ -1546,6 +1561,14 @@ ...@@ -1546,6 +1561,14 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox8; private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button Toroid_LocationCylinder;
private System.Windows.Forms.Button btnToroid_TopCylinder;
private System.Windows.Forms.Button btnFL_TopCylinder;
} }
} }
...@@ -20,7 +20,7 @@ using OnlineStore.Common; ...@@ -20,7 +20,7 @@ using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
public partial class FrmFeedingEquip : FrmBase public partial class FrmFeedingEquip : FrmEquipBase
{ {
private bool IsLoad = false; private bool IsLoad = false;
private string portName = ""; private string portName = "";
...@@ -148,11 +148,19 @@ namespace OnlineStore.AssemblyLine ...@@ -148,11 +148,19 @@ namespace OnlineStore.AssemblyLine
LogUtil.error(LOGGER, ex.StackTrace); LogUtil.error(LOGGER, ex.StackTrace);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e)
{
WriteDO(IO_VALUE.HIGH);
}
private void btnWriteSingleDO_Click(object sender, EventArgs e) private void btnWriteSingleDO_Click(object sender, EventArgs e)
{ {
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW; // IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0) if (time > 0)
...@@ -183,7 +191,7 @@ namespace OnlineStore.AssemblyLine ...@@ -183,7 +191,7 @@ namespace OnlineStore.AssemblyLine
ConfigIO io = GetSelectDO(); ConfigIO io = GetSelectDO();
if (io != null) if (io != null)
{ {
// txtIp.Text = io.DeviceName; // txtIp.Text = io.DeviceName;
txtDOIndex.Text = io.GetIOAddr().ToString(); txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.DeviceName; txtDoName.Text = io.DeviceName;
txtSlaveId.Text = io.SlaveID.ToString(); txtSlaveId.Text = io.SlaveID.ToString();
...@@ -191,6 +199,7 @@ namespace OnlineStore.AssemblyLine ...@@ -191,6 +199,7 @@ namespace OnlineStore.AssemblyLine
if (selectControl != null) { selectControl.BackColor = Color.White; } if (selectControl != null) { selectControl.BackColor = Color.White; }
newControl.BackColor = Color.SkyBlue; newControl.BackColor = Color.SkyBlue;
selectControl = newControl; selectControl = newControl;
//txtIOInfo.Text = "IP:" + io.DeviceName + " /" + io.GetIOAddr().ToString();
} }
} }
} }
...@@ -269,16 +278,7 @@ namespace OnlineStore.AssemblyLine ...@@ -269,16 +278,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
} }
private void btnReadAllDi_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDI(deviceName, (byte)slaveId);
}
public void FormStatus(bool isStart) public void FormStatus(bool isStart)
{ {
...@@ -287,19 +287,7 @@ namespace OnlineStore.AssemblyLine ...@@ -287,19 +287,7 @@ namespace OnlineStore.AssemblyLine
btnReset.Enabled = isStart; btnReset.Enabled = isStart;
btnInStore.Enabled = isStart; btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart; btnOutStore.Enabled = isStart;
} }
private void btnReadAllDo_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDO(deviceName, (byte)slaveId );
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
...@@ -399,97 +387,62 @@ namespace OnlineStore.AssemblyLine ...@@ -399,97 +387,62 @@ namespace OnlineStore.AssemblyLine
feedEquip.Reset(); feedEquip.Reset();
} }
} }
private void btnStop1Up_Click(object sender, EventArgs e)
private void BtnMove(Button btn,string defaultText,string targetText,string ioLowType,string ioHighType)
{ {
if (btnStop1Up.Text.Equals("阻挡气缸1下降")) LogUtil.info("点击【"+ btn.Text + "】 ");
{ if (btn.Text.Equals(defaultText))
feedEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); {
btnStop1Up.Text = "阻挡气缸1上升"; feedEquip.CylinderMove(null, ioLowType, ioHighType);
btnStop1Up.BackColor = Color.Aqua; btn.Text = targetText;
btn.BackColor = Color.Aqua;
} }
else else
{ {
feedEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); feedEquip.CylinderMove(null, ioHighType, ioLowType);
btnStop1Up.Text = "阻挡气缸1下降"; btn.Text = defaultText;
btnStop1Up.BackColor = Color.White; btn.BackColor = Color.SkyBlue;
} }
}
private void btnLocationCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnLocationCylinder, "SL定位气缸上升", "SL定位气缸下降", IO_Type.SL_LocationCylinder_Down, IO_Type.SL_LocationCylinder_Up);
} }
private void btnStop2Up_Click(object sender, EventArgs e) private void btnOutTopCylinder_Click(object sender, EventArgs e)
{ {
if (btnStop2Up.Text.Equals("阻挡气缸2下降")) BtnMove(btnOutTopCylinder, "SL出口顶升上升", "SL出口顶升下降", IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
{
feedEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH);
btnStop2Up.Text = "阻挡气缸2上升";
btnStop2Up.BackColor = Color.Aqua;
}
else
{
feedEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
btnStop2Up.Text = "阻挡气缸2下降";
btnStop2Up.BackColor = Color.White;
}
} }
private void btnTopUp_Click(object sender, EventArgs e) private void btnFeedSideWay_Click(object sender, EventArgs e)
{ {
if (btnTopUp.Text.Equals("顶升气缸上升")) BtnMove(btnFeedSideWay, "SL上料横移机构上升", "SL上料横移机构下降", IO_Type.SL_FeedSideWay_Down, IO_Type.SL_FeedSideWay_Up);
{
feedEquip.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
btnTopUp.Text = "顶升气缸下降";
btnTopUp.BackColor = Color.Aqua;
}
else
{
feedEquip.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
btnTopUp.Text = "顶升气缸上升";
btnTopUp.BackColor = Color.SkyBlue;
}
} }
private void btnBeforeAfterBefore_Click(object sender, EventArgs e) private void btnFeedCylinder_Click(object sender, EventArgs e)
{ {
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进")) BtnMove(btnFeedCylinder, "SL上料气缸放松", "SL上料气缸夹紧", IO_Type.SL_FeedCylinder_Tighten, IO_Type.SL_FeedCylinder_Slack);
{
feedEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
btnBeforeAfterBefore.Text = "前后气缸后退";
btnBeforeAfterBefore.BackColor = Color.Aqua;
}
else
{
feedEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
btnBeforeAfterBefore.Text = "前后气缸前进";
btnBeforeAfterBefore.BackColor = Color.SkyBlue;
}
} }
private void btnUpDownUp_Click(object sender, EventArgs e) private void btnFeedSideWayCylinder_Click(object sender, EventArgs e)
{ {
if (btnUpDownUp.Text.Equals("上下气缸上升")) BtnMove(btnFeedSideWayCylinder, "SL上料横移气缸取料", "SL上料横移气缸放料", IO_Type.SL_FeedSideWayCylinder_Emptying, IO_Type.SL_FeedSideWayCylinder_Take);
{
feedEquip.CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
btnUpDownUp.Text = "上下气缸下降";
btnUpDownUp.BackColor = Color.Aqua;
}
else
{
feedEquip.CylinderMove(null, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
btnUpDownUp.Text = "上下气缸上升";
btnUpDownUp.BackColor = Color.SkyBlue;
}
} }
private void btnClampSlack_Click(object sender, EventArgs e) private void btnTrayLocationCylinder_Click(object sender, EventArgs e)
{ {
if (btnClampSlack.Text.Equals("夹料气缸夹紧")) BtnMove(btnTrayLocationCylinder, "SL升降盘定位气缸前进", "SL升降盘定位气缸后退", IO_Type.SL_TrayLocationCylinder_Before, IO_Type.SL_TrayLocationCylinder_After);
{ }
feedEquip.CylinderMove(null, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); private void btnToroid_TopCylinder_Click(object sender, EventArgs e)
btnClampSlack.Text = "夹料气缸放松"; {
btnClampSlack.BackColor = Color.Aqua; BtnMove(btnToroid_TopCylinder, "环形线横移顶升上升", "环形线横移顶升下降", IO_Type.Toroid_TopCylinder_Down, IO_Type.Toroid_TopCylinder_Up);
} }
else
{ private void btnFL_TopCylinder_Click(object sender, EventArgs e)
feedEquip.CylinderMove(null, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); {
btnClampSlack.Text = "夹料气缸夹紧"; BtnMove(btnFL_TopCylinder, "FL顶升上升", "FL顶升下降", IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up);
btnClampSlack.BackColor = Color.SkyBlue; }
} private void Toroid_LocationCylinder_Click(object sender, EventArgs e)
} {
BtnMove(Toroid_LocationCylinder, "SL升降盘定位气缸前进", "SL升降盘定位气缸后退", IO_Type.Toroid_LocationCylinder_Down, IO_Type.Toroid_LocationCylinder_Up);
}
private void btnOpenAxis_Click(object sender, EventArgs e) private void btnOpenAxis_Click(object sender, EventArgs e)
{ {
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
...@@ -632,7 +585,14 @@ namespace OnlineStore.AssemblyLine ...@@ -632,7 +585,14 @@ namespace OnlineStore.AssemblyLine
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
IOManager.instance.CloseAllDO(); IOManager.CloseDeviceDO(new List<ConfigIO>(feedEquip.Config.DOList.Values));
foreach (Control con in groupBox5.Controls)
{
if (con is Button)
{
con.BackColor = BackColor = Color.White;
}
}
} }
private void button3_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e)
...@@ -691,6 +651,7 @@ namespace OnlineStore.AssemblyLine ...@@ -691,6 +651,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
} }
} }
......
...@@ -212,6 +212,7 @@ namespace OnlineStore.AssemblyLine ...@@ -212,6 +212,7 @@ namespace OnlineStore.AssemblyLine
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.notifyIcon1.Visible = true; this.notifyIcon1.Visible = true;
this.Hide(); this.Hide();
GC.Collect();
} }
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
......
...@@ -19,19 +19,9 @@ ...@@ -19,19 +19,9 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.txtSlaveId = new System.Windows.Forms.TextBox(); this.txtSlaveId = new System.Windows.Forms.TextBox();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox(); this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.btnReadAllDi = new System.Windows.Forms.Button();
this.btnReadAllDo = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
...@@ -112,6 +102,14 @@ ...@@ -112,6 +102,14 @@
this.label46 = new System.Windows.Forms.Label(); this.label46 = new System.Windows.Forms.Label();
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.btnOpenDo = new System.Windows.Forms.Button();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -132,19 +130,17 @@ ...@@ -132,19 +130,17 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName); this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.cmbWriteIO); this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.btnWriteSingleDO); this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime); this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi); this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.btnReadAllDo); this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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(497, 6); this.groupBox1.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
...@@ -153,17 +149,6 @@ ...@@ -153,17 +149,6 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(153, 114);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(51, 21);
this.checkBox1.TabIndex = 256;
this.checkBox1.Text = "打开";
this.checkBox1.UseVisualStyleBackColor = true;
//
// txtSlaveId // txtSlaveId
// //
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -175,26 +160,6 @@ ...@@ -175,26 +160,6 @@
this.txtSlaveId.Text = "0"; this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false; this.txtSlaveId.Visible = false;
// //
// txtDOIndex
//
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(304, 68);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 242;
this.txtDOIndex.Text = "0";
//
// txtDoName
//
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(79, 68);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23);
this.txtDoName.TabIndex = 241;
this.txtDoName.Text = "0";
//
// chbAutoRead // chbAutoRead
// //
this.chbAutoRead.AutoSize = true; this.chbAutoRead.AutoSize = true;
...@@ -209,28 +174,6 @@ ...@@ -209,28 +174,6 @@
this.chbAutoRead.UseVisualStyleBackColor = true; this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false; this.chbAutoRead.Visible = false;
// //
// label17
//
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(9, 71);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17);
this.label17.TabIndex = 240;
this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label14
//
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(233, 71);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17);
this.label14.TabIndex = 239;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbWriteIO // cmbWriteIO
// //
this.cmbWriteIO.DisplayMember = "ProName"; this.cmbWriteIO.DisplayMember = "ProName";
...@@ -241,73 +184,12 @@ ...@@ -241,73 +184,12 @@
this.cmbWriteIO.ItemHeight = 22; this.cmbWriteIO.ItemHeight = 22;
this.cmbWriteIO.Location = new System.Drawing.Point(17, 25); this.cmbWriteIO.Location = new System.Drawing.Point(17, 25);
this.cmbWriteIO.Name = "cmbWriteIO"; this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(356, 28); this.cmbWriteIO.Size = new System.Drawing.Size(358, 28);
this.cmbWriteIO.TabIndex = 234; this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName"; this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem); this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged); this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// btnWriteSingleDO
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(220, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(140, 34);
this.btnWriteSingleDO.TabIndex = 232;
this.btnWriteSingleDO.Text = "写入DO";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
//
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(79, 113);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(59, 23);
this.txtWriteTime.TabIndex = 238;
this.txtWriteTime.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(13, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237;
this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnReadAllDi
//
this.btnReadAllDi.BackColor = System.Drawing.Color.White;
this.btnReadAllDi.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDi.Location = new System.Drawing.Point(44, 154);
this.btnReadAllDi.Name = "btnReadAllDi";
this.btnReadAllDi.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDi.TabIndex = 244;
this.btnReadAllDi.Text = "读取所有DI";
this.btnReadAllDi.UseVisualStyleBackColor = false;
this.btnReadAllDi.Click += new System.EventHandler(this.btnReadAllDi_Click);
//
// btnReadAllDo
//
this.btnReadAllDo.BackColor = System.Drawing.Color.White;
this.btnReadAllDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadAllDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDo.Location = new System.Drawing.Point(220, 154);
this.btnReadAllDo.Name = "btnReadAllDo";
this.btnReadAllDo.Size = new System.Drawing.Size(140, 34);
this.btnReadAllDo.TabIndex = 245;
this.btnReadAllDo.Text = "读取所有DO";
this.btnReadAllDo.UseVisualStyleBackColor = false;
this.btnReadAllDo.Click += new System.EventHandler(this.btnReadAllDo_Click);
//
// groupBox4 // groupBox4
// //
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -424,7 +306,7 @@ ...@@ -424,7 +306,7 @@
this.btnClampSlack.BackColor = System.Drawing.Color.White; this.btnClampSlack.BackColor = System.Drawing.Color.White;
this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampSlack.Location = new System.Drawing.Point(220, 116); this.btnClampSlack.Location = new System.Drawing.Point(220, 72);
this.btnClampSlack.Name = "btnClampSlack"; this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34); this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255; this.btnClampSlack.TabIndex = 255;
...@@ -437,7 +319,7 @@ ...@@ -437,7 +319,7 @@
this.btnUpDownUp.BackColor = System.Drawing.Color.White; this.btnUpDownUp.BackColor = System.Drawing.Color.White;
this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownUp.Location = new System.Drawing.Point(220, 72); this.btnUpDownUp.Location = new System.Drawing.Point(220, 116);
this.btnUpDownUp.Name = "btnUpDownUp"; this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34); this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252; this.btnUpDownUp.TabIndex = 252;
...@@ -1338,6 +1220,100 @@ ...@@ -1338,6 +1220,100 @@
this.panel1.Size = new System.Drawing.Size(1295, 68); this.panel1.Size = new System.Drawing.Size(1295, 68);
this.panel1.TabIndex = 258; this.panel1.TabIndex = 258;
// //
// txtDOIndex
//
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(328, 67);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 276;
this.txtDOIndex.Text = "0";
//
// txtDoName
//
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(71, 67);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 275;
this.txtDoName.Text = "0";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(19, 70);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 274;
this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(272, 70);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 273;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnOpenDo
//
this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDo.Location = new System.Drawing.Point(169, 107);
this.btnOpenDo.Name = "btnOpenDo";
this.btnOpenDo.Size = new System.Drawing.Size(100, 34);
this.btnOpenDo.TabIndex = 272;
this.btnOpenDo.Text = "打开";
this.btnOpenDo.UseVisualStyleBackColor = false;
this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
//
// btnWriteSingleDO
//
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(275, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(100, 34);
this.btnWriteSingleDO.TabIndex = 269;
this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
//
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(82, 113);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(66, 23);
this.txtWriteTime.TabIndex = 271;
this.txtWriteTime.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(19, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 270;
this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmMoveEquip // FrmMoveEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -1349,7 +1325,7 @@ ...@@ -1349,7 +1325,7 @@
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmMoveEquip"; this.Name = "FrmMoveEquip";
this.Text = "移栽——"; this.Text = "出入仓移栽——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
...@@ -1381,17 +1357,8 @@ ...@@ -1381,17 +1357,8 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.ComboBox cmbWriteIO; private System.Windows.Forms.ComboBox cmbWriteIO;
private System.Windows.Forms.CheckBox chbAutoRead; private System.Windows.Forms.CheckBox chbAutoRead;
private System.Windows.Forms.Button btnReadAllDi;
private System.Windows.Forms.Button btnReadAllDo;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.TextBox txtSlaveId; private System.Windows.Forms.TextBox txtSlaveId;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack; private System.Windows.Forms.Button btnClampSlack;
...@@ -1459,7 +1426,6 @@ ...@@ -1459,7 +1426,6 @@
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnAxisOff; private System.Windows.Forms.Button btnAxisOff;
private System.Windows.Forms.Button btnAxisOn; private System.Windows.Forms.Button btnAxisOn;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll; private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
public System.Windows.Forms.TextBox txtP1; public System.Windows.Forms.TextBox txtP1;
...@@ -1470,6 +1436,14 @@ ...@@ -1470,6 +1436,14 @@
public System.Windows.Forms.TextBox txtBoxP; public System.Windows.Forms.TextBox txtBoxP;
private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList; private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
} }
} }
...@@ -20,7 +20,7 @@ using OnlineStore.Common; ...@@ -20,7 +20,7 @@ using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
public partial class FrmMoveEquip : FrmBase public partial class FrmMoveEquip : FrmEquipBase
{ {
private bool IsLoad = false; private bool IsLoad = false;
private string portName = ""; private string portName = "";
...@@ -135,11 +135,19 @@ namespace OnlineStore.AssemblyLine ...@@ -135,11 +135,19 @@ namespace OnlineStore.AssemblyLine
LogUtil.error(LOGGER, ex.StackTrace); LogUtil.error(LOGGER, ex.StackTrace);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e)
{
WriteDO(IO_VALUE.HIGH);
}
private void btnWriteSingleDO_Click(object sender, EventArgs e) private void btnWriteSingleDO_Click(object sender, EventArgs e)
{ {
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW; // IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0) if (time > 0)
...@@ -152,6 +160,7 @@ namespace OnlineStore.AssemblyLine ...@@ -152,6 +160,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private ConfigIO GetSelectDO() private ConfigIO GetSelectDO()
{ {
string text = cmbWriteIO.SelectedValue.ToString(); string text = cmbWriteIO.SelectedValue.ToString();
...@@ -197,10 +206,12 @@ namespace OnlineStore.AssemblyLine ...@@ -197,10 +206,12 @@ namespace OnlineStore.AssemblyLine
comboBox1.SelectedIndex = 0; comboBox1.SelectedIndex = 0;
txtAxisValue.Text = SlvAddr.ToString(); txtAxisValue.Text = SlvAddr.ToString();
btnUpDownUp.Visible = false;
} }
else else
{ {
tabControl1.TabPages.Remove(tabPage2); tabControl1.TabPages.Remove(tabPage2);
btnUpDownUp.Visible = true;
} }
cmbSizeList.Items.Clear(); cmbSizeList.Items.Clear();
...@@ -262,16 +273,7 @@ namespace OnlineStore.AssemblyLine ...@@ -262,16 +273,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void btnReadAllDi_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDI(deviceName, (byte)slaveId);
}
public void FormStatus(bool isStart) public void FormStatus(bool isStart)
{ {
btnStart.Enabled = !isStart; btnStart.Enabled = !isStart;
...@@ -281,17 +283,7 @@ namespace OnlineStore.AssemblyLine ...@@ -281,17 +283,7 @@ namespace OnlineStore.AssemblyLine
btnOutStore.Enabled = isStart; btnOutStore.Enabled = isStart;
} }
private void btnReadAllDo_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDO(deviceName, (byte)slaveId );
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
...@@ -393,95 +385,61 @@ namespace OnlineStore.AssemblyLine ...@@ -393,95 +385,61 @@ namespace OnlineStore.AssemblyLine
} }
private void btnStop1Up_Click(object sender, EventArgs e) private void btnStop1Up_Click(object sender, EventArgs e)
{ {
if (btnStop1Up.Text.Equals("阻挡气缸1下降")) BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1);
{
moveEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
btnStop1Up.Text = "阻挡气缸1上升";
btnStop1Up.BackColor = Color.Aqua;
}
else
{
moveEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
btnStop1Up.Text = "阻挡气缸1下降";
btnStop1Up.BackColor = Color.White;
}
} }
private void btnStop2Up_Click(object sender, EventArgs e) private void btnStop2Up_Click(object sender, EventArgs e)
{ {
if (btnStop2Up.Text.Equals("阻挡气缸2下降")) BtnMove(btnStop2Up, "阻挡2下降", "阻挡2上升", IO_Type.StopCylinder_Down2);
{ }
moveEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH); private void BtnMove(Button btn, string defaultText, string targetText, string ioHighType )
btnStop2Up.Text = "阻挡气缸2上升"; {
btnStop2Up.BackColor = Color.Aqua; LogUtil.info("点击【" + btn.Text + "】 ");
} if (btn.Text.Equals(defaultText))
else
{
moveEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
btnStop2Up.Text = "阻挡气缸2下降";
btnStop2Up.BackColor = Color.White;
}
}
private void btnTopUp_Click(object sender, EventArgs e)
{
if (btnTopUp.Text.Equals("顶升气缸上升"))
{ {
moveEquip.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); moveEquip.IOMove(ioHighType, IO_VALUE.HIGH);
btnTopUp.Text = "顶升气缸下降"; btn.Text = targetText;
btnTopUp.BackColor = Color.Aqua; btn.BackColor = Color.Aqua;
} }
else else
{ {
moveEquip.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); moveEquip.IOMove(ioHighType, IO_VALUE.LOW);
btnTopUp.Text = "顶升气缸上升"; btn.Text = defaultText;
btnTopUp.BackColor = Color.SkyBlue; btn.BackColor = Color.White;
} }
} }
private void BtnMove(Button btn, string defaultText, string targetText, string ioLowType, string ioHighType)
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
{ {
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进")) LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{ {
moveEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); moveEquip.CylinderMove(null, ioLowType, ioHighType);
btnBeforeAfterBefore.Text = "前后气缸后退"; btn.Text = targetText;
btnBeforeAfterBefore.BackColor = Color.Aqua; btn.BackColor = Color.Aqua;
} }
else else
{ {
moveEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); moveEquip.CylinderMove(null, ioHighType, ioLowType);
btnBeforeAfterBefore.Text = "前后气缸前进"; btn.Text = defaultText;
btnBeforeAfterBefore.BackColor = Color.SkyBlue; btn.BackColor = Color.SkyBlue;
} }
} }
private void btnTopUp_Click(object sender, EventArgs e)
{
BtnMove(btnTopUp, "顶升上升", "顶升下降", IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
{
BtnMove(btnBeforeAfterBefore, "横移前进", "横移后退", IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
private void btnUpDownUp_Click(object sender, EventArgs e) private void btnUpDownUp_Click(object sender, EventArgs e)
{ {
if (btnUpDownUp.Text.Equals("上下气缸上升")) BtnMove(btnUpDownUp, "升降上升", "升降下降", IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
{ }
moveEquip.CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
btnUpDownUp.Text = "上下气缸下降";
btnUpDownUp.BackColor = Color.Aqua;
}
else
{
moveEquip.CylinderMove(null, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
btnUpDownUp.Text = "上下气缸上升";
btnUpDownUp.BackColor = Color.SkyBlue;
}
}
private void btnClampSlack_Click(object sender, EventArgs e) private void btnClampSlack_Click(object sender, EventArgs e)
{ {
if (btnClampSlack.Text.Equals("夹料气缸夹紧")) BtnMove(btnClampSlack, "夹料夹紧", "夹料放松", IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
{ }
moveEquip.CylinderMove(null, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
btnClampSlack.Text = "夹料气缸放松";
btnClampSlack.BackColor = Color.Aqua;
}
else
{
moveEquip.CylinderMove(null, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
btnClampSlack.Text = "夹料气缸夹紧";
btnClampSlack.BackColor = Color.SkyBlue;
}
}
private void btnOpenAxis_Click(object sender, EventArgs e) private void btnOpenAxis_Click(object sender, EventArgs e)
{ {
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
...@@ -617,8 +575,15 @@ namespace OnlineStore.AssemblyLine ...@@ -617,8 +575,15 @@ namespace OnlineStore.AssemblyLine
} }
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
IOManager.instance.CloseAllDO(); IOManager.CloseDeviceDO(new List<ConfigIO>( moveEquip.Config.DOList.Values));
foreach(Control con in groupBox5.Controls)
{
if(con is Button)
{
con.BackColor= BackColor = Color.White;
}
}
} }
private void button3_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e)
......
...@@ -19,19 +19,17 @@ ...@@ -19,19 +19,17 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProvidingEquip)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProvidingEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.txtSlaveId = new System.Windows.Forms.TextBox();
this.txtDOIndex = new System.Windows.Forms.TextBox(); this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox(); this.txtDoName = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.label17 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.btnOpenDo = new System.Windows.Forms.Button();
this.btnWriteSingleDO = new System.Windows.Forms.Button(); this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox(); this.txtWriteTime = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.btnReadAllDi = new System.Windows.Forms.Button(); this.txtSlaveId = new System.Windows.Forms.TextBox();
this.btnReadAllDo = new System.Windows.Forms.Button(); this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
...@@ -74,19 +72,17 @@ ...@@ -74,19 +72,17 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName); this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.cmbWriteIO); this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.btnWriteSingleDO); this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime); this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi); this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.btnReadAllDo); this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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(497, 6); this.groupBox1.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
...@@ -95,121 +91,86 @@ ...@@ -95,121 +91,86 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(153, 114);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(51, 21);
this.checkBox1.TabIndex = 256;
this.checkBox1.Text = "打开";
this.checkBox1.UseVisualStyleBackColor = true;
//
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(417, 26);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
this.txtSlaveId.TabIndex = 255;
this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false;
//
// txtDOIndex // txtDOIndex
// //
this.txtDOIndex.Enabled = false;
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(304, 68); this.txtDOIndex.Location = new System.Drawing.Point(328, 67);
this.txtDOIndex.MaxLength = 10; this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex"; this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23); this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 242; this.txtDOIndex.TabIndex = 284;
this.txtDOIndex.Text = "0"; this.txtDOIndex.Text = "0";
// //
// txtDoName // txtDoName
// //
this.txtDoName.Enabled = false;
this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtDoName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDoName.Location = new System.Drawing.Point(79, 68); this.txtDoName.Location = new System.Drawing.Point(71, 67);
this.txtDoName.MaxLength = 10; this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName"; this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23); this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 241; this.txtDoName.TabIndex = 283;
this.txtDoName.Text = "0"; this.txtDoName.Text = "0";
// //
// chbAutoRead
//
this.chbAutoRead.AutoSize = true;
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(370, 69);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
this.chbAutoRead.Text = "自动读取";
this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false;
//
// label17 // label17
// //
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label17.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label17.Location = new System.Drawing.Point(9, 71); this.label17.Location = new System.Drawing.Point(19, 70);
this.label17.Name = "label17"; this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17); this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 240; this.label17.TabIndex = 282;
this.label17.Text = "设备IP:"; this.label17.Text = "设备IP:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label14 // label14
// //
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(233, 71); this.label14.Location = new System.Drawing.Point(272, 70);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17); this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 239; this.label14.TabIndex = 281;
this.label14.Text = "地址:"; this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// cmbWriteIO // btnOpenDo
// //
this.cmbWriteIO.DisplayMember = "ProName"; this.btnOpenDo.BackColor = System.Drawing.Color.White;
this.cmbWriteIO.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable; this.btnOpenDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cmbWriteIO.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.btnOpenDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbWriteIO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOpenDo.Location = new System.Drawing.Point(169, 107);
this.cmbWriteIO.FormattingEnabled = true; this.btnOpenDo.Name = "btnOpenDo";
this.cmbWriteIO.ItemHeight = 22; this.btnOpenDo.Size = new System.Drawing.Size(100, 34);
this.cmbWriteIO.Location = new System.Drawing.Point(17, 25); this.btnOpenDo.TabIndex = 280;
this.cmbWriteIO.Name = "cmbWriteIO"; this.btnOpenDo.Text = "打开";
this.cmbWriteIO.Size = new System.Drawing.Size(356, 28); this.btnOpenDo.UseVisualStyleBackColor = false;
this.cmbWriteIO.TabIndex = 234; this.btnOpenDo.Click += new System.EventHandler(this.btnOpenDo_Click);
this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// btnWriteSingleDO // btnWriteSingleDO
// //
this.btnWriteSingleDO.BackColor = System.Drawing.Color.White; this.btnWriteSingleDO.BackColor = System.Drawing.Color.White;
this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnWriteSingleDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnWriteSingleDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWriteSingleDO.Location = new System.Drawing.Point(220, 107); this.btnWriteSingleDO.Location = new System.Drawing.Point(275, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO"; this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(140, 34); this.btnWriteSingleDO.Size = new System.Drawing.Size(100, 34);
this.btnWriteSingleDO.TabIndex = 232; this.btnWriteSingleDO.TabIndex = 277;
this.btnWriteSingleDO.Text = "写入DO"; this.btnWriteSingleDO.Text = "关闭";
this.btnWriteSingleDO.UseVisualStyleBackColor = false; this.btnWriteSingleDO.UseVisualStyleBackColor = false;
this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click); this.btnWriteSingleDO.Click += new System.EventHandler(this.btnWriteSingleDO_Click);
// //
// txtWriteTime // txtWriteTime
// //
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(79, 113); this.txtWriteTime.Location = new System.Drawing.Point(82, 113);
this.txtWriteTime.MaxLength = 10; this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime"; this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(59, 23); this.txtWriteTime.Size = new System.Drawing.Size(66, 23);
this.txtWriteTime.TabIndex = 238; this.txtWriteTime.TabIndex = 279;
this.txtWriteTime.Text = "0"; this.txtWriteTime.Text = "0";
// //
// label5 // label5
...@@ -217,38 +178,53 @@ ...@@ -217,38 +178,53 @@
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(13, 116); this.label5.Location = new System.Drawing.Point(19, 116);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17); this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237; this.label5.TabIndex = 278;
this.label5.Text = "定时(ms):"; this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// btnReadAllDi // txtSlaveId
// //
this.btnReadAllDi.BackColor = System.Drawing.Color.White; this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDi.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.txtSlaveId.Location = new System.Drawing.Point(417, 26);
this.btnReadAllDi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtSlaveId.MaxLength = 10;
this.btnReadAllDi.Location = new System.Drawing.Point(44, 154); this.txtSlaveId.Name = "txtSlaveId";
this.btnReadAllDi.Name = "btnReadAllDi"; this.txtSlaveId.Size = new System.Drawing.Size(12, 23);
this.btnReadAllDi.Size = new System.Drawing.Size(140, 34); this.txtSlaveId.TabIndex = 255;
this.btnReadAllDi.TabIndex = 244; this.txtSlaveId.Text = "0";
this.btnReadAllDi.Text = "读取所有DI"; this.txtSlaveId.Visible = false;
this.btnReadAllDi.UseVisualStyleBackColor = false; //
this.btnReadAllDi.Click += new System.EventHandler(this.btnReadAllDi_Click); // chbAutoRead
// //
// btnReadAllDo this.chbAutoRead.AutoSize = true;
// this.chbAutoRead.Checked = true;
this.btnReadAllDo.BackColor = System.Drawing.Color.White; this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.btnReadAllDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadAllDo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAutoRead.Location = new System.Drawing.Point(370, 69);
this.btnReadAllDo.Location = new System.Drawing.Point(220, 154); this.chbAutoRead.Name = "chbAutoRead";
this.btnReadAllDo.Name = "btnReadAllDo"; this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.btnReadAllDo.Size = new System.Drawing.Size(140, 34); this.chbAutoRead.TabIndex = 244;
this.btnReadAllDo.TabIndex = 245; this.chbAutoRead.Text = "自动读取";
this.btnReadAllDo.Text = "读取所有DO"; this.chbAutoRead.UseVisualStyleBackColor = true;
this.btnReadAllDo.UseVisualStyleBackColor = false; this.chbAutoRead.Visible = false;
this.btnReadAllDo.Click += new System.EventHandler(this.btnReadAllDo_Click); //
// cmbWriteIO
//
this.cmbWriteIO.DisplayMember = "ProName";
this.cmbWriteIO.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.cmbWriteIO.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbWriteIO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbWriteIO.FormattingEnabled = true;
this.cmbWriteIO.ItemHeight = 22;
this.cmbWriteIO.Location = new System.Drawing.Point(17, 25);
this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(356, 28);
this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// groupBox4 // groupBox4
// //
...@@ -366,7 +342,7 @@ ...@@ -366,7 +342,7 @@
this.btnClampSlack.BackColor = System.Drawing.Color.White; this.btnClampSlack.BackColor = System.Drawing.Color.White;
this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampSlack.Location = new System.Drawing.Point(220, 116); this.btnClampSlack.Location = new System.Drawing.Point(220, 72);
this.btnClampSlack.Name = "btnClampSlack"; this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34); this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255; this.btnClampSlack.TabIndex = 255;
...@@ -379,7 +355,7 @@ ...@@ -379,7 +355,7 @@
this.btnUpDownUp.BackColor = System.Drawing.Color.White; this.btnUpDownUp.BackColor = System.Drawing.Color.White;
this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownUp.Location = new System.Drawing.Point(220, 72); this.btnUpDownUp.Location = new System.Drawing.Point(220, 116);
this.btnUpDownUp.Name = "btnUpDownUp"; this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34); this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252; this.btnUpDownUp.TabIndex = 252;
...@@ -588,7 +564,7 @@ ...@@ -588,7 +564,7 @@
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmProvidingEquip"; this.Name = "FrmProvidingEquip";
this.Text = "移栽——"; this.Text = "出料移栽——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
...@@ -615,17 +591,8 @@ ...@@ -615,17 +591,8 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.ComboBox cmbWriteIO; private System.Windows.Forms.ComboBox cmbWriteIO;
private System.Windows.Forms.CheckBox chbAutoRead; private System.Windows.Forms.CheckBox chbAutoRead;
private System.Windows.Forms.Button btnReadAllDi;
private System.Windows.Forms.Button btnReadAllDo;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.TextBox txtSlaveId; private System.Windows.Forms.TextBox txtSlaveId;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack; private System.Windows.Forms.Button btnClampSlack;
...@@ -644,11 +611,18 @@ ...@@ -644,11 +611,18 @@
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll; private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum; private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList; private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.Button btnWriteSingleDO;
private System.Windows.Forms.TextBox txtWriteTime;
private System.Windows.Forms.Label label5;
} }
} }
...@@ -20,11 +20,10 @@ using OnlineStore.Common; ...@@ -20,11 +20,10 @@ using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
public partial class FrmProvidingEquip : FrmBase public partial class FrmProvidingEquip : FrmEquipBase
{ {
private bool IsLoad = false; private bool IsLoad = false;
private string portName = "";
private short SlvAddr = 0;
private ProvidingEquip providingEquip; private ProvidingEquip providingEquip;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmProvidingEquip(ProvidingEquip moveEquip) public FrmProvidingEquip(ProvidingEquip moveEquip)
...@@ -123,11 +122,19 @@ namespace OnlineStore.AssemblyLine ...@@ -123,11 +122,19 @@ namespace OnlineStore.AssemblyLine
LogUtil.error(LOGGER, ex.StackTrace); LogUtil.error(LOGGER, ex.StackTrace);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e)
{
WriteDO(IO_VALUE.HIGH);
}
private void btnWriteSingleDO_Click(object sender, EventArgs e) private void btnWriteSingleDO_Click(object sender, EventArgs e)
{ {
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW; // IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0) if (time > 0)
...@@ -139,7 +146,6 @@ namespace OnlineStore.AssemblyLine ...@@ -139,7 +146,6 @@ namespace OnlineStore.AssemblyLine
IOManager.instance.WriteSingleDO(deviceName, (byte)slaveId, (ushort)index, (IO_VALUE)value); IOManager.instance.WriteSingleDO(deviceName, (byte)slaveId, (ushort)index, (IO_VALUE)value);
} }
} }
private ConfigIO GetSelectDO() private ConfigIO GetSelectDO()
{ {
string text = cmbWriteIO.SelectedValue.ToString(); string text = cmbWriteIO.SelectedValue.ToString();
...@@ -227,15 +233,7 @@ namespace OnlineStore.AssemblyLine ...@@ -227,15 +233,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void btnReadAllDi_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDI(deviceName, (byte)slaveId);
}
public void FormStatus(bool isStart) public void FormStatus(bool isStart)
{ {
...@@ -245,18 +243,7 @@ namespace OnlineStore.AssemblyLine ...@@ -245,18 +243,7 @@ namespace OnlineStore.AssemblyLine
//btnInStore.Enabled = isStart; //btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart; btnOutStore.Enabled = isStart;
} }
private void btnReadAllDo_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
IOManager.instance.ReadAllDO(deviceName, (byte)slaveId );
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
...@@ -348,100 +335,74 @@ namespace OnlineStore.AssemblyLine ...@@ -348,100 +335,74 @@ namespace OnlineStore.AssemblyLine
} }
private void btnStop1Up_Click(object sender, EventArgs e) private void btnStop1Up_Click(object sender, EventArgs e)
{ {
if (btnStop1Up.Text.Equals("阻挡气缸1下降")) BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1);
{ }
providingEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
btnStop1Up.Text = "阻挡气缸1上升";
btnStop1Up.BackColor = Color.Aqua;
}
else
{
providingEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
btnStop1Up.Text = "阻挡气缸1下降";
btnStop1Up.BackColor = Color.White;
}
}
private void btnStop2Up_Click(object sender, EventArgs e) private void btnStop2Up_Click(object sender, EventArgs e)
{ {
if (btnStop2Up.Text.Equals("阻挡气缸2下降")) BtnMove(btnStop2Up, "阻挡2下降", "阻挡2上升", IO_Type.StopCylinder_Down2);
{ }
providingEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH); private void BtnMove(Button btn, string defaultText, string targetText, string ioHighType)
btnStop2Up.Text = "阻挡气缸2上升"; {
btnStop2Up.BackColor = Color.Aqua; LogUtil.info("点击【" + btn.Text + "】 ");
} if (btn.Text.Equals(defaultText))
else
{
providingEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
btnStop2Up.Text = "阻挡气缸2下降";
btnStop2Up.BackColor = Color.White;
}
}
private void btnTopUp_Click(object sender, EventArgs e)
{
if (btnTopUp.Text.Equals("顶升气缸上升"))
{ {
providingEquip.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); providingEquip.IOMove(ioHighType, IO_VALUE.HIGH);
btnTopUp.Text = "顶升气缸下降"; btn.Text = targetText;
btnTopUp.BackColor = Color.Aqua; btn.BackColor = Color.Aqua;
} }
else else
{ {
providingEquip.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); providingEquip.IOMove(ioHighType, IO_VALUE.LOW);
btnTopUp.Text = "顶升气缸上升"; btn.Text = defaultText;
btnTopUp.BackColor = Color.SkyBlue; btn.BackColor = Color.White;
} }
} }
private void BtnMove(Button btn, string defaultText, string targetText, string ioLowType, string ioHighType)
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
{ {
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进")) LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{ {
providingEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); providingEquip.CylinderMove(null, ioLowType, ioHighType);
btnBeforeAfterBefore.Text = "前后气缸后退"; btn.Text = targetText;
btnBeforeAfterBefore.BackColor = Color.Aqua; btn.BackColor = Color.Aqua;
} }
else else
{ {
providingEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); providingEquip.CylinderMove(null, ioHighType, ioLowType);
btnBeforeAfterBefore.Text = "前后气缸前进"; btn.Text = defaultText;
btnBeforeAfterBefore.BackColor = Color.SkyBlue; btn.BackColor = Color.SkyBlue;
} }
} }
private void btnTopUp_Click(object sender, EventArgs e)
{
BtnMove(btnTopUp, "顶升上升", "顶升下降", IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
{
BtnMove(btnBeforeAfterBefore, "横移前进", "横移后退", IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
private void btnUpDownUp_Click(object sender, EventArgs e) private void btnUpDownUp_Click(object sender, EventArgs e)
{ {
if (btnUpDownUp.Text.Equals("上下气缸上升")) BtnMove(btnUpDownUp, "升降上升", "升降下降", IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
{ }
providingEquip.CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
btnUpDownUp.Text = "上下气缸下降";
btnUpDownUp.BackColor = Color.Aqua;
}
else
{
providingEquip.CylinderMove(null, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
btnUpDownUp.Text = "上下气缸上升";
btnUpDownUp.BackColor = Color.SkyBlue;
}
}
private void btnClampSlack_Click(object sender, EventArgs e) private void btnClampSlack_Click(object sender, EventArgs e)
{ {
if (btnClampSlack.Text.Equals("夹料气缸夹紧")) BtnMove(btnClampSlack, "夹料夹紧", "夹料放松", IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
{
providingEquip.CylinderMove(null, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
btnClampSlack.Text = "夹料气缸放松";
btnClampSlack.BackColor = Color.Aqua;
}
else
{
providingEquip.CylinderMove(null, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
btnClampSlack.Text = "夹料气缸夹紧";
btnClampSlack.BackColor = Color.SkyBlue;
}
} }
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
IOManager.instance.CloseAllDO(); IOManager.CloseDeviceDO(new List<ConfigIO>( providingEquip.Config.DOList.Values));
foreach (Control con in groupBox5.Controls)
{
if (con is Button)
{
con.BackColor = BackColor = Color.White;
}
}
} }
} }
} }
......
...@@ -71,12 +71,12 @@ ...@@ -71,12 +71,12 @@
<Compile Include="deviceLibrary\IO\AIManager.cs" /> <Compile Include="deviceLibrary\IO\AIManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" /> <Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="deviceLibrary\IO\IOManager.cs" /> <Compile Include="deviceLibrary\IO\IOManager.cs" />
<Compile Include="deviceLibrary\IO\KangNaiDe\KNDManager.cs" />
<Compile Include="deviceLibrary\IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="assemblyLine\LineBean.cs" /> <Compile Include="assemblyLine\LineBean.cs" />
<Compile Include="assemblyLine\LineBean_Partial.cs" /> <Compile Include="assemblyLine\LineBean_Partial.cs" />
<Compile Include="assemblyLine\MoveEquip.cs" /> <Compile Include="assemblyLine\MoveEquip.cs" />
<Compile Include="assemblyLine\MoveEquip_Partial.cs" /> <Compile Include="assemblyLine\MoveEquip_Partial.cs" />
<Compile Include="deviceLibrary\IO\KangNaiDe\KNDManager.cs" />
<Compile Include="deviceLibrary\IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="deviceLibrary\PanasonicServo\ACCMDManager.cs" /> <Compile Include="deviceLibrary\PanasonicServo\ACCMDManager.cs" />
<Compile Include="deviceLibrary\PanasonicServo\ACServerManager.cs" /> <Compile Include="deviceLibrary\PanasonicServo\ACServerManager.cs" />
<Compile Include="deviceLibrary\PanasonicServo\ACServerManager_Partial.cs" /> <Compile Include="deviceLibrary\PanasonicServo\ACServerManager_Partial.cs" />
......
...@@ -22,10 +22,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,10 +22,9 @@ namespace OnlineStore.DeviceLibrary
public static LineBean Line = null; public static LineBean Line = null;
public static Line_Config Config = null; public static Line_Config Config = null;
public static Dictionary<int, MoveEquip_Config> moveECMap = null;
public static Dictionary<int, FeedingEquip_Config> feedingECMap = null;
public static Dictionary<int, ProvidingEquip_Config> providingECMap = null; public static Dictionary<int, StoreConfig> allConfigMap = null;
public static Dictionary<int, DischargeLine_Config> disChargeLineMap = null;
public LineManager() public LineManager()
{ {
} }
...@@ -52,12 +51,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -52,12 +51,18 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!isInit) if (!isInit)
{ {
Dictionary<int, MoveEquip_Config> moveECMap = null;
Dictionary<int, FeedingEquip_Config> feedingECMap = null;
Dictionary<int, ProvidingEquip_Config> providingECMap = null;
Dictionary<int, DischargeLine_Config> disChargeLineMap = null;
StoreConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>(); StoreConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
StoreConfig.SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>(); StoreConfig.SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
moveECMap = new Dictionary<int, MoveEquip_Config>(); moveECMap = new Dictionary<int, MoveEquip_Config>();
feedingECMap = new Dictionary<int, FeedingEquip_Config>(); feedingECMap = new Dictionary<int, FeedingEquip_Config>();
providingECMap = new Dictionary<int, ProvidingEquip_Config>(); providingECMap = new Dictionary<int, ProvidingEquip_Config>();
disChargeLineMap = new Dictionary<int, DischargeLine_Config>(); disChargeLineMap = new Dictionary<int, DischargeLine_Config>();
allConfigMap = new Dictionary<int, StoreConfig>();
string server = ConfigAppSettings.GetValue(Setting_Init.http_server); string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
if (server.Equals("")) if (server.Equals(""))
{ {
...@@ -81,17 +86,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,17 +86,18 @@ namespace OnlineStore.DeviceLibrary
string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Line); string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Line);
Config = CSVConfigReader.LoadLineConfig(0, CID, StoreType.RC_LINE, linefilePath); Config = CSVConfigReader.LoadLineConfig(0, CID, StoreType.RC_LINE, linefilePath);
allConfigMap.Add(0, Config);
int moveEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_moveEquip_count); int moveEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_moveEquip_count);
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip); string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip);
for (int i = 1; i <= moveEquipCount; i++) for (int i = 1; i <= moveEquipCount; i++)
{ {
string nameStr = i.ToString().PadLeft(2, '0'); string nameStr = i.ToString().PadLeft(2, '0');
string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv"); string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv");
MoveEquip_Config moveConfig = CSVConfigReader.LoadMoveConfig(i, config); MoveEquip_Config moveConfig = CSVConfigReader.LoadMoveConfig(i, config);
int subType = i; int subType = i;
moveConfig.SetIO( subType); moveConfig.SetIO(subType);
moveECMap.Add(i, moveConfig); moveECMap.Add(i, moveConfig);
allConfigMap.Add(subType, moveConfig);
} }
int feedingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_feedingEquip_count); int feedingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_feedingEquip_count);
string feedingEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_FeedingEquip); string feedingEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_FeedingEquip);
...@@ -100,9 +106,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,9 +106,10 @@ namespace OnlineStore.DeviceLibrary
int subType = 100 + i; int subType = 100 + i;
string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv"); string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv");
FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType, config); FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType, config);
moveConfig.SetIO( subType); moveConfig.SetIO(subType);
feedingECMap.Add(i, moveConfig); feedingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
} }
int providingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_providingEquip_count); int providingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_providingEquip_count);
...@@ -112,9 +119,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -112,9 +119,10 @@ namespace OnlineStore.DeviceLibrary
int subType = 200 + i; int subType = 200 + i;
string config = appPath + providingEquipConfig.Replace(".csv", "_" + i + ".csv"); string config = appPath + providingEquipConfig.Replace(".csv", "_" + i + ".csv");
ProvidingEquip_Config moveConfig = CSVConfigReader.LoadProvidingConfig(subType, config); ProvidingEquip_Config moveConfig = CSVConfigReader.LoadProvidingConfig(subType, config);
moveConfig.SetIO( subType); moveConfig.SetIO(subType);
providingECMap.Add(i, moveConfig); providingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
} }
int dislineCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_dischargeLine_count); int dislineCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_dischargeLine_count);
...@@ -126,15 +134,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -126,15 +134,17 @@ namespace OnlineStore.DeviceLibrary
DischargeLine_Config moveConfig = CSVConfigReader.LoadDischargeLineConfig(subType, config); DischargeLine_Config moveConfig = CSVConfigReader.LoadDischargeLineConfig(subType, config);
moveConfig.SetIO(subType); moveConfig.SetIO(subType);
disChargeLineMap.Add(i, moveConfig); disChargeLineMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
} }
Line = new LineBean(Config, moveECMap,feedingECMap,providingECMap,disChargeLineMap); Line = new LineBean(Config, moveECMap, feedingECMap, providingECMap, disChargeLineMap);
LogUtil.info(LOGGER, "加载 完成!"); LogUtil.info(LOGGER, "加载 完成!");
return true; return true;
} }
} }
else if(Line != null){ else if (Line != null)
{
return true; return true;
} }
} }
...@@ -144,7 +154,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -144,7 +154,7 @@ namespace OnlineStore.DeviceLibrary
MessageBox.Show(ex.ToString(), "加载配置错误(请检查配置)"); MessageBox.Show(ex.ToString(), "加载配置错误(请检查配置)");
Application.Exit(); Application.Exit();
} }
return false ; return false;
} }
/// <summary> /// <summary>
...@@ -181,7 +191,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,7 +191,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip); string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip);
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + config.Id.ToString().PadLeft(2,'0') + ".csv"); string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + config.Id.ToString().PadLeft(2,'0') + ".csv");
moveECMap[config.Id] = config; // moveECMap[config.Id] = config;
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(MoveEquip_Config)); bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(MoveEquip_Config));
if (!result) if (!result)
{ {
...@@ -203,7 +214,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -203,7 +214,8 @@ namespace OnlineStore.DeviceLibrary
int id = config.Id - 100; int id = config.Id - 100;
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id+ ".csv"); string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id+ ".csv");
feedingECMap[config.Id] = config; // feedingECMap[config.Id] = config;
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(FeedingEquip_Config)); bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(FeedingEquip_Config));
if (!result) if (!result)
{ {
...@@ -224,7 +236,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -224,7 +236,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_ProvidingEquip); string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_ProvidingEquip);
int id = config.Id - 200; int id = config.Id - 200;
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id + ".csv"); string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id + ".csv");
providingECMap[config.Id] = config; // providingECMap[config.Id] = config;
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(ProvidingEquip_Config)); bool result = CSVConfigReader.SaveConfig(configStr, config,typeof(ProvidingEquip_Config));
if (!result) if (!result)
{ {
...@@ -246,7 +259,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -246,7 +259,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_DischargeLine); string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_DischargeLine);
int id = config.Id - 300; int id = config.Id - 300;
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id + ".csv"); string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id + ".csv");
disChargeLineMap[config.Id] = config; // disChargeLineMap[config.Id] = config;
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configStr, config, typeof(DischargeLine_Config)); bool result = CSVConfigReader.SaveConfig(configStr, config, typeof(DischargeLine_Config));
if (!result) if (!result)
{ {
......
...@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
baseConfig = config; baseConfig = config;
Name = (" " + "_出料皮带线_" + DeviceID % 30 + " ").ToUpper(); Name = (" " + "_出料皮带线_" + DeviceID % 100 + " ").ToUpper();
Init(); Init();
UseAxis = false; UseAxis = false;
MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-MoveInfo"); MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-MoveInfo");
......
...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
baseConfig = config; baseConfig = config;
this.Config = config; this.Config = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = (" " + "_入料_" + DeviceID % 10 + " ").ToUpper(); Name = (" " + "_入料_" + DeviceID % 100 + " ").ToUpper();
Init(); Init();
MoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-Move"); MoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-Move");
SecondMoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-SecondMove"); SecondMoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-SecondMove");
......
...@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
baseConfig = config; baseConfig = config;
Name = (" " + "_出料_" + DeviceID % 10 + " ").ToUpper(); Name = (" " + "_出料_" + DeviceID % 100 + " ").ToUpper();
Init(); Init();
UseAxis = false; UseAxis = false;
MoveInfo = new LineMoveInfo(DeviceID, "出料-" + DeviceID + "-MoveInfo"); MoveInfo = new LineMoveInfo(DeviceID, "出料-" + DeviceID + "-MoveInfo");
......
...@@ -292,18 +292,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,18 +292,7 @@ namespace OnlineStore.DeviceLibrary
DOValueMap.Add(ip, newList); DOValueMap.Add(ip, newList);
} }
} }
} }
//else
//{
// if (sta == null)
// {
// LogUtil.error("UpdateAllDO ip[" + ip + "], sta=null");
// }
// else
// {
// LogUtil.error(" UpdateAllDO ip[" + ip + "], sta.Length=" + sta.Length);
// }
//}
} }
...@@ -315,10 +304,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -315,10 +304,7 @@ namespace OnlineStore.DeviceLibrary
{ {
ushort length = LineManager.Config.GetDOLength(aio.IP); ushort length = LineManager.Config.GetDOLength(aio.IP);
for (ushort i = 0; i < length; i++) for (ushort i = 0; i < length; i++)
{ {
// ushort u = (ushort)(i + length);
// ushort u = (ushort)(i );
// Box_Addr addr = GetAddr(u);
aio.WriteDO(i, Box_Sta.Off); aio.WriteDO(i, Box_Sta.Off);
} }
} }
...@@ -347,7 +333,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,7 +333,7 @@ namespace OnlineStore.DeviceLibrary
bool result = aioBox.WriteDO(StartAddress, GetBox_Sta(onOff)); bool result = aioBox.WriteDO(StartAddress, GetBox_Sta(onOff));
if (!result) if (!result)
{ {
LogUtil.error("AIO WriteSingleDO [" + StartAddress + "] 第" + i + "次失败:" + aioBox.ErrInfo); LogUtil.error("AIO WriteSingleDO ["+ioIp+"] [" + StartAddress + "] 第" + i + "次失败:" + aioBox.ErrInfo);
} }
else else
{ {
...@@ -362,7 +348,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -362,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Error("出错啦:" + ex.ToString()); LOGGER.Error("AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 出错啦:" + ex.ToString());
} }
} }
public override void WriteSingleDO(string ioIp, byte slaveId, ushort StartAddress, IO_VALUE onOff, int mSeconds) public override void WriteSingleDO(string ioIp, byte slaveId, ushort StartAddress, IO_VALUE onOff, int mSeconds)
...@@ -384,7 +370,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -384,7 +370,7 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
aioBox.WriteDO(StartAddress, aioBox.ReverseStatus(currBox_Sta)); aioBox.WriteDO(StartAddress, aioBox.ReverseStatus(currBox_Sta));
LogUtil.debug(LOGGER, "**********定时回写入 IO【" + ioIp + "," + StartAddress + ",值" + aioBox.ReverseStatus(currBox_Sta) + "】:"); LogUtil.debug(LOGGER, "**********定时回写入 IO [" + ioIp + "] [" + StartAddress + "]值" + aioBox.ReverseStatus(currBox_Sta) + "】:");
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -396,12 +382,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,12 +382,12 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(LOGGER, "WriteSingleDO出错 没有连接IO模块:" + ioIp); LogUtil.error(LOGGER, "AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 出错 没有连接IO模块:" + ioIp);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("WriteSingleDO 出错:" + ioIp); LogUtil.error("AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 出错:" + ioIp);
} }
} }
public override void ReadAllDI(string ioIp, byte slaveId) public override void ReadAllDI(string ioIp, byte slaveId)
...@@ -417,7 +403,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,7 +403,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("ReadAllDI出错:" + ioIp); LogUtil.error("ReadAllDI [" + ioIp + "]出错:" + ioIp);
} }
} }
public override void ReadAllDO(string ioIp, byte slaveId) public override void ReadAllDO(string ioIp, byte slaveId)
...@@ -434,7 +420,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -434,7 +420,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("ReadAllDO出错:" + ioIp); LogUtil.error("ReadAllDO [" + ioIp + "]出错:" + ioIp);
} }
} }
public override IO_VALUE GetDOValue(string ioIP, byte slaveId, ushort StartAddress) public override IO_VALUE GetDOValue(string ioIP, byte slaveId, ushort StartAddress)
...@@ -463,7 +449,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -463,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("GetDOValue 出错:" + ex.ToString()); LogUtil.error("GetDOValue [" + ioIP + "] [" + StartAddress + "] 出错:" + ex.ToString());
} }
return value; return value;
} }
...@@ -495,7 +481,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -495,7 +481,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("GetDIValue 出错:" + ex.ToString()); LogUtil.error("GetDIValue [" + ioIP + "] [" + StartAddress + "] 出错:" + ex.ToString());
} }
return value; return value;
} }
...@@ -515,15 +501,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -515,15 +501,11 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(LOGGER, " GetIOValue 获取数据出错:" + ex.ToString()); LogUtil.error(LOGGER, " GetIOValue [" + configIO.DeviceName + "] [" + configIO.GetIOAddr() + "] 获取数据出错:" + ex.ToString());
} }
return value; return value;
} }
//private Box_Addr GetAddr(ushort StartAddress)
//{
// return (Box_Addr)(StartAddress);
//}
private Box_Sta GetBox_Sta(IO_VALUE onOff) private Box_Sta GetBox_Sta(IO_VALUE onOff)
{ {
if (onOff.Equals(IO_VALUE.HIGH)) if (onOff.Equals(IO_VALUE.HIGH))
......
...@@ -16,12 +16,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,12 +16,7 @@ namespace OnlineStore.DeviceLibrary
#region KNDIO #region KNDIO
/// <summary>
/// 写指定IO
/// </summary>
/// <param name="ioType">IO类型</param>
/// <param name="ioValue">IO值</param>
/// <param name="subType">=0表示流水线IO,>=1表示移栽IO</param>
public static void IOMove(string ioType, IO_VALUE ioValue,int subType = 0) public static void IOMove(string ioType, IO_VALUE ioValue,int subType = 0)
{ {
ConfigIO configIo = GetDO(ioType, subType); ConfigIO configIo = GetDO(ioType, subType);
...@@ -91,27 +86,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -91,27 +86,14 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (LineManager.moveECMap.ContainsKey(subType)) if (LineManager.allConfigMap.ContainsKey(subType))
{ {
if (LineManager.moveECMap[subType].DIList.ContainsKey(ioType)) if (LineManager.allConfigMap[subType].DIList.ContainsKey(ioType))
{ {
return LineManager.moveECMap[subType].DIList[ioType]; return LineManager.allConfigMap[subType].DIList[ioType];
}
}
if (LineManager.feedingECMap.ContainsKey(subType))
{
if (LineManager.feedingECMap[subType].DIList.ContainsKey(ioType))
{
return LineManager.feedingECMap[subType].DIList[ioType];
}
}
if (LineManager.providingECMap.ContainsKey(subType))
{
if (LineManager.providingECMap[subType].DIList.ContainsKey(ioType))
{
return LineManager.providingECMap[subType].DIList[ioType];
} }
} }
} }
return configIo; return configIo;
} }
...@@ -127,30 +109,41 @@ namespace OnlineStore.DeviceLibrary ...@@ -127,30 +109,41 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (LineManager.moveECMap.ContainsKey(subType)) if (LineManager.allConfigMap.ContainsKey(subType))
{
if (LineManager.moveECMap[subType].DOList.ContainsKey(ioType))
{
return LineManager.moveECMap[subType].DOList[ioType];
}
}
if (LineManager.feedingECMap.ContainsKey(subType))
{
if (LineManager.feedingECMap[subType].DOList.ContainsKey(ioType))
{
return LineManager.feedingECMap[subType].DOList[ioType];
}
}
if (LineManager.providingECMap.ContainsKey(subType))
{ {
if (LineManager.providingECMap[subType].DOList.ContainsKey(ioType)) if (LineManager.allConfigMap[subType].DOList.ContainsKey(ioType))
{ {
return LineManager.providingECMap[subType].DOList[ioType]; return LineManager.allConfigMap[subType].DOList[ioType];
} }
} }
} }
return configIo; return configIo;
} }
public static void CloseDeviceDO(List<ConfigIO> DoList)
{
foreach (ConfigIO io in DoList)
{
instance.WriteSingleDO(io.DeviceName, io.SlaveID, io.GetIOAddr(), IO_VALUE.LOW);
Thread.Sleep(60);
}
}
public static void CloseDeviceDO(int subType)
{
List<ConfigIO> DoList = new List<ConfigIO>();
if (subType <= 0)
{
DoList = new List<ConfigIO>(LineManager.Config.DOList.Values);
}
else
{
if (LineManager.allConfigMap.ContainsKey(subType))
{
DoList = new List<ConfigIO>(LineManager.allConfigMap[subType].DOList.Values);
}
}
CloseDeviceDO(DoList);
}
#endregion #endregion
public static void Init() public static void Init()
{ {
......
...@@ -399,8 +399,239 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -399,8 +399,239 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024 /// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024
/// </summary> /// </summary>
public static string SeparateDevice_Run = "SeparateDevice_Run"; public static string SeparateDevice_Run = "SeparateDevice_Run";
#endregion #endregion
#region 上料流水线
/// <summary>
/// DI SL1急停 SL_SuddenStop_BTN X101
/// </summary>
public static string SL_SuddenStop_BTN = "SL_SuddenStop_BTN";
/// <summary>
/// DI SL1复位 SL_Reset_BTN X102
/// </summary>
public static string SL_Reset_BTN = "SL_Reset_BTN";
/// <summary>
/// DI SL1入口检测 SL_Entry_Check X103
/// </summary>
public static string SL_Entry_Check = "SL_Entry_Check";
/// <summary>
/// DI SL1阻挡检测 SL_Stop_Check X104
/// </summary>
public static string SL_Stop_Check = "SL_Stop_Check";
/// <summary>
/// DI SL1定位工位检测 SL_Location_Check X105
/// </summary>
public static string SL_Location_Check = "SL_Location_Check";
/// <summary>
/// DI /DO SL1定位气缸上升端 SL_LocationCylinder_Up X106
/// </summary>
public static string SL_LocationCylinder_Up = "SL_LocationCylinder_Up";
/// <summary>
/// DI /DO SL1定位气缸下降端 SL_LocationCylinder_Down X107
/// </summary>
public static string SL_LocationCylinder_Down = "SL_LocationCylinder_Down";
/// <summary>
/// DI /DO SL1出口顶升上升端 SL_OutTopCylinder_Up X108
/// </summary>
public static string SL_OutTopCylinder_Up = "SL_OutTopCylinder_Up";
/// <summary>
/// DI /DO SL1出口顶升下降端 SL_OutTopCylinder_Down X109
/// </summary>
public static string SL_OutTopCylinder_Down = "SL_OutTopCylinder_Down";
/// <summary>
/// DI SL1出口检测 SL_Out_Check X110
/// </summary>
public static string SL_Out_Check = "SL_Out_Check";
/// <summary>
/// DI SL1托盘定位气缸1前进端 SL_TrayLocationCylinder1_Before X111
/// </summary>
public static string SL_TrayLocationCylinder1_Before = "SL_TrayLocationCylinder1_Before";
/// <summary>
/// DI SL1托盘定位气缸1后退端 SL_TrayLocationCylinder1_After X112
/// </summary>
public static string SL_TrayLocationCylinder1_After = "SL_TrayLocationCylinder1_After";
/// <summary>
/// DI SL1托盘定位气缸2前进端 SL_TrayLocationCylinder2_Before X113
/// </summary>
public static string SL_TrayLocationCylinder2_Before = "SL_TrayLocationCylinder2_Before";
/// <summary>
/// DI SL1托盘定位气缸2后退端 SL_TrayLocationCylinder2_After X114
/// </summary>
public static string SL_TrayLocationCylinder2_After = "SL_TrayLocationCylinder2_After";
/// <summary>
/// DI SL1料盘检测1 SL_TrayCheck1 X115
/// </summary>
public static string SL_TrayCheck1 = "SL_TrayCheck1";
/// <summary>
/// DI SL1料盘检测2 SL_TrayCheck2 X116
/// </summary>
public static string SL_TrayCheck2 = "SL_TrayCheck2";
/// <summary>
/// DI SL1料盘检测3 SL_TrayCheck3 X121
/// </summary>
public static string SL_TrayCheck3 = "SL_TrayCheck3";
/// <summary>
/// DI SL1料盘检测4 SL_TrayCheck4 X122
/// </summary>
public static string SL_TrayCheck4 = "SL_TrayCheck4";
/// <summary>
/// DI SL1伺服定位料盘检测 SL_AxisLocationCheck X123
/// </summary>
public static string SL_AxisLocationCheck = "SL_AxisLocationCheck";
/// <summary>
/// DI /DO SL1上料横移机构上升端 SL_FeedSideWay_Up X124
/// </summary>
public static string SL_FeedSideWay_Up = "SL_FeedSideWay_Up";
/// <summary>
/// DI /DO SL1上料横移机构下降端 SL_FeedSideWay_Down X125
/// </summary>
public static string SL_FeedSideWay_Down = "SL_FeedSideWay_Down";
/// <summary>
/// DI /DO SL1上料横移气缸取料端 SL_FeedSideWayCylinder_Take X126
/// </summary>
public static string SL_FeedSideWayCylinder_Take = "SL_FeedSideWayCylinder_Take";
/// <summary>
/// DI /DO SL1上料横移气缸放料端 SL_FeedSideWayCylinder_Emptying X127
/// </summary>
public static string SL_FeedSideWayCylinder_Emptying = "SL_FeedSideWayCylinder_Emptying";
/// <summary>
/// DI /DO SL1上料气缸放松端 SL_FeedCylinder_Slack X128
/// </summary>
public static string SL_FeedCylinder_Slack = "SL_FeedCylinder_Slack";
/// <summary>
/// DI /DO SL1上料气缸夹紧端 SL_FeedCylinder_Tighten X129
/// </summary>
public static string SL_FeedCylinder_Tighten = "SL_FeedCylinder_Tighten";
/// <summary>
/// DI 环形线横移1托盘检测 Toroid_SideWay_TrayCheck X130
/// </summary>
public static string Toroid_SideWay_TrayCheck = "Toroid_SideWay_TrayCheck";
/// <summary>
/// DI 环形线横移1料盘检测1 Toroid_SideWay_ReelCheck X131
/// </summary>
public static string Toroid_SideWay_ReelCheck = "Toroid_SideWay_ReelCheck";
/// <summary>
/// DI /DO 环形线横移1顶升上升端 Toroid_TopCylinder_Up X132
/// </summary>
public static string Toroid_TopCylinder_Up = "Toroid_TopCylinder_Up";
/// <summary>
/// DI /DO 环形线横移1顶升下降端 Toroid_TopCylinder_Down X133
/// </summary>
public static string Toroid_TopCylinder_Down = "Toroid_TopCylinder_Down";
/// <summary>
/// DI /DO 环形线横移1定位上升端 Toroid_LocationCylinder_Up X134
/// </summary>
public static string Toroid_LocationCylinder_Up = "Toroid_LocationCylinder_Up";
/// <summary>
/// DI /DO 环形线横移1定位下降端 Toroid_LocationCylinder_Down X135
/// </summary>
public static string Toroid_LocationCylinder_Down = "Toroid_LocationCylinder_Down";
/// <summary>
/// DI SL1线体出口横移检测 SL_SideWay_OutCheck X136
/// </summary>
public static string SL_SideWay_OutCheck = "SL_SideWay_OutCheck";
/// <summary>
/// DO SL1状态指示灯 SL_HddLed Y101
/// </summary>
public static string SL_HddLed = "SL_HddLed";
/// <summary>
/// DO SL1进料线体运转 SL_Line_Run Y102
/// </summary>
public static string SL_Line_Run = "SL_Line_Run";
/// <summary>
/// DO SL1线体定位横移电机运转 SL_LocationSideWay_Run Y103
/// </summary>
public static string SL_LocationSideWay_Run = "SL_LocationSideWay_Run";
/// <summary>
/// DO SL1线体出口横移电机运转 SL_OutSideWay_Run Y104
/// </summary>
public static string SL_OutSideWay_Run = "SL_OutSideWay_Run";
/// <summary>
/// DO 环形线横移1电机运转 Toroid_Motor_Run Y105
/// </summary>
public static string Toroid_Motor_Run = "Toroid_Motor_Run";
/// <summary>
/// DO SL1进料阻挡下降SOL SL_Entry_StopDown Y106
/// </summary>
public static string SL_Entry_StopDown = "SL_Entry_StopDown";
/// <summary>
/// DO SL1缓冲阻挡 SL_Buffer_StopDown Y107
/// </summary>
public static string SL_Buffer_StopDown = "SL_Buffer_StopDown";
/// <summary>
/// DO SL1出料阻挡下降SOL SL_Out_StopDown Y108
/// </summary>
public static string SL_Out_StopDown = "SL_Out_StopDown";
/// <summary>
/// DO SL1升降盘定位气缸1前进SOL SL_TrayLocationCylinder_Before Y123
/// </summary>
public static string SL_TrayLocationCylinder_Before = "SL_TrayLocationCylinder_Before";
/// <summary>
/// DO SL1升降盘定位气缸1后退SOL SL_TrayLocationCylinder_After Y124
/// </summary>
public static string SL_TrayLocationCylinder_After = "SL_TrayLocationCylinder_After";
/// <summary>
/// DO SL1提升伺服刹车ON SL_UpAxis_BreakOn Y129
/// </summary>
public static string SL_UpAxis_BreakOn = "SL_UpAxis_BreakOn";
/// <summary>
/// DO SL1移载1伺服刹车ON SL_MoveAxis_BreakOn Y130
/// </summary>
public static string SL_MoveAxis_BreakOn = "SL_MoveAxis_BreakOn";
/// <summary>
/// DO SL1提升伺服运转ON SL_UpAxis_ServoOn Y131
/// </summary>
public static string SL_UpAxis_ServoOn = "SL_UpAxis_ServoOn";
/// <summary>
/// DO SL1移载1伺服运转ON SL_MoveAxis_ServoOn Y132
/// </summary>
public static string SL_MoveAxis_ServoOn = "SL_MoveAxis_ServoOn";
/// <summary>
/// DO SL1出料线体运转 SL_OutLine_Run Y133
/// </summary>
public static string SL_OutLine_Run = "SL_OutLine_Run";
/// <summary>
/// DI FL1阻挡检测 FL_StopCheck X170
/// </summary>
public static string FL_StopCheck = "FL_StopCheck";
/// <summary>
/// DI FL1托盘检测 FL_TrayCheck X171
/// </summary>
public static string FL_TrayCheck = "FL_TrayCheck";
/// <summary>
/// DI FL1料盘检测1 FL_ReelCheck X172
/// </summary>
public static string FL_ReelCheck = "FL_ReelCheck";
/// <summary>
/// DI /DO FL1顶升上升端 FL_TopCylinder_Up X173
/// </summary>
public static string FL_TopCylinder_Up = "FL_TopCylinder_Up";
/// <summary>
/// DI /DO FL1顶升下降端 FL_TopCylinder_Down X174
/// </summary>
public static string FL_TopCylinder_Down = "FL_TopCylinder_Down";
/// <summary>
/// DO FL1阻挡1下降SOL FL_Stop1Down Y165
/// </summary>
public static string FL_Stop1Down = "FL_Stop1Down";
/// <summary>
/// DO FL1阻挡2下降SOL FL_Stop2Down Y166
/// </summary>
public static string FL_Stop2Down = "FL_Stop2Down";
#endregion
} }
public enum IO_VALUE public enum IO_VALUE
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!