Commit 02f9b237 LN

io操作按钮调整

1 个父辈 351aea0a
......@@ -90,6 +90,12 @@
<Compile Include="FrmDischargeLine.Designer.cs">
<DependentUpon>FrmDischargeLine.cs</DependentUpon>
</Compile>
<Compile Include="FrmEquipBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmEquipBase.Designer.cs">
<DependentUpon>FrmEquipBase.cs</DependentUpon>
</Compile>
<Compile Include="FrmProvidingEquip.cs">
<SubType>Form</SubType>
</Compile>
......
......@@ -16,34 +16,19 @@
private void InitializeComponent()
{
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.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.txtDoName = new System.Windows.Forms.TextBox();
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.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.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button();
this.btnStop2Up = 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.lblThisSta = new System.Windows.Forms.Label();
this.lblStoreStatus = new System.Windows.Forms.Label();
......@@ -57,6 +42,14 @@
this.lblTrayNum = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
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.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -74,19 +67,17 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17);
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.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Controls.Add(this.txtSlaveId);
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.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1";
......@@ -95,17 +86,6 @@
this.groupBox1.TabStop = false;
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)));
......@@ -117,26 +97,6 @@
this.txtSlaveId.Text = "0";
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
//
this.chbAutoRead.AutoSize = true;
......@@ -151,28 +111,6 @@
this.chbAutoRead.UseVisualStyleBackColor = true;
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
//
this.cmbWriteIO.DisplayMember = "ProName";
......@@ -189,67 +127,6 @@
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
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
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -309,12 +186,7 @@
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnCloseAll);
this.groupBox5.Controls.Add(this.btnStop2Up);
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.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(382, 208);
......@@ -327,7 +199,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White;
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.Location = new System.Drawing.Point(44, 164);
this.btnCloseAll.Location = new System.Drawing.Point(220, 26);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259;
......@@ -335,19 +207,6 @@
this.btnCloseAll.UseVisualStyleBackColor = false;
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
//
this.btnStop1Up.BackColor = System.Drawing.Color.White;
......@@ -357,62 +216,10 @@
this.btnStop1Up.Name = "btnStop1Up";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256;
this.btnStop1Up.Text = "阻挡气缸1下降";
this.btnStop1Up.Text = "定位气缸上升";
this.btnStop1Up.UseVisualStyleBackColor = false;
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
//
this.chbDebug.AutoSize = true;
......@@ -577,7 +384,101 @@
this.panel1.Size = new System.Drawing.Size(1295, 68);
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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
......@@ -587,8 +488,8 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmProvidingEquip";
this.Text = "移栽——";
this.Name = "FrmDischargeLine";
this.Text = "出料流水线——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......@@ -615,23 +516,10 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4;
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.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.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 lblStoreStatus;
private System.Windows.Forms.Button btnStart;
......@@ -639,16 +527,22 @@
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.CheckBox chbDebug;
private System.Windows.Forms.Button btnStop2Up;
private System.Windows.Forms.Button btnStop1Up;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6;
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;
namespace OnlineStore.AssemblyLine
{
public partial class FrmDischargeLine : FrmBase
public partial class FrmDischargeLine : FrmEquipBase
{
private bool IsLoad = false;
private string portName = "";
private short SlvAddr = 0;
private bool IsLoad = false;
private DischargeLine dischargeLine;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmDischargeLine(DischargeLine moveEquip)
......@@ -123,11 +121,19 @@ namespace OnlineStore.AssemblyLine
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)
{
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text;
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 slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0)
......@@ -140,6 +146,7 @@ namespace OnlineStore.AssemblyLine
}
}
private ConfigIO GetSelectDO()
{
string text = cmbWriteIO.SelectedValue.ToString();
......@@ -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)
{
btnStart.Enabled = !isStart;
......@@ -246,16 +244,7 @@ namespace OnlineStore.AssemblyLine
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)
{
......@@ -348,99 +337,32 @@ namespace OnlineStore.AssemblyLine
}
private void btnStop1Up_Click(object sender, EventArgs e)
{
if (btnStop1Up.Text.Equals("阻挡气缸1下降"))
{
dischargeLine.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
btnStop1Up.Text = "阻挡气缸1上升";
LogUtil.info("点击【" + btnStop1Up.Text + "】 ");
if (btnStop1Up.Text.Equals("定位气缸上升"))
{
dischargeLine.CylinderMove(null, IO_Type.SeparateDevice_Down, IO_Type.SeparateDevice_Up);
btnStop1Up.Text = "定位气缸下降";
btnStop1Up.BackColor = Color.Aqua;
}
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);
btnStop2Up.Text = "阻挡气缸2上升";
btnStop2Up.BackColor = Color.Aqua;
dischargeLine.CylinderMove(null, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
btnStop1Up.Text = "定位气缸上升";
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);
btnTopUp.Text = "顶升气缸下降";
btnTopUp.BackColor = Color.Aqua;
}
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;
if (con is Button)
{
con.BackColor = BackColor = Color.White;
}
}
}
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
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 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFeedingEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components);
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.txtDoName = new System.Windows.Forms.TextBox();
this.chbAutoRead = new System.Windows.Forms.CheckBox();
this.label17 = 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.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.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
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.btnStop2Up = 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.btnOutTopCylinder = new System.Windows.Forms.Button();
this.btnLocationCylinder = new System.Windows.Forms.Button();
this.btnTrayLocationCylinder = new System.Windows.Forms.Button();
this.btnFeedSideWayCylinder = new System.Windows.Forms.Button();
this.btnFeedCylinder = new System.Windows.Forms.Button();
this.btnFeedSideWay = new System.Windows.Forms.Button();
this.chbDebug = new System.Windows.Forms.CheckBox();
this.lblThisSta = new System.Windows.Forms.Label();
this.lblStoreStatus = new System.Windows.Forms.Label();
......@@ -116,6 +116,7 @@
this.label46 = new System.Windows.Forms.Label();
this.label49 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.btnFL_TopCylinder = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -138,105 +139,109 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17);
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.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime);
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.Location = new System.Drawing.Point(3, 534);
this.groupBox1.Location = new System.Drawing.Point(3, 494);
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.TabStop = false;
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
//
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(304, 68);
this.txtDOIndex.Location = new System.Drawing.Point(326, 71);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(47, 23);
this.txtDOIndex.TabIndex = 242;
this.txtDOIndex.TabIndex = 260;
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(79, 68);
this.txtDoName.Location = new System.Drawing.Point(69, 71);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23);
this.txtDoName.TabIndex = 241;
this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 259;
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
//
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(9, 71);
this.label17.Location = new System.Drawing.Point(17, 74);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17);
this.label17.TabIndex = 240;
this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 258;
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(233, 71);
this.label14.Location = new System.Drawing.Point(270, 74);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17);
this.label14.TabIndex = 239;
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 257;
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(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
//
this.cmbWriteIO.DisplayMember = "ProName";
......@@ -258,21 +263,21 @@
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.Location = new System.Drawing.Point(273, 111);
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.Text = "写入DO";
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(79, 113);
this.txtWriteTime.Location = new System.Drawing.Point(80, 117);
this.txtWriteTime.MaxLength = 10;
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.Text = "0";
//
......@@ -281,39 +286,13 @@
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.Location = new System.Drawing.Point(17, 120);
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
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -321,7 +300,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(488, 6);
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.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -338,7 +317,7 @@
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(229, 504);
this.tableLayoutPanel2.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -348,7 +327,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 6);
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.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -365,33 +344,63 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(229, 504);
this.tableLayoutPanel1.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel1.TabIndex = 102;
//
// 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)));
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.btnStop2Up);
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(974, 15);
this.groupBox5.Controls.Add(this.btnOutTopCylinder);
this.groupBox5.Controls.Add(this.btnLocationCylinder);
this.groupBox5.Controls.Add(this.btnTrayLocationCylinder);
this.groupBox5.Controls.Add(this.btnFeedSideWayCylinder);
this.groupBox5.Controls.Add(this.btnFeedCylinder);
this.groupBox5.Controls.Add(this.btnFeedSideWay);
this.groupBox5.Location = new System.Drawing.Point(974, 6);
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.TabStop = false;
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
//
this.btnCloseAll.BackColor = System.Drawing.Color.White;
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.Location = new System.Drawing.Point(14, 164);
this.btnCloseAll.Location = new System.Drawing.Point(14, 276);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 259;
......@@ -399,83 +408,83 @@
this.btnCloseAll.UseVisualStyleBackColor = false;
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(162, 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
//
this.btnStop1Up.BackColor = System.Drawing.Color.White;
this.btnStop1Up.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.btnStop1Up.Location = new System.Drawing.Point(14, 27);
this.btnStop1Up.Name = "btnStop1Up";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256;
this.btnStop1Up.Text = "阻挡气缸1下降";
this.btnStop1Up.UseVisualStyleBackColor = false;
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(162, 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(162, 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(14, 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(14, 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);
// btnOutTopCylinder
//
this.btnOutTopCylinder.BackColor = System.Drawing.Color.White;
this.btnOutTopCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutTopCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutTopCylinder.Location = new System.Drawing.Point(162, 27);
this.btnOutTopCylinder.Name = "btnOutTopCylinder";
this.btnOutTopCylinder.Size = new System.Drawing.Size(140, 34);
this.btnOutTopCylinder.TabIndex = 258;
this.btnOutTopCylinder.Text = "SL出口顶升上升";
this.btnOutTopCylinder.UseVisualStyleBackColor = false;
this.btnOutTopCylinder.Click += new System.EventHandler(this.btnOutTopCylinder_Click);
//
// btnLocationCylinder
//
this.btnLocationCylinder.BackColor = System.Drawing.Color.White;
this.btnLocationCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocationCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationCylinder.Location = new System.Drawing.Point(14, 27);
this.btnLocationCylinder.Name = "btnLocationCylinder";
this.btnLocationCylinder.Size = new System.Drawing.Size(140, 34);
this.btnLocationCylinder.TabIndex = 256;
this.btnLocationCylinder.Text = "SL定位气缸上升";
this.btnLocationCylinder.UseVisualStyleBackColor = false;
this.btnLocationCylinder.Click += new System.EventHandler(this.btnLocationCylinder_Click);
//
// btnTrayLocationCylinder
//
this.btnTrayLocationCylinder.BackColor = System.Drawing.Color.White;
this.btnTrayLocationCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTrayLocationCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTrayLocationCylinder.Location = new System.Drawing.Point(162, 116);
this.btnTrayLocationCylinder.Name = "btnTrayLocationCylinder";
this.btnTrayLocationCylinder.Size = new System.Drawing.Size(140, 34);
this.btnTrayLocationCylinder.TabIndex = 255;
this.btnTrayLocationCylinder.Text = "SL升降盘定位气缸前进";
this.btnTrayLocationCylinder.UseVisualStyleBackColor = false;
this.btnTrayLocationCylinder.Click += new System.EventHandler(this.btnTrayLocationCylinder_Click);
//
// btnFeedSideWayCylinder
//
this.btnFeedSideWayCylinder.BackColor = System.Drawing.Color.White;
this.btnFeedSideWayCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFeedSideWayCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFeedSideWayCylinder.Location = new System.Drawing.Point(162, 72);
this.btnFeedSideWayCylinder.Name = "btnFeedSideWayCylinder";
this.btnFeedSideWayCylinder.Size = new System.Drawing.Size(140, 34);
this.btnFeedSideWayCylinder.TabIndex = 252;
this.btnFeedSideWayCylinder.Text = "SL上料横移气缸取料";
this.btnFeedSideWayCylinder.UseVisualStyleBackColor = false;
this.btnFeedSideWayCylinder.Click += new System.EventHandler(this.btnFeedSideWayCylinder_Click);
//
// btnFeedCylinder
//
this.btnFeedCylinder.BackColor = System.Drawing.Color.White;
this.btnFeedCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFeedCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFeedCylinder.Location = new System.Drawing.Point(14, 116);
this.btnFeedCylinder.Name = "btnFeedCylinder";
this.btnFeedCylinder.Size = new System.Drawing.Size(140, 34);
this.btnFeedCylinder.TabIndex = 249;
this.btnFeedCylinder.Text = "SL上料气缸放松";
this.btnFeedCylinder.UseVisualStyleBackColor = false;
this.btnFeedCylinder.Click += new System.EventHandler(this.btnFeedCylinder_Click);
//
// btnFeedSideWay
//
this.btnFeedSideWay.BackColor = System.Drawing.Color.White;
this.btnFeedSideWay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFeedSideWay.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFeedSideWay.Location = new System.Drawing.Point(14, 72);
this.btnFeedSideWay.Name = "btnFeedSideWay";
this.btnFeedSideWay.Size = new System.Drawing.Size(140, 34);
this.btnFeedSideWay.TabIndex = 246;
this.btnFeedSideWay.Text = "SL上料横移机构上升";
this.btnFeedSideWay.UseVisualStyleBackColor = false;
this.btnFeedSideWay.Click += new System.EventHandler(this.btnFeedSideWay_Click);
//
// chbDebug
//
......@@ -498,7 +507,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(124, 19);
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.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -618,9 +627,9 @@
this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList);
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.Size = new System.Drawing.Size(873, 199);
this.groupBox6.Size = new System.Drawing.Size(911, 245);
this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息";
......@@ -646,7 +655,7 @@
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(6, 115);
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;
//
// groupBox7
......@@ -656,7 +665,7 @@
this.groupBox7.Controls.Add(this.tableLayoutPanel3);
this.groupBox7.Location = new System.Drawing.Point(247, 6);
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.TabStop = false;
this.groupBox7.Text = "DI列表";
......@@ -673,7 +682,7 @@
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(229, 504);
this.tableLayoutPanel3.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel3.TabIndex = 102;
//
// groupBox8
......@@ -683,7 +692,7 @@
this.groupBox8.Controls.Add(this.tableLayoutPanel4);
this.groupBox8.Location = new System.Drawing.Point(728, 6);
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.TabStop = false;
this.groupBox8.Text = "DO列表";
......@@ -700,7 +709,7 @@
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 504);
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 465);
this.tableLayoutPanel4.TabIndex = 103;
//
// tabPage2
......@@ -1408,6 +1417,19 @@
this.panel1.Size = new System.Drawing.Size(1328, 68);
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -1419,7 +1441,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmFeedingEquip";
this.Text = "移栽——";
this.Text = "入料模块——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......@@ -1453,23 +1475,17 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4;
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.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.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.Button btnTrayLocationCylinder;
private System.Windows.Forms.Button btnFeedSideWayCylinder;
private System.Windows.Forms.Button btnFeedCylinder;
private System.Windows.Forms.Button btnFeedSideWay;
private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.Label lblStoreStatus;
private System.Windows.Forms.Button btnStart;
......@@ -1478,8 +1494,8 @@
private System.Windows.Forms.Button btnInStore;
private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.CheckBox chbDebug;
private System.Windows.Forms.Button btnStop2Up;
private System.Windows.Forms.Button btnStop1Up;
private System.Windows.Forms.Button btnOutTopCylinder;
private System.Windows.Forms.Button btnLocationCylinder;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
......@@ -1531,7 +1547,6 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnAxisOff;
private System.Windows.Forms.Button btnAxisOn;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.GroupBox groupBox2;
public System.Windows.Forms.TextBox txtP1;
......@@ -1546,6 +1561,14 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox8;
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;
namespace OnlineStore.AssemblyLine
{
public partial class FrmFeedingEquip : FrmBase
public partial class FrmFeedingEquip : FrmEquipBase
{
private bool IsLoad = false;
private string portName = "";
......@@ -148,11 +148,19 @@ namespace OnlineStore.AssemblyLine
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)
{
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text;
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 slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0)
......@@ -183,7 +191,7 @@ namespace OnlineStore.AssemblyLine
ConfigIO io = GetSelectDO();
if (io != null)
{
// txtIp.Text = io.DeviceName;
// txtIp.Text = io.DeviceName;
txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.DeviceName;
txtSlaveId.Text = io.SlaveID.ToString();
......@@ -191,6 +199,7 @@ namespace OnlineStore.AssemblyLine
if (selectControl != null) { selectControl.BackColor = Color.White; }
newControl.BackColor = Color.SkyBlue;
selectControl = newControl;
//txtIOInfo.Text = "IP:" + io.DeviceName + " /" + io.GetIOAddr().ToString();
}
}
}
......@@ -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)
{
......@@ -287,19 +287,7 @@ namespace OnlineStore.AssemblyLine
btnReset.Enabled = isStart;
btnInStore.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)
{
timer1.Start();
......@@ -399,97 +387,62 @@ namespace OnlineStore.AssemblyLine
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下降"))
{
feedEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
btnStop1Up.Text = "阻挡气缸1上升";
btnStop1Up.BackColor = Color.Aqua;
LogUtil.info("点击【"+ btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
feedEquip.CylinderMove(null, ioLowType, ioHighType);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
feedEquip.IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
btnStop1Up.Text = "阻挡气缸1下降";
btnStop1Up.BackColor = Color.White;
{
feedEquip.CylinderMove(null, ioHighType, ioLowType);
btn.Text = defaultText;
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下降"))
{
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;
}
BtnMove(btnOutTopCylinder, "SL出口顶升上升", "SL出口顶升下降", IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
}
private void btnTopUp_Click(object sender, EventArgs e)
{
if (btnTopUp.Text.Equals("顶升气缸上升"))
{
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 btnFeedSideWay_Click(object sender, EventArgs e)
{
BtnMove(btnFeedSideWay, "SL上料横移机构上升", "SL上料横移机构下降", IO_Type.SL_FeedSideWay_Down, IO_Type.SL_FeedSideWay_Up);
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
private void btnFeedCylinder_Click(object sender, EventArgs e)
{
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进"))
{
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;
}
BtnMove(btnFeedCylinder, "SL上料气缸放松", "SL上料气缸夹紧", IO_Type.SL_FeedCylinder_Tighten, IO_Type.SL_FeedCylinder_Slack);
}
private void btnUpDownUp_Click(object sender, EventArgs e)
private void btnFeedSideWayCylinder_Click(object sender, EventArgs e)
{
if (btnUpDownUp.Text.Equals("上下气缸上升"))
{
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;
}
BtnMove(btnFeedSideWayCylinder, "SL上料横移气缸取料", "SL上料横移气缸放料", IO_Type.SL_FeedSideWayCylinder_Emptying, IO_Type.SL_FeedSideWayCylinder_Take);
}
private void btnClampSlack_Click(object sender, EventArgs e)
private void btnTrayLocationCylinder_Click(object sender, EventArgs e)
{
if (btnClampSlack.Text.Equals("夹料气缸夹紧"))
{
feedEquip.CylinderMove(null, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
btnClampSlack.Text = "夹料气缸放松";
btnClampSlack.BackColor = Color.Aqua;
}
else
{
feedEquip.CylinderMove(null, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
btnClampSlack.Text = "夹料气缸夹紧";
btnClampSlack.BackColor = Color.SkyBlue;
}
}
BtnMove(btnTrayLocationCylinder, "SL升降盘定位气缸前进", "SL升降盘定位气缸后退", IO_Type.SL_TrayLocationCylinder_Before, IO_Type.SL_TrayLocationCylinder_After);
}
private void btnToroid_TopCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnToroid_TopCylinder, "环形线横移顶升上升", "环形线横移顶升下降", IO_Type.Toroid_TopCylinder_Down, IO_Type.Toroid_TopCylinder_Up);
}
private void btnFL_TopCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnFL_TopCylinder, "FL顶升上升", "FL顶升下降", IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up);
}
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)
{
string portName = txtAxisDeviceName.Text;
......@@ -632,7 +585,14 @@ namespace OnlineStore.AssemblyLine
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)
......@@ -691,6 +651,7 @@ namespace OnlineStore.AssemblyLine
}
}
}
}
......
......@@ -212,6 +212,7 @@ namespace OnlineStore.AssemblyLine
this.ShowInTaskbar = false;
this.notifyIcon1.Visible = true;
this.Hide();
GC.Collect();
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
......
......@@ -19,19 +19,9 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components);
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.txtDoName = new System.Windows.Forms.TextBox();
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.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.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -112,6 +102,14 @@
this.label46 = new System.Windows.Forms.Label();
this.label49 = new System.Windows.Forms.Label();
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.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -132,19 +130,17 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17);
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.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Controls.Add(this.txtSlaveId);
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.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1";
......@@ -153,17 +149,6 @@
this.groupBox1.TabStop = false;
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)));
......@@ -175,26 +160,6 @@
this.txtSlaveId.Text = "0";
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
//
this.chbAutoRead.AutoSize = true;
......@@ -209,28 +174,6 @@
this.chbAutoRead.UseVisualStyleBackColor = true;
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
//
this.cmbWriteIO.DisplayMember = "ProName";
......@@ -241,73 +184,12 @@
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.Size = new System.Drawing.Size(358, 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);
//
// 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
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -424,7 +306,7 @@
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.Location = new System.Drawing.Point(220, 72);
this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255;
......@@ -437,7 +319,7 @@
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.Location = new System.Drawing.Point(220, 116);
this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252;
......@@ -1338,6 +1220,100 @@
this.panel1.Size = new System.Drawing.Size(1295, 68);
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -1349,7 +1325,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMoveEquip";
this.Text = "移栽——";
this.Text = "出入仓移栽——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......@@ -1381,17 +1357,8 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4;
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.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.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack;
......@@ -1459,7 +1426,6 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnAxisOff;
private System.Windows.Forms.Button btnAxisOn;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.GroupBox groupBox2;
public System.Windows.Forms.TextBox txtP1;
......@@ -1470,6 +1436,14 @@
public System.Windows.Forms.TextBox txtBoxP;
private System.Windows.Forms.GroupBox groupBox6;
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;
namespace OnlineStore.AssemblyLine
{
public partial class FrmMoveEquip : FrmBase
public partial class FrmMoveEquip : FrmEquipBase
{
private bool IsLoad = false;
private string portName = "";
......@@ -135,11 +135,19 @@ namespace OnlineStore.AssemblyLine
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)
{
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text;
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 slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0)
......@@ -152,6 +160,7 @@ namespace OnlineStore.AssemblyLine
}
}
private ConfigIO GetSelectDO()
{
string text = cmbWriteIO.SelectedValue.ToString();
......@@ -197,10 +206,12 @@ namespace OnlineStore.AssemblyLine
comboBox1.SelectedIndex = 0;
txtAxisValue.Text = SlvAddr.ToString();
btnUpDownUp.Visible = false;
}
else
{
tabControl1.TabPages.Remove(tabPage2);
btnUpDownUp.Visible = true;
}
cmbSizeList.Items.Clear();
......@@ -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)
{
btnStart.Enabled = !isStart;
......@@ -281,17 +283,7 @@ namespace OnlineStore.AssemblyLine
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)
{
timer1.Start();
......@@ -393,95 +385,61 @@ namespace OnlineStore.AssemblyLine
}
private void btnStop1Up_Click(object sender, EventArgs e)
{
if (btnStop1Up.Text.Equals("阻挡气缸1下降"))
{
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;
}
BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1);
}
private void btnStop2Up_Click(object sender, EventArgs e)
{
if (btnStop2Up.Text.Equals("阻挡气缸2下降"))
{
moveEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH);
btnStop2Up.Text = "阻挡气缸2上升";
btnStop2Up.BackColor = Color.Aqua;
}
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("顶升气缸上升"))
BtnMove(btnStop2Up, "阻挡2下降", "阻挡2上升", IO_Type.StopCylinder_Down2);
}
private void BtnMove(Button btn, string defaultText, string targetText, string ioHighType )
{
LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
moveEquip.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
btnTopUp.Text = "顶升气缸下降";
btnTopUp.BackColor = Color.Aqua;
moveEquip.IOMove(ioHighType, IO_VALUE.HIGH);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
moveEquip.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
btnTopUp.Text = "顶升气缸上升";
btnTopUp.BackColor = Color.SkyBlue;
moveEquip.IOMove(ioHighType, IO_VALUE.LOW);
btn.Text = defaultText;
btn.BackColor = Color.White;
}
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
private void BtnMove(Button btn, string defaultText, string targetText, string ioLowType, string ioHighType)
{
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进"))
LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
moveEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
btnBeforeAfterBefore.Text = "前后气缸后退";
btnBeforeAfterBefore.BackColor = Color.Aqua;
moveEquip.CylinderMove(null, ioLowType, ioHighType);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
moveEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
btnBeforeAfterBefore.Text = "前后气缸前进";
btnBeforeAfterBefore.BackColor = Color.SkyBlue;
moveEquip.CylinderMove(null, ioHighType, ioLowType);
btn.Text = defaultText;
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)
{
if (btnUpDownUp.Text.Equals("上下气缸上升"))
{
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;
}
}
BtnMove(btnUpDownUp, "升降上升", "升降下降", IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
private void btnClampSlack_Click(object sender, EventArgs e)
{
if (btnClampSlack.Text.Equals("夹料气缸夹紧"))
{
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;
}
}
BtnMove(btnClampSlack, "夹料夹紧", "夹料放松", IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
}
private void btnOpenAxis_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
......@@ -617,8 +575,15 @@ namespace OnlineStore.AssemblyLine
}
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)
......
......@@ -19,19 +19,17 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProvidingEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components);
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.txtDoName = new System.Windows.Forms.TextBox();
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.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.btnReadAllDi = new System.Windows.Forms.Button();
this.btnReadAllDo = 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.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -74,19 +72,17 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.label17);
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.txtWriteTime);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Controls.Add(this.txtSlaveId);
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.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1";
......@@ -95,121 +91,86 @@
this.groupBox1.TabStop = false;
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
//
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(304, 68);
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 = 242;
this.txtDOIndex.TabIndex = 284;
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(79, 68);
this.txtDoName.Location = new System.Drawing.Point(71, 67);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(105, 23);
this.txtDoName.TabIndex = 241;
this.txtDoName.Size = new System.Drawing.Size(116, 23);
this.txtDoName.TabIndex = 283;
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
//
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(9, 71);
this.label17.Location = new System.Drawing.Point(19, 70);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 17);
this.label17.TabIndex = 240;
this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 282;
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(233, 71);
this.label14.Location = new System.Drawing.Point(272, 70);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 17);
this.label14.TabIndex = 239;
this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 281;
this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbWriteIO
// btnOpenDo
//
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);
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 = 280;
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(220, 107);
this.btnWriteSingleDO.Location = new System.Drawing.Point(275, 107);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(140, 34);
this.btnWriteSingleDO.TabIndex = 232;
this.btnWriteSingleDO.Text = "写入DO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(100, 34);
this.btnWriteSingleDO.TabIndex = 277;
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(79, 113);
this.txtWriteTime.Location = new System.Drawing.Point(82, 113);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(59, 23);
this.txtWriteTime.TabIndex = 238;
this.txtWriteTime.Size = new System.Drawing.Size(66, 23);
this.txtWriteTime.TabIndex = 279;
this.txtWriteTime.Text = "0";
//
// label5
......@@ -217,38 +178,53 @@
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.Location = new System.Drawing.Point(19, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237;
this.label5.TabIndex = 278;
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);
// 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
//
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
//
......@@ -366,7 +342,7 @@
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.Location = new System.Drawing.Point(220, 72);
this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255;
......@@ -379,7 +355,7 @@
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.Location = new System.Drawing.Point(220, 116);
this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252;
......@@ -588,7 +564,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmProvidingEquip";
this.Text = "移栽——";
this.Text = "出料移栽——";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
......@@ -615,17 +591,8 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox4;
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.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.GroupBox groupBox5;
private System.Windows.Forms.Button btnClampSlack;
......@@ -644,11 +611,18 @@
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6;
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;
namespace OnlineStore.AssemblyLine
{
public partial class FrmProvidingEquip : FrmBase
public partial class FrmProvidingEquip : FrmEquipBase
{
private bool IsLoad = false;
private string portName = "";
private short SlvAddr = 0;
private ProvidingEquip providingEquip;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmProvidingEquip(ProvidingEquip moveEquip)
......@@ -123,11 +122,19 @@ namespace OnlineStore.AssemblyLine
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)
{
WriteDO(IO_VALUE.LOW);
}
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text;
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 slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0)
......@@ -139,7 +146,6 @@ namespace OnlineStore.AssemblyLine
IOManager.instance.WriteSingleDO(deviceName, (byte)slaveId, (ushort)index, (IO_VALUE)value);
}
}
private ConfigIO GetSelectDO()
{
string text = cmbWriteIO.SelectedValue.ToString();
......@@ -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)
{
......@@ -245,18 +243,7 @@ namespace OnlineStore.AssemblyLine
//btnInStore.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)
{
timer1.Start();
......@@ -348,100 +335,74 @@ namespace OnlineStore.AssemblyLine
}
private void btnStop1Up_Click(object sender, EventArgs e)
{
if (btnStop1Up.Text.Equals("阻挡气缸1下降"))
{
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;
}
}
BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1);
}
private void btnStop2Up_Click(object sender, EventArgs e)
{
if (btnStop2Up.Text.Equals("阻挡气缸2下降"))
{
providingEquip.IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH);
btnStop2Up.Text = "阻挡气缸2上升";
btnStop2Up.BackColor = Color.Aqua;
}
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("顶升气缸上升"))
BtnMove(btnStop2Up, "阻挡2下降", "阻挡2上升", IO_Type.StopCylinder_Down2);
}
private void BtnMove(Button btn, string defaultText, string targetText, string ioHighType)
{
LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
providingEquip.CylinderMove(null, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
btnTopUp.Text = "顶升气缸下降";
btnTopUp.BackColor = Color.Aqua;
providingEquip.IOMove(ioHighType, IO_VALUE.HIGH);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
providingEquip.CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
btnTopUp.Text = "顶升气缸上升";
btnTopUp.BackColor = Color.SkyBlue;
providingEquip.IOMove(ioHighType, IO_VALUE.LOW);
btn.Text = defaultText;
btn.BackColor = Color.White;
}
}
private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
private void BtnMove(Button btn, string defaultText, string targetText, string ioLowType, string ioHighType)
{
if (btnBeforeAfterBefore.Text.Equals("前后气缸前进"))
LogUtil.info("点击【" + btn.Text + "】 ");
if (btn.Text.Equals(defaultText))
{
providingEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
btnBeforeAfterBefore.Text = "前后气缸后退";
btnBeforeAfterBefore.BackColor = Color.Aqua;
providingEquip.CylinderMove(null, ioLowType, ioHighType);
btn.Text = targetText;
btn.BackColor = Color.Aqua;
}
else
{
providingEquip.CylinderMove(null, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
btnBeforeAfterBefore.Text = "前后气缸前进";
btnBeforeAfterBefore.BackColor = Color.SkyBlue;
providingEquip.CylinderMove(null, ioHighType, ioLowType);
btn.Text = defaultText;
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)
{
if (btnUpDownUp.Text.Equals("上下气缸上升"))
{
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;
}
}
BtnMove(btnUpDownUp, "升降上升", "升降下降", IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
private void btnClampSlack_Click(object sender, EventArgs e)
{
if (btnClampSlack.Text.Equals("夹料气缸夹紧"))
{
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;
}
BtnMove(btnClampSlack, "夹料夹紧", "夹料放松", IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
}
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 @@
<Compile Include="deviceLibrary\IO\AIManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.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_Partial.cs" />
<Compile Include="assemblyLine\MoveEquip.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\ACServerManager.cs" />
<Compile Include="deviceLibrary\PanasonicServo\ACServerManager_Partial.cs" />
......
......@@ -22,10 +22,9 @@ namespace OnlineStore.DeviceLibrary
public static LineBean Line = 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, DischargeLine_Config> disChargeLineMap = null;
public static Dictionary<int, StoreConfig> allConfigMap = null;
public LineManager()
{
}
......@@ -52,12 +51,18 @@ namespace OnlineStore.DeviceLibrary
{
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.SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
moveECMap = new Dictionary<int, MoveEquip_Config>();
feedingECMap = new Dictionary<int, FeedingEquip_Config>();
providingECMap = new Dictionary<int, ProvidingEquip_Config>();
disChargeLineMap = new Dictionary<int, DischargeLine_Config>();
allConfigMap = new Dictionary<int, StoreConfig>();
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
if (server.Equals(""))
{
......@@ -81,17 +86,18 @@ namespace OnlineStore.DeviceLibrary
string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Line);
Config = CSVConfigReader.LoadLineConfig(0, CID, StoreType.RC_LINE, linefilePath);
int moveEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_moveEquip_count);
allConfigMap.Add(0, Config);
int moveEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_moveEquip_count);
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip);
for (int i = 1; i <= moveEquipCount; i++)
{
string nameStr = i.ToString().PadLeft(2, '0');
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;
moveConfig.SetIO( subType);
moveConfig.SetIO(subType);
moveECMap.Add(i, moveConfig);
allConfigMap.Add(subType, moveConfig);
}
int feedingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_feedingEquip_count);
string feedingEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_FeedingEquip);
......@@ -100,9 +106,10 @@ namespace OnlineStore.DeviceLibrary
int subType = 100 + i;
string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv");
FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType, config);
moveConfig.SetIO( subType);
feedingECMap.Add(i, moveConfig);
moveConfig.SetIO(subType);
feedingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
}
int providingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_providingEquip_count);
......@@ -112,9 +119,10 @@ namespace OnlineStore.DeviceLibrary
int subType = 200 + i;
string config = appPath + providingEquipConfig.Replace(".csv", "_" + i + ".csv");
ProvidingEquip_Config moveConfig = CSVConfigReader.LoadProvidingConfig(subType, config);
moveConfig.SetIO( subType);
providingECMap.Add(i, moveConfig);
moveConfig.SetIO(subType);
providingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig);
}
int dislineCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_dischargeLine_count);
......@@ -126,15 +134,17 @@ namespace OnlineStore.DeviceLibrary
DischargeLine_Config moveConfig = CSVConfigReader.LoadDischargeLineConfig(subType, config);
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, "加载 完成!");
return true;
}
}
else if(Line != null){
else if (Line != null)
{
return true;
}
}
......@@ -144,7 +154,7 @@ namespace OnlineStore.DeviceLibrary
MessageBox.Show(ex.ToString(), "加载配置错误(请检查配置)");
Application.Exit();
}
return false ;
return false;
}
/// <summary>
......@@ -181,7 +191,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_MoveEquip);
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));
if (!result)
{
......@@ -203,7 +214,8 @@ namespace OnlineStore.DeviceLibrary
int id = config.Id - 100;
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));
if (!result)
{
......@@ -224,7 +236,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_ProvidingEquip);
int id = config.Id - 200;
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));
if (!result)
{
......@@ -246,7 +259,8 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_DischargeLine);
int id = config.Id - 300;
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));
if (!result)
{
......
......@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
this.Config = config;
IsDebug = config.IsDebug.Equals(1);
baseConfig = config;
Name = (" " + "_出料皮带线_" + DeviceID % 30 + " ").ToUpper();
Name = (" " + "_出料皮带线_" + DeviceID % 100 + " ").ToUpper();
Init();
UseAxis = false;
MoveInfo = new LineMoveInfo(DeviceID, "出料皮带线-" + DeviceID + "-MoveInfo");
......
......@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
baseConfig = config;
this.Config = config;
IsDebug = config.IsDebug.Equals(1);
Name = (" " + "_入料_" + DeviceID % 10 + " ").ToUpper();
Name = (" " + "_入料_" + DeviceID % 100 + " ").ToUpper();
Init();
MoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-Move");
SecondMoveInfo = new LineMoveInfo(DeviceID, "入料-" + DeviceID + "-SecondMove");
......
......@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
this.Config = config;
IsDebug = config.IsDebug.Equals(1);
baseConfig = config;
Name = (" " + "_出料_" + DeviceID % 10 + " ").ToUpper();
Name = (" " + "_出料_" + DeviceID % 100 + " ").ToUpper();
Init();
UseAxis = false;
MoveInfo = new LineMoveInfo(DeviceID, "出料-" + DeviceID + "-MoveInfo");
......
......@@ -292,18 +292,7 @@ namespace OnlineStore.DeviceLibrary
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
{
ushort length = LineManager.Config.GetDOLength(aio.IP);
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);
}
}
......@@ -347,7 +333,7 @@ namespace OnlineStore.DeviceLibrary
bool result = aioBox.WriteDO(StartAddress, GetBox_Sta(onOff));
if (!result)
{
LogUtil.error("AIO WriteSingleDO [" + StartAddress + "] 第" + i + "次失败:" + aioBox.ErrInfo);
LogUtil.error("AIO WriteSingleDO ["+ioIp+"] [" + StartAddress + "] 第" + i + "次失败:" + aioBox.ErrInfo);
}
else
{
......@@ -362,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
}
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)
......@@ -384,7 +370,7 @@ namespace OnlineStore.DeviceLibrary
try
{
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)
{
......@@ -396,12 +382,12 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.error(LOGGER, "WriteSingleDO出错 没有连接IO模块:" + ioIp);
LogUtil.error(LOGGER, "AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 出错 没有连接IO模块:" + ioIp);
}
}
catch (Exception ex)
{
LogUtil.error("WriteSingleDO 出错:" + ioIp);
LogUtil.error("AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 出错:" + ioIp);
}
}
public override void ReadAllDI(string ioIp, byte slaveId)
......@@ -417,7 +403,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("ReadAllDI出错:" + ioIp);
LogUtil.error("ReadAllDI [" + ioIp + "]出错:" + ioIp);
}
}
public override void ReadAllDO(string ioIp, byte slaveId)
......@@ -434,7 +420,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("ReadAllDO出错:" + ioIp);
LogUtil.error("ReadAllDO [" + ioIp + "]出错:" + ioIp);
}
}
public override IO_VALUE GetDOValue(string ioIP, byte slaveId, ushort StartAddress)
......@@ -463,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("GetDOValue 出错:" + ex.ToString());
LogUtil.error("GetDOValue [" + ioIP + "] [" + StartAddress + "] 出错:" + ex.ToString());
}
return value;
}
......@@ -495,7 +481,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("GetDIValue 出错:" + ex.ToString());
LogUtil.error("GetDIValue [" + ioIP + "] [" + StartAddress + "] 出错:" + ex.ToString());
}
return value;
}
......@@ -515,15 +501,11 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error(LOGGER, " GetIOValue 获取数据出错:" + ex.ToString());
LogUtil.error(LOGGER, " GetIOValue [" + configIO.DeviceName + "] [" + configIO.GetIOAddr() + "] 获取数据出错:" + ex.ToString());
}
return value;
}
//private Box_Addr GetAddr(ushort StartAddress)
//{
// return (Box_Addr)(StartAddress);
//}
private Box_Sta GetBox_Sta(IO_VALUE onOff)
{
if (onOff.Equals(IO_VALUE.HIGH))
......
......@@ -16,12 +16,7 @@ namespace OnlineStore.DeviceLibrary
#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)
{
ConfigIO configIo = GetDO(ioType, subType);
......@@ -91,27 +86,14 @@ namespace OnlineStore.DeviceLibrary
}
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];
}
}
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 LineManager.allConfigMap[subType].DIList[ioType];
}
}
}
return configIo;
}
......@@ -127,30 +109,41 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if (LineManager.moveECMap.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.allConfigMap.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;
}
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
public static void Init()
{
......
......@@ -399,8 +399,239 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024
/// </summary>
public static string SeparateDevice_Run = "SeparateDevice_Run";
public static string SeparateDevice_Run = "SeparateDevice_Run";
#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
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!