Commit 58f2028a 几米阳光

wait方法修改。光栅代码增加。部分代码调整。

1 个父辈 a1225610
......@@ -18,6 +18,9 @@
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnCloseLed = new System.Windows.Forms.Button();
this.btnOpenLed = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.btnCloseAxisBreak = new System.Windows.Forms.Button();
this.btnOpenAxisBreak = new System.Windows.Forms.Button();
this.btnLocationDown = new System.Windows.Forms.Button();
......@@ -45,9 +48,6 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.button1 = new System.Windows.Forms.Button();
this.btnCloseLed = new System.Windows.Forms.Button();
this.btnOpenLed = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -64,43 +64,75 @@
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.btnCloseLed);
this.groupBox1.Controls.Add(this.btnOpenLed);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.btnCloseAxisBreak);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.btnLocationDown);
this.groupBox1.Controls.Add(this.btnLocationUp);
this.groupBox1.Controls.Add(this.btnCloseDoor);
this.groupBox1.Controls.Add(this.btnOpenDoor);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.btnOpenLed);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Controls.Add(this.chbAutoRead);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.btnReadIO);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.btnCloseAxisBreak);
this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.btnReadIO);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.btnLocationDown);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnReadAllDi);
this.groupBox1.Controls.Add(this.cmbWriteValue);
this.groupBox1.Controls.Add(this.btnLocationUp);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.btnReadAllDo);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Controls.Add(this.btnCloseDoor);
this.groupBox1.Controls.Add(this.btnOpenDoor);
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(17, 7);
this.groupBox1.Location = new System.Drawing.Point(482, 46);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(301, 516);
this.groupBox1.Size = new System.Drawing.Size(327, 478);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
//
// btnCloseLed
//
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(173, 379);
this.btnCloseLed.Name = "btnCloseLed";
this.btnCloseLed.Size = new System.Drawing.Size(102, 34);
this.btnCloseLed.TabIndex = 256;
this.btnCloseLed.Text = "关闭照明";
this.btnCloseLed.UseVisualStyleBackColor = true;
this.btnCloseLed.Click += new System.EventHandler(this.btnCloseLed_Click);
//
// btnOpenLed
//
this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLed.Location = new System.Drawing.Point(56, 379);
this.btnOpenLed.Name = "btnOpenLed";
this.btnOpenLed.Size = new System.Drawing.Size(102, 34);
this.btnOpenLed.TabIndex = 255;
this.btnOpenLed.Text = "打开照明";
this.btnOpenLed.UseVisualStyleBackColor = true;
this.btnOpenLed.Click += new System.EventHandler(this.btnOpenLed_Click);
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.Location = new System.Drawing.Point(173, 430);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 254;
this.button1.Text = "关闭";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnCloseAxisBreak
//
this.btnCloseAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxisBreak.Location = new System.Drawing.Point(144, 346);
this.btnCloseAxisBreak.Location = new System.Drawing.Point(173, 339);
this.btnCloseAxisBreak.Name = "btnCloseAxisBreak";
this.btnCloseAxisBreak.Size = new System.Drawing.Size(102, 34);
this.btnCloseAxisBreak.TabIndex = 253;
......@@ -111,7 +143,7 @@
// btnOpenAxisBreak
//
this.btnOpenAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxisBreak.Location = new System.Drawing.Point(27, 346);
this.btnOpenAxisBreak.Location = new System.Drawing.Point(56, 339);
this.btnOpenAxisBreak.Name = "btnOpenAxisBreak";
this.btnOpenAxisBreak.Size = new System.Drawing.Size(102, 34);
this.btnOpenAxisBreak.TabIndex = 252;
......@@ -122,7 +154,7 @@
// btnLocationDown
//
this.btnLocationDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationDown.Location = new System.Drawing.Point(144, 308);
this.btnLocationDown.Location = new System.Drawing.Point(173, 301);
this.btnLocationDown.Name = "btnLocationDown";
this.btnLocationDown.Size = new System.Drawing.Size(102, 34);
this.btnLocationDown.TabIndex = 251;
......@@ -133,7 +165,7 @@
// btnLocationUp
//
this.btnLocationUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationUp.Location = new System.Drawing.Point(27, 308);
this.btnLocationUp.Location = new System.Drawing.Point(56, 301);
this.btnLocationUp.Name = "btnLocationUp";
this.btnLocationUp.Size = new System.Drawing.Size(102, 34);
this.btnLocationUp.TabIndex = 250;
......@@ -144,7 +176,7 @@
// btnCloseDoor
//
this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDoor.Location = new System.Drawing.Point(144, 270);
this.btnCloseDoor.Location = new System.Drawing.Point(173, 263);
this.btnCloseDoor.Name = "btnCloseDoor";
this.btnCloseDoor.Size = new System.Drawing.Size(102, 34);
this.btnCloseDoor.TabIndex = 249;
......@@ -155,7 +187,7 @@
// btnOpenDoor
//
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(27, 270);
this.btnOpenDoor.Location = new System.Drawing.Point(56, 263);
this.btnOpenDoor.Name = "btnOpenDoor";
this.btnOpenDoor.Size = new System.Drawing.Size(102, 34);
this.btnOpenDoor.TabIndex = 248;
......@@ -168,7 +200,7 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(170, 84);
this.label3.Location = new System.Drawing.Point(14, 91);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(54, 17);
this.label3.TabIndex = 247;
......@@ -178,10 +210,10 @@
// 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(69, 80);
this.txtSlaveId.Location = new System.Drawing.Point(238, 54);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(89, 23);
this.txtSlaveId.Size = new System.Drawing.Size(74, 23);
this.txtSlaveId.TabIndex = 246;
this.txtSlaveId.Text = "0";
//
......@@ -190,7 +222,7 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(18, 86);
this.label2.Location = new System.Drawing.Point(181, 57);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(50, 17);
this.label2.TabIndex = 245;
......@@ -200,7 +232,7 @@
// btnReadAllDo
//
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(144, 232);
this.btnReadAllDo.Location = new System.Drawing.Point(173, 206);
this.btnReadAllDo.Name = "btnReadAllDo";
this.btnReadAllDo.Size = new System.Drawing.Size(102, 34);
this.btnReadAllDo.TabIndex = 245;
......@@ -212,7 +244,7 @@
//
this.chbAutoRead.AutoSize = true;
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(220, 17);
this.chbAutoRead.Location = new System.Drawing.Point(501, 19);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
......@@ -222,7 +254,7 @@
// btnReadAllDi
//
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(27, 232);
this.btnReadAllDi.Location = new System.Drawing.Point(56, 206);
this.btnReadAllDi.Name = "btnReadAllDi";
this.btnReadAllDi.Size = new System.Drawing.Size(102, 34);
this.btnReadAllDi.TabIndex = 244;
......@@ -233,7 +265,7 @@
// btnReadIO
//
this.btnReadIO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadIO.Location = new System.Drawing.Point(27, 194);
this.btnReadIO.Location = new System.Drawing.Point(56, 168);
this.btnReadIO.Name = "btnReadIO";
this.btnReadIO.Size = new System.Drawing.Size(102, 34);
this.btnReadIO.TabIndex = 243;
......@@ -244,20 +276,20 @@
// 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(69, 48);
this.txtDOIndex.Location = new System.Drawing.Point(75, 54);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(89, 23);
this.txtDOIndex.Size = new System.Drawing.Size(74, 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(69, 15);
this.txtDoName.Location = new System.Drawing.Point(75, 22);
this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(123, 23);
this.txtDoName.Size = new System.Drawing.Size(237, 23);
this.txtDoName.TabIndex = 241;
this.txtDoName.Text = "0";
//
......@@ -266,7 +298,7 @@
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(18, 21);
this.label17.Location = new System.Drawing.Point(22, 25);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(46, 17);
this.label17.TabIndex = 240;
......@@ -278,7 +310,7 @@
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(24, 53);
this.label14.Location = new System.Drawing.Point(24, 57);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(44, 17);
this.label14.TabIndex = 239;
......@@ -288,7 +320,7 @@
// 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(214, 145);
this.txtWriteTime.Location = new System.Drawing.Point(238, 121);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(74, 23);
......@@ -300,7 +332,7 @@
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(148, 148);
this.label5.Location = new System.Drawing.Point(172, 124);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237;
......@@ -316,7 +348,7 @@
this.cmbWriteValue.Items.AddRange(new object[] {
"0",
"1"});
this.cmbWriteValue.Location = new System.Drawing.Point(69, 145);
this.cmbWriteValue.Location = new System.Drawing.Point(75, 119);
this.cmbWriteValue.Name = "cmbWriteValue";
this.cmbWriteValue.Size = new System.Drawing.Size(74, 24);
this.cmbWriteValue.TabIndex = 236;
......@@ -327,7 +359,7 @@
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label6.Location = new System.Drawing.Point(18, 148);
this.label6.Location = new System.Drawing.Point(21, 124);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(47, 17);
this.label6.TabIndex = 235;
......@@ -337,7 +369,7 @@
// btnWriteSingleDO
//
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(144, 194);
this.btnWriteSingleDO.Location = new System.Drawing.Point(173, 168);
this.btnWriteSingleDO.Name = "btnWriteSingleDO";
this.btnWriteSingleDO.Size = new System.Drawing.Size(102, 34);
this.btnWriteSingleDO.TabIndex = 232;
......@@ -352,9 +384,9 @@
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.Location = new System.Drawing.Point(19, 112);
this.cmbWriteIO.Location = new System.Drawing.Point(75, 86);
this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(268, 24);
this.cmbWriteIO.Size = new System.Drawing.Size(237, 24);
this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
......@@ -365,9 +397,9 @@
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(517, 7);
this.groupBox4.Location = new System.Drawing.Point(247, 8);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(184, 516);
this.groupBox4.Size = new System.Drawing.Size(229, 516);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -384,7 +416,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(173, 496);
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 496);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -392,9 +424,9 @@
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(326, 7);
this.groupBox3.Location = new System.Drawing.Point(12, 8);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(184, 516);
this.groupBox3.Size = new System.Drawing.Size(229, 516);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -411,50 +443,18 @@
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(173, 496);
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 496);
this.tableLayoutPanel1.TabIndex = 102;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.Location = new System.Drawing.Point(27, 463);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 254;
this.button1.Text = "关闭";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnCloseLed
//
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(144, 386);
this.btnCloseLed.Name = "btnCloseLed";
this.btnCloseLed.Size = new System.Drawing.Size(102, 34);
this.btnCloseLed.TabIndex = 256;
this.btnCloseLed.Text = "关闭照明";
this.btnCloseLed.UseVisualStyleBackColor = true;
this.btnCloseLed.Click += new System.EventHandler(this.btnCloseLed_Click);
//
// btnOpenLed
//
this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLed.Location = new System.Drawing.Point(27, 386);
this.btnOpenLed.Name = "btnOpenLed";
this.btnOpenLed.Size = new System.Drawing.Size(102, 34);
this.btnOpenLed.TabIndex = 255;
this.btnOpenLed.Text = "打开照明";
this.btnOpenLed.UseVisualStyleBackColor = true;
this.btnOpenLed.Click += new System.EventHandler(this.btnOpenLed_Click);
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(722, 534);
this.ClientSize = new System.Drawing.Size(829, 534);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.chbAutoRead);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmIOStatus";
......@@ -467,6 +467,7 @@
this.groupBox4.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
......
......@@ -85,14 +85,11 @@ namespace OnlineStore.ACSingleStore
cmbWriteIO.DataSource = new List<ConfigIO>(boxBean.Config.StoreDOList.Values);
cmbWriteIO.ValueMember = "ProName";
cmbWriteIO.DisplayMember = "DisplayStr";
cmbWriteValue.SelectedIndex = 0;
cmbWriteValue.SelectedIndex = 0;
}
private void timer1_Tick(object sender, EventArgs e)
{
{
ReadIOList();
}
......@@ -268,8 +265,7 @@ namespace OnlineStore.ACSingleStore
}
private void btnCloseAxisBreak_Click(object sender, EventArgs e)
{
{
boxBean.KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
}
......@@ -279,14 +275,12 @@ namespace OnlineStore.ACSingleStore
}
private void btnOpenLed_Click(object sender, EventArgs e)
{
{
boxBean.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
}
private void btnCloseLed_Click(object sender, EventArgs e)
{
{
boxBean.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
}
}
......
......@@ -751,9 +751,9 @@
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 558);
this.richTextBox1.Location = new System.Drawing.Point(7, 525);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(496, 196);
this.richTextBox1.Size = new System.Drawing.Size(496, 229);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
......@@ -1007,17 +1007,18 @@
this.groupBox2.Controls.Add(this.btnUpDownP4);
this.groupBox2.Location = new System.Drawing.Point(7, 124);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(496, 428);
this.groupBox2.Size = new System.Drawing.Size(496, 396);
this.groupBox2.TabIndex = 100;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "料仓操作";
this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
//
// lblTemp
//
this.lblTemp.AutoSize = true;
this.lblTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTemp.ForeColor = System.Drawing.Color.Black;
this.lblTemp.Location = new System.Drawing.Point(11, 393);
this.lblTemp.Location = new System.Drawing.Point(11, 356);
this.lblTemp.Name = "lblTemp";
this.lblTemp.Size = new System.Drawing.Size(159, 20);
this.lblTemp.TabIndex = 270;
......@@ -1026,7 +1027,7 @@
// btnClearLog
//
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(251, 384);
this.btnClearLog.Location = new System.Drawing.Point(251, 347);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 38);
this.btnClearLog.TabIndex = 224;
......@@ -1039,7 +1040,7 @@
this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.ForeColor = System.Drawing.Color.Green;
this.lblMsg.Location = new System.Drawing.Point(269, 67);
this.lblMsg.Location = new System.Drawing.Point(269, 64);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(135, 20);
this.lblMsg.TabIndex = 223;
......@@ -1048,7 +1049,7 @@
// btnSavePosition
//
this.btnSavePosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSavePosition.Location = new System.Drawing.Point(362, 384);
this.btnSavePosition.Location = new System.Drawing.Point(362, 347);
this.btnSavePosition.Name = "btnSavePosition";
this.btnSavePosition.Size = new System.Drawing.Size(105, 38);
this.btnSavePosition.TabIndex = 217;
......@@ -1059,7 +1060,7 @@
// btnStartAuTo
//
this.btnStartAuTo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartAuTo.Location = new System.Drawing.Point(158, 58);
this.btnStartAuTo.Location = new System.Drawing.Point(158, 55);
this.btnStartAuTo.Name = "btnStartAuTo";
this.btnStartAuTo.Size = new System.Drawing.Size(105, 38);
this.btnStartAuTo.TabIndex = 222;
......@@ -1071,7 +1072,7 @@
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(12, 69);
this.label9.Location = new System.Drawing.Point(12, 66);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(92, 17);
this.label9.TabIndex = 220;
......@@ -1079,7 +1080,7 @@
//
// txtJiange
//
this.txtJiange.Location = new System.Drawing.Point(107, 64);
this.txtJiange.Location = new System.Drawing.Point(107, 61);
this.txtJiange.Name = "txtJiange";
this.txtJiange.Size = new System.Drawing.Size(37, 26);
this.txtJiange.TabIndex = 221;
......@@ -1092,7 +1093,7 @@
this.txtComP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP1.Location = new System.Drawing.Point(153, 352);
this.txtComP1.Location = new System.Drawing.Point(153, 318);
this.txtComP1.MaxLength = 0;
this.txtComP1.Name = "txtComP1";
this.txtComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1107,7 +1108,7 @@
this.txtInOutP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP2.Location = new System.Drawing.Point(153, 317);
this.txtInOutP2.Location = new System.Drawing.Point(153, 287);
this.txtInOutP2.MaxLength = 0;
this.txtInOutP2.Name = "txtInOutP2";
this.txtInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1122,7 +1123,7 @@
this.txtInOutP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP1.Location = new System.Drawing.Point(153, 282);
this.txtInOutP1.Location = new System.Drawing.Point(153, 256);
this.txtInOutP1.MaxLength = 0;
this.txtInOutP1.Name = "txtInOutP1";
this.txtInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1137,7 +1138,7 @@
this.txtMiddleP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtMiddleP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtMiddleP1.Location = new System.Drawing.Point(153, 247);
this.txtMiddleP1.Location = new System.Drawing.Point(153, 225);
this.txtMiddleP1.MaxLength = 0;
this.txtMiddleP1.Name = "txtMiddleP1";
this.txtMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1152,7 +1153,7 @@
this.txtUpDownP7.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP7.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP7.Location = new System.Drawing.Point(153, 177);
this.txtUpDownP7.Location = new System.Drawing.Point(153, 163);
this.txtUpDownP7.MaxLength = 0;
this.txtUpDownP7.Name = "txtUpDownP7";
this.txtUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1167,7 +1168,7 @@
this.txtUpDownP8.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP8.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP8.Location = new System.Drawing.Point(153, 212);
this.txtUpDownP8.Location = new System.Drawing.Point(153, 194);
this.txtUpDownP8.MaxLength = 0;
this.txtUpDownP8.Name = "txtUpDownP8";
this.txtUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1182,7 +1183,7 @@
this.txtUpDownP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP1.Location = new System.Drawing.Point(153, 107);
this.txtUpDownP1.Location = new System.Drawing.Point(153, 101);
this.txtUpDownP1.MaxLength = 0;
this.txtUpDownP1.Name = "txtUpDownP1";
this.txtUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1197,7 +1198,7 @@
this.txtUpDownP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP2.Location = new System.Drawing.Point(153, 142);
this.txtUpDownP2.Location = new System.Drawing.Point(153, 132);
this.txtUpDownP2.MaxLength = 0;
this.txtUpDownP2.Name = "txtUpDownP2";
this.txtUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1212,7 +1213,7 @@
this.txtComP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP3.Location = new System.Drawing.Point(395, 352);
this.txtComP3.Location = new System.Drawing.Point(395, 318);
this.txtComP3.MaxLength = 0;
this.txtComP3.Name = "txtComP3";
this.txtComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1227,7 +1228,7 @@
this.txtComP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtComP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtComP2.Location = new System.Drawing.Point(395, 317);
this.txtComP2.Location = new System.Drawing.Point(395, 287);
this.txtComP2.MaxLength = 0;
this.txtComP2.Name = "txtComP2";
this.txtComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1242,7 +1243,7 @@
this.txtInOutP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP3.Location = new System.Drawing.Point(395, 282);
this.txtInOutP3.Location = new System.Drawing.Point(395, 256);
this.txtInOutP3.MaxLength = 0;
this.txtInOutP3.Name = "txtInOutP3";
this.txtInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1257,7 +1258,7 @@
this.txtMiddleP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtMiddleP2.Location = new System.Drawing.Point(395, 247);
this.txtMiddleP2.Location = new System.Drawing.Point(395, 225);
this.txtMiddleP2.MaxLength = 0;
this.txtMiddleP2.Name = "txtMiddleP2";
this.txtMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1272,7 +1273,7 @@
this.txtUpDownP5.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP5.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP5.Location = new System.Drawing.Point(395, 177);
this.txtUpDownP5.Location = new System.Drawing.Point(395, 163);
this.txtUpDownP5.MaxLength = 0;
this.txtUpDownP5.Name = "txtUpDownP5";
this.txtUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1287,7 +1288,7 @@
this.txtUpDownP6.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP6.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP6.Location = new System.Drawing.Point(395, 212);
this.txtUpDownP6.Location = new System.Drawing.Point(395, 194);
this.txtUpDownP6.MaxLength = 0;
this.txtUpDownP6.Name = "txtUpDownP6";
this.txtUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1330,7 +1331,7 @@
this.txtUpDownP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP3.Location = new System.Drawing.Point(395, 107);
this.txtUpDownP3.Location = new System.Drawing.Point(395, 101);
this.txtUpDownP3.MaxLength = 0;
this.txtUpDownP3.Name = "txtUpDownP3";
this.txtUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1367,7 +1368,7 @@
this.txtUpDownP4.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP4.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP4.Location = new System.Drawing.Point(395, 142);
this.txtUpDownP4.Location = new System.Drawing.Point(395, 132);
this.txtUpDownP4.MaxLength = 0;
this.txtUpDownP4.Name = "txtUpDownP4";
this.txtUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -1383,7 +1384,7 @@
this.btnComP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP1.ForeColor = System.Drawing.Color.Purple;
this.btnComP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnComP1.Location = new System.Drawing.Point(10, 350);
this.btnComP1.Location = new System.Drawing.Point(10, 316);
this.btnComP1.Name = "btnComP1";
this.btnComP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP1.Size = new System.Drawing.Size(140, 27);
......@@ -1401,7 +1402,7 @@
this.btnInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP2.ForeColor = System.Drawing.Color.Green;
this.btnInOutP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP2.Location = new System.Drawing.Point(10, 315);
this.btnInOutP2.Location = new System.Drawing.Point(10, 285);
this.btnInOutP2.Name = "btnInOutP2";
this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP2.Size = new System.Drawing.Size(140, 27);
......@@ -1419,7 +1420,7 @@
this.btnInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP1.ForeColor = System.Drawing.Color.Green;
this.btnInOutP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP1.Location = new System.Drawing.Point(10, 280);
this.btnInOutP1.Location = new System.Drawing.Point(10, 254);
this.btnInOutP1.Name = "btnInOutP1";
this.btnInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP1.Size = new System.Drawing.Size(140, 27);
......@@ -1437,7 +1438,7 @@
this.btnMiddleP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.btnMiddleP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnMiddleP1.Location = new System.Drawing.Point(10, 245);
this.btnMiddleP1.Location = new System.Drawing.Point(10, 223);
this.btnMiddleP1.Name = "btnMiddleP1";
this.btnMiddleP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP1.Size = new System.Drawing.Size(140, 27);
......@@ -1455,7 +1456,7 @@
this.btnUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP7.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP7.Location = new System.Drawing.Point(10, 175);
this.btnUpDownP7.Location = new System.Drawing.Point(10, 161);
this.btnUpDownP7.Name = "btnUpDownP7";
this.btnUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP7.Size = new System.Drawing.Size(140, 27);
......@@ -1473,7 +1474,7 @@
this.btnUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP8.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP8.Location = new System.Drawing.Point(10, 210);
this.btnUpDownP8.Location = new System.Drawing.Point(10, 192);
this.btnUpDownP8.Name = "btnUpDownP8";
this.btnUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP8.Size = new System.Drawing.Size(140, 27);
......@@ -1491,7 +1492,7 @@
this.btnUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP1.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP1.Location = new System.Drawing.Point(10, 105);
this.btnUpDownP1.Location = new System.Drawing.Point(10, 99);
this.btnUpDownP1.Name = "btnUpDownP1";
this.btnUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP1.Size = new System.Drawing.Size(140, 27);
......@@ -1509,7 +1510,7 @@
this.btnUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP2.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP2.Location = new System.Drawing.Point(10, 140);
this.btnUpDownP2.Location = new System.Drawing.Point(10, 130);
this.btnUpDownP2.Name = "btnUpDownP2";
this.btnUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP2.Size = new System.Drawing.Size(140, 27);
......@@ -1526,7 +1527,7 @@
this.btnComP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnComP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP3.ForeColor = System.Drawing.Color.Purple;
this.btnComP3.Location = new System.Drawing.Point(251, 350);
this.btnComP3.Location = new System.Drawing.Point(251, 316);
this.btnComP3.Name = "btnComP3";
this.btnComP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP3.Size = new System.Drawing.Size(140, 27);
......@@ -1543,7 +1544,7 @@
this.btnComP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnComP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComP2.ForeColor = System.Drawing.Color.Purple;
this.btnComP2.Location = new System.Drawing.Point(251, 315);
this.btnComP2.Location = new System.Drawing.Point(251, 285);
this.btnComP2.Name = "btnComP2";
this.btnComP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnComP2.Size = new System.Drawing.Size(140, 27);
......@@ -1560,7 +1561,7 @@
this.btnInOutP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP3.ForeColor = System.Drawing.Color.Green;
this.btnInOutP3.Location = new System.Drawing.Point(251, 280);
this.btnInOutP3.Location = new System.Drawing.Point(251, 254);
this.btnInOutP3.Name = "btnInOutP3";
this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP3.Size = new System.Drawing.Size(140, 27);
......@@ -1577,7 +1578,7 @@
this.btnMiddleP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.btnMiddleP2.Location = new System.Drawing.Point(251, 245);
this.btnMiddleP2.Location = new System.Drawing.Point(251, 223);
this.btnMiddleP2.Name = "btnMiddleP2";
this.btnMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMiddleP2.Size = new System.Drawing.Size(140, 27);
......@@ -1594,7 +1595,7 @@
this.btnUpDownP5.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP5.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP5.Location = new System.Drawing.Point(251, 175);
this.btnUpDownP5.Location = new System.Drawing.Point(251, 161);
this.btnUpDownP5.Name = "btnUpDownP5";
this.btnUpDownP5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP5.Size = new System.Drawing.Size(140, 27);
......@@ -1611,7 +1612,7 @@
this.btnUpDownP6.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP6.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP6.Location = new System.Drawing.Point(251, 210);
this.btnUpDownP6.Location = new System.Drawing.Point(251, 192);
this.btnUpDownP6.Name = "btnUpDownP6";
this.btnUpDownP6.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP6.Size = new System.Drawing.Size(140, 27);
......@@ -1628,7 +1629,7 @@
this.btnUpDownP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP3.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP3.Location = new System.Drawing.Point(251, 105);
this.btnUpDownP3.Location = new System.Drawing.Point(251, 99);
this.btnUpDownP3.Name = "btnUpDownP3";
this.btnUpDownP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP3.Size = new System.Drawing.Size(140, 27);
......@@ -1645,7 +1646,7 @@
this.btnUpDownP4.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP4.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP4.Location = new System.Drawing.Point(251, 140);
this.btnUpDownP4.Location = new System.Drawing.Point(251, 130);
this.btnUpDownP4.Name = "btnUpDownP4";
this.btnUpDownP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP4.Size = new System.Drawing.Size(140, 27);
......@@ -1760,55 +1761,55 @@
// 查看IOToolStripMenuItem
//
this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem";
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.查看IOToolStripMenuItem.Text = "查看IO";
this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(172, 6);
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6);
//
// 料仓运转ONToolStripMenuItem
//
this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem";
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON";
this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(172, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
//
// 料仓运转OFFToolStripMenuItem
//
this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem";
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF";
this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(172, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// 打开舱门ToolStripMenuItem
//
this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem";
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.打开舱门ToolStripMenuItem.Text = "打开仓门";
this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(172, 6);
this.toolStripSeparator8.Size = new System.Drawing.Size(177, 6);
//
// 关闭仓门ToolStripMenuItem
//
this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem";
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.关闭仓门ToolStripMenuItem.Text = "关闭仓门";
this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click);
//
......
......@@ -1300,6 +1300,10 @@ namespace OnlineStore.ACSingleStore
btnStatusSearch.Enabled = isOpen;
// Bt_ClearCounter.Enabled = isOpen;
}
private void groupBox2_Enter(object sender, EventArgs e)
{
}
}
}
......@@ -34,7 +34,6 @@ DO,相机照明开,CameraLight_Power,110,192.168.200.10,0,相机照明开,Y11,DO-11,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.11,,,,,,,
,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,,
,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,,
,扫码枪端口号,Scanner_Port,51236,,,,,,,
......@@ -117,3 +116,9 @@ PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,,
,,,,,,,,, ,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.11,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,1,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,1,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,1,,,,,,,
,,,,,,,,, ,
......@@ -77,8 +77,11 @@ namespace OnlineStore.DeviceLibrary
{
if (position.StoreId.Equals(StoreID))
{
CheckPositionLimit(position);
PositionNumList.Add(position.PositionNum);
bool result = ACStorePosition.CheckPosition(position, Config);
if (result)
{
PositionNumList.Add(position.PositionNum);
}
}
}
......@@ -92,11 +95,11 @@ namespace OnlineStore.DeviceLibrary
KNDAIManager.ConnectionIP(Config.AIDevice_IP);
//scanSocket.OnScanRevice += onCodeReceived;
timersTimer.Enabled = false;
mainTimer.Enabled = false;
int isAuto = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
if (isAuto == 1)
{
timersTimer.Enabled = true;
mainTimer.Enabled = true;
}
Thread.Sleep(300);
......@@ -123,117 +126,20 @@ namespace OnlineStore.DeviceLibrary
Alarm(StoreAlarmType.SuddenStop, "1", WarnMsg, StoreMoveType.None);
}
}
}
}
private void CheckPositionLimit(ACStorePosition position)
{
try
{
if (Config.Middle_Axis.PositionIsHasLimit())
{
int mMin = Config.Middle_Axis.PositionMin;
int mMax = Config.Middle_Axis.PositionMax;
if (mMin > position.MiddleAxis_Position_P2 || mMax < position.MiddleAxis_Position_P2)
{
LogUtil.error(position.PositionNum + " MiddleAxis_Position_P2位置超出" + Config.Middle_Axis.Explain + "上下限(" + mMin + "-" + mMax + ")");
return;
}
}
if (Config.InOut_Axis.PositionIsHasLimit())
{
int iMin = Config.InOut_Axis.PositionMin;
int iMax = Config.InOut_Axis.PositionMax;
if (iMin > position.InOutAxis_DoorPosition_P2 || iMax < position.InOutAxis_DoorPosition_P2)
{
LogUtil.error(position.PositionNum + " InOutAxis_DoorPosition_P2位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return;
}
if (iMin > position.InOutAxis_Position_P3 || iMax < position.InOutAxis_Position_P3)
{
LogUtil.error(position.PositionNum + " InOutAxis_Position_P3位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return;
}
}
if (Config.UpDown_Axis.PositionIsHasLimit())
{
int uMin = Config.UpDown_Axis.PositionMin;
int uMax = Config.UpDown_Axis.PositionMax;
if (uMin > position.UpDownAxis_IHPosition_P3 || uMax < position.UpDownAxis_IHPosition_P3)
{
LogUtil.error(position.PositionNum + " UpDownAxis_IHPosition_P3位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return;
}
if (uMin > position.UpDownAxis_ILPosition_P4 || uMax < position.UpDownAxis_ILPosition_P4)
{
LogUtil.error(position.PositionNum + " UpDownAxis_ILPosition_P4位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return;
}
if (uMin > position.UpDownAxis_OHPosition_P5 || uMax < position.UpDownAxis_OHPosition_P5)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OHPosition_P5位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return;
}
if (uMin > position.UpDownAxis_OLPosition_P6 || uMax < position.UpDownAxis_OLPosition_P6)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OLPosition_P6位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return;
}
else
{
//光栅处理
SafetyLightProcess();
}
}
catch (Exception ex)
{
LogUtil.error("验证" + position.PositionNum+"的位置范围出错:"+ex.ToString());
}
}
}
/// <summary>
/// 配置速度,加减速时间
/// </summary>
public void MoveAxisConfig()
{
Config.Middle_Axis.TargetSpeed = Config.MiddleAxis_TargetSpeed;
Config.Middle_Axis.AddSpeed = Config.MiddleAxis_AddSpeed;
Config.Middle_Axis.DelSpeed = Config.MiddleAxis_DelSpeed;
Config.Middle_Axis.HomeAddSpeed = Config.MiddleAxis_HomeAddSpeed;
Config.Middle_Axis.HomeHighSpeed = Config.MiddleAxis_HomeHighSpeed;
Config.Middle_Axis.HomeLowSpeed = Config.MiddleAxis_HomeLowSpeed;
Config.InOut_Axis.TargetSpeed = Config.InoutAxis_TargetSpeed;
Config.InOut_Axis.DelSpeed = Config.InoutAxis_AddSpeed;
Config.InOut_Axis.AddSpeed = Config.InoutAxis_DelSpeed;
Config.InOut_Axis.HomeAddSpeed = Config.InoutAxis_HomeAddSpeed;
Config.InOut_Axis.HomeHighSpeed = Config.InoutAxis_HomeHighSpeed;
Config.InOut_Axis.HomeLowSpeed = Config.InoutAxis_HomeLowSpeed;
Config.UpDown_Axis.TargetSpeed = Config.UpdownAxis_TargetSpeed;
Config.UpDown_Axis.AddSpeed = Config.UpdownAxis_AddSpeed;
Config.UpDown_Axis.DelSpeed = Config.UpdownAxis_DelSpeed;
Config.UpDown_Axis.HomeAddSpeed = Config.UpdownAxis_HomeAddSpeed;
Config.UpDown_Axis.HomeHighSpeed = Config.UpdownAxis_HomeHighSpeed;
Config.UpDown_Axis.HomeLowSpeed = Config.UpdownAxis_HomeLowSpeed;
Config.Middle_Axis.CanErrorCountMin = Config.MiddleAxis_ErrorCountMin;
Config.InOut_Axis.CanErrorCountMin = Config.InoutAxis_ErrorCountMin;
Config.UpDown_Axis.CanErrorCountMin = Config.UpdownAxis_ErrorCountMin;
Config.Middle_Axis.CanErrorCountMax = Config.MiddleAxis_ErrorCountMax;
Config.InOut_Axis.CanErrorCountMax = Config.InoutAxis_ErrorCountMax;
Config.UpDown_Axis.CanErrorCountMax = Config.UpdownAxis_ErrorCountMax;
Config.Middle_Axis.PositionMin = Config.MiddleAxis_PositionMin;
Config.Middle_Axis.PositionMax = Config.MiddleAxis_PositionMax;
Config.InOut_Axis.PositionMin = Config.InoutAxis_PositionMin;
Config.InOut_Axis.PositionMax = Config.InoutAxis_PositionMax;
Config.UpDown_Axis.PositionMin = Config.UpdownAxis_PositionMin;
Config.UpDown_Axis.PositionMax = Config.UpdownAxis_PositionMax;
//Config.InOut_Axis.ResolveSpeed = Config.InoutAxis_ResolveSpeed;
//Config.UpDown_Axis.ResolveSpeed = Config.UpdownAxis_ResolveSpeed;
//Config.Middle_Axis.ResolveSpeed = Config.MiddleAxis_ResolveSpeed;
Config.Middle_Axis.DefaultPosition = Config.MiddleAxis_P1_Position;
Config.InOut_Axis.DefaultPosition = Config.InOutAxis_P1_Position;
Config.UpDown_Axis.DefaultPosition = Config.UpDownAxis_DoorOPosition_P1;
{
AC_SA_Config.ConfigAxis( Config);
moveAxisList = new List<ConfigMoveAxis>();
moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis);
......@@ -261,7 +167,7 @@ namespace OnlineStore.DeviceLibrary
}
}
autoNext = false;
timersTimer.Enabled = false;
mainTimer.Enabled = false;
alarmType = StoreAlarmType.None;
//急停按钮和气压检测需要一起判断
......@@ -289,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
});
ReturnHome();
StartTime = DateTime.Now;
timersTimer.Enabled = true;
mainTimer.Enabled = true;
IoCheckTimer.Enabled = true;
serverConnectTimer.Enabled = true;
IsRun = true;
......@@ -748,7 +654,7 @@ namespace OnlineStore.DeviceLibrary
StopMove();
storeRunStatus = StoreRunStatus.Wait;
timersTimer.Enabled = false;
mainTimer.Enabled = false;
CloseAllAxis();
TimeSpan span = DateTime.Now - StartTime;
IsRun = false;
......@@ -925,7 +831,7 @@ namespace OnlineStore.DeviceLibrary
int isAuto = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
if (isAuto == 1)
{
timersTimer.Enabled = true;
mainTimer.Enabled = true;
}
}
}
......@@ -986,6 +892,35 @@ namespace OnlineStore.DeviceLibrary
}
}
private int NeedCheckSafetyLight = 0;
/// <summary>
/// 光栅处理
/// </summary>
private void SafetyLightProcess()
{
//遮挡光栅信号
if (KNDIOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore)&&StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
{
if (NeedCheckSafetyLight.Equals(1))
{
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
NeedCheckSafetyLight = 2;
}
}
}
else
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
{
if (NeedCheckSafetyLight.Equals(2))
{
SO_10_DeviceToDoorPro();
}
}
}
}
public void TimerProcess()
{
try
......@@ -994,14 +929,10 @@ namespace OnlineStore.DeviceLibrary
if (StoreMove.MoveType != StoreMoveType.None)
{
BusyMoveProcess();
}
else if (storeRunStatus.Equals(StoreRunStatus.Runing))
{
//if (scanSocket.isScannerRun.Equals(false))
//{
// scanSocket.ConnectScanner(Config.Scanner_Ip,Config.Scanner_Port);
//}
{
//判断是否需要出入库
if (StoreMove.MoveType.Equals(StoreMoveType.None)&&alarmType.Equals(StoreAlarmType.None))
{
......@@ -1542,7 +1473,6 @@ namespace OnlineStore.DeviceLibrary
private bool isInProcess = false;
public void server_connect_timer_Tick(object sender, EventArgs e)
{
if (isInProcess)
{
return;
......
......@@ -105,150 +105,105 @@ namespace OnlineStore.DeviceLibrary
List<WaitResultInfo> list = StoreMove.WaitList;
//当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - StoreMove.LastSetpTime;
if (span.TotalMinutes > 5)
string NotOkMsg = "";
if (list.Count <= 0)
{
WarnMsg = StoreName + "等待超时【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】已等待【" + Math.Round(span.TotalMinutes) + "】分钟,";
foreach (WaitResultInfo wait in list)
{
WarnMsg = WarnMsg + "\r\n" + wait.ToStr();
}
LogUtil.error(LOGGER, WarnMsg, 12);
Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType);
StoreMove.EndStepWait();
return;
}
if (list.Count > 0)
bool isOk = true;
foreach (WaitResultInfo wait in list)
{
bool isOk = true;
foreach (WaitResultInfo wait in list)
if (wait.IsEnd)
{
if (wait.WaitType == 1)
{
string msg = "";
if (wait.IsHomeMove)
{
if (wait.IsEnd.Equals(false) && (!ACHomeMoveIsEnd(wait.AxisInfo, out msg)))
{
if (!msg.Equals(""))
{
WarnMsg = msg;
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
}
isOk = false;
break;
}
else
{
wait.IsEnd = true;
}
}
else
{
if (!wait.IsEnd)
{
bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!msg.Equals(""))
{
isOk = false;
WarnMsg = msg;
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
break;
}
else if (!isEnd)
{
isOk = false;
break;
}
else
{
wait.IsEnd = true;
}
}
else
{
}
}
}
else if (wait.WaitType == 2)
{
if (!KNDIOValue(wait.IoType).Equals(wait.IoValue))
{
//一分钟还未检测到
if (span.TotalMilliseconds > Config.IOSingle_TimerOut)
{
ConfigIO io = Config.getWaitIO(wait.IoType);
WarnMsg = StoreName + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
//SendAlarmCode(StoreID, LineAlarm.IoNotOk, wait.IoType);
Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
}
isOk = false;
if (StoreMove.OneWaitCanEndStep.Equals(false))
{
break;
}
}
else if (StoreMove.OneWaitCanEndStep)
{
isOk = true;
break;
}
}
else if (wait.WaitType == 3)
{
if (span.TotalMilliseconds < wait.TimeMSeconds)
{
isOk = false;
if (StoreMove.OneWaitCanEndStep.Equals(false))
{
break;
}
}
else if (StoreMove.OneWaitCanEndStep)
{
isOk = true;
break;
}
}
else if (wait.WaitType == 5)
{
if (wait.IsHomeMove)
{
if (!ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime))
{
ShuoKeControls.GetStatus(wait.SlvAddr);
isOk = false;
break;
}
else if (StoreMove.OneWaitCanEndStep)
{
isOk = true; break;
}
}
else
{
if (!ShuoKeControls.IsMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime))
{
ShuoKeControls.GetStatus(wait.SlvAddr);
isOk = false;
break;
}
else if (StoreMove.OneWaitCanEndStep)
{
isOk = true; break;
}
}
}
continue;
}
NotOkMsg = wait.ToStr();
if (wait.WaitType == 1)
{
string msg = "";
if (wait.IsHomeMove)
{
wait.IsEnd = ACHomeMoveIsEnd(wait.AxisInfo, out msg);
}
else
{
wait.IsEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
}
if (!msg.Equals(""))
{
isOk = false;
WarnMsg = msg;
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
break;
}
}
else if (wait.WaitType == 2)
{
wait.IsEnd = KNDIOValue(wait.IoType).Equals(wait.IoValue);
if ((!wait.IsEnd) && span.TotalMilliseconds > Config.IOSingle_TimerOut)
{
ConfigIO io = Config.getWaitIO(wait.IoType);
WarnMsg = StoreName + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
isOk = false;
break;
}
}
else if (wait.WaitType == 3)
{
wait.IsEnd = span.TotalMilliseconds >= wait.TimeMSeconds;
}
if (isOk)
else if (wait.WaitType == 5)
{
StoreMove.EndStepWait();
if (wait.IsHomeMove)
{
wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime);
}
else
{
wait.IsEnd = ShuoKeControls.IsMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime);
}
if (!wait.IsEnd)
{
ShuoKeControls.GetStatus(wait.SlvAddr);
}
}
if (wait.IsEnd && StoreMove.OneWaitCanEndStep)
{
isOk = true;
break;
}
else if (wait.IsEnd.Equals(false) && StoreMove.OneWaitCanEndStep.Equals(false))
{
isOk = false;
break;
}
}
else
if (isOk)
{
StoreMove.EndStepWait();
}
else if (span.TotalSeconds > StoreMove.TimeOutSeconds)
{
if (NotOkMsg.Equals(""))
{
WarnMsg = StoreName + "等待超时【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】已等待【" + Math.Round(span.TotalSeconds) + "】秒";
foreach (WaitResultInfo wait in list)
{
WarnMsg = WarnMsg + "\r\n" + wait.ToStr();
}
LogUtil.error(LOGGER, WarnMsg, 12);
}
else
{
WarnMsg = StoreName + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg
+ "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(LOGGER, WarnMsg);
}
Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType);
}
}
#endregion
......@@ -304,9 +259,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus);
}
}
}
/// <summary>
/// 开始入库移动移动
......@@ -657,9 +610,7 @@ namespace OnlineStore.DeviceLibrary
{
if (IsHasCompress_Axis|| Config.IsHasLocationCylinder.Equals(0))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
SO_10_DeviceToDoorPro();
}
else
{
......@@ -671,9 +622,11 @@ namespace OnlineStore.DeviceLibrary
//此处需要等待移栽没有工作,才能把盘放入出料口
else if (StoreMove.MoveStep == StoreMoveStep.SO_09_LocationCylinder_Down)
{
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
SO_10_DeviceToDoorPro();
//OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
//StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_10_DeviceToDoor)
{
......@@ -724,6 +677,14 @@ namespace OnlineStore.DeviceLibrary
}
}
private void SO_10_DeviceToDoorPro()
{
LineMoveP moveP = StoreMove.MoveParam.MoveP;
StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
NeedCheckSafetyLight = 1;
}
public bool LoacationIsDown()
{
if (KNDIOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
......
......@@ -43,7 +43,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 定时器
/// </summary>
protected System.Timers.Timer timersTimer;
protected System.Timers.Timer mainTimer;
private bool isInit = false;
/// <summary>
......@@ -55,11 +55,11 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove = new StoreMoveInfo(StoreID);
timersTimer = new System.Timers.Timer();
timersTimer.Enabled = false;
timersTimer.Interval = 300;
timersTimer.Elapsed += timersTimer_Elapsed;
timersTimer.AutoReset = true;
mainTimer = new System.Timers.Timer();
mainTimer.Enabled = false;
mainTimer.Interval = 300;
mainTimer.Elapsed += timersTimer_Elapsed;
mainTimer.AutoReset = true;
isInit = true;
}
}
......
......@@ -292,6 +292,7 @@ namespace OnlineStore.DeviceLibrary
//LogUtil.error(LOGGER, StoreName + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "目标位置[" + targetPosition + "]重新开始运动");
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
StoreMove.CanWhileCount--;
return false;
}
else
{
......
......@@ -14,6 +14,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public class StoreMoveInfo
{
/// <summary>
/// 超时时间
/// </summary>
public int TimeOutSeconds = 300;
public StoreMoveInfo(int storeId)
{
moveType = StoreMoveType.None;
......@@ -333,13 +337,13 @@ namespace OnlineStore.DeviceLibrary
/// 重置
/// </summary>
StoreReset = 4,
/// <summary>
/// 移栽装置的停止,需要先远点返回,然后停止
/// </summary>
StopMove=5,
/// <summary>
/// 移栽检测托盘
/// </summary>
CheckFixture=6,
///// <summary>
///// 移栽装置的停止,需要先远点返回,然后停止
///// </summary>
//StopMove=5,
///// <summary>
///// 移栽检测托盘
///// </summary>
//CheckFixture=6,
}
}
......@@ -61,6 +61,12 @@
<Compile Include="storeConfig\config\StoreConfig.cs" />
<Compile Include="position\StorePostionBase.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
using System;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -65,6 +66,69 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[CSVAttribute("进出轴进料口取料点P2")]
public int InOutAxis_DoorPosition_P2 { get; set; }
public static bool CheckPosition(ACStorePosition position, AC_SA_Config Config)
{
try
{
if (Config.Middle_Axis.PositionIsHasLimit())
{
int mMin = Config.Middle_Axis.PositionMin;
int mMax = Config.Middle_Axis.PositionMax;
if (mMin > position.MiddleAxis_Position_P2 || mMax < position.MiddleAxis_Position_P2)
{
LogUtil.error(position.PositionNum + " MiddleAxis_Position_P2位置超出" + Config.Middle_Axis.Explain + "上下限(" + mMin + "-" + mMax + ")");
return false;
}
}
if (Config.InOut_Axis.PositionIsHasLimit())
{
int iMin = Config.InOut_Axis.PositionMin;
int iMax = Config.InOut_Axis.PositionMax;
if (iMin > position.InOutAxis_DoorPosition_P2 || iMax < position.InOutAxis_DoorPosition_P2)
{
LogUtil.error(position.PositionNum + " InOutAxis_DoorPosition_P2位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
}
if (iMin > position.InOutAxis_Position_P3 || iMax < position.InOutAxis_Position_P3)
{
LogUtil.error(position.PositionNum + " InOutAxis_Position_P3位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
}
}
if (Config.UpDown_Axis.PositionIsHasLimit())
{
int uMin = Config.UpDown_Axis.PositionMin;
int uMax = Config.UpDown_Axis.PositionMax;
if (uMin > position.UpDownAxis_IHPosition_P3 || uMax < position.UpDownAxis_IHPosition_P3)
{
LogUtil.error(position.PositionNum + " UpDownAxis_IHPosition_P3位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_ILPosition_P4 || uMax < position.UpDownAxis_ILPosition_P4)
{
LogUtil.error(position.PositionNum + " UpDownAxis_ILPosition_P4位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_OHPosition_P5 || uMax < position.UpDownAxis_OHPosition_P5)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OHPosition_P5位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_OLPosition_P6 || uMax < position.UpDownAxis_OLPosition_P6)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OLPosition_P6位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
}
}
catch (Exception ex)
{
LogUtil.error("验证" + position.PositionNum + "的位置范围出错:" + ex.ToString());
}
return true;
}
///// <summary>
///// 升降轴进料口出料前点P2
///// </summary>
......
......@@ -140,6 +140,8 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("UpdownAxis_HomeLowSpeed")]
public short UpdownAxis_HomeLowSpeed { get; set; }
/// <summary>
/// PRO (轴二)升降轴轴原点高速 UpdownAxis_HomeHighSpeed 100
/// </summary>
......@@ -489,6 +491,22 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("AIDevice_IP", true)]
public string AIDevice_IP { get; set; }
/// <summary>
/// PRO,模拟信号1默认高度,AIDI1_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI1_DefaultPosition", true)]
public string AIDI1_DefaultPosition { get; set; }
/// <summary>
/// PRO,模拟信号2默认高度,AIDI2_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI2_DefaultPosition", true)]
public string AIDI2_DefaultPosition { get; set; }
/// <summary>
/// PRO,模拟信号3默认高度,AIDI3_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI3_DefaultPosition", true)]
public string AIDI3_DefaultPosition { get; set; }
//private List<string> TempAddrList = null;
//public static char TempAddrSpilt = '#';
///// <summary>
......@@ -553,5 +571,51 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList.Add(IO_Type.CameraLight_Power);
}
public static void ConfigAxis(AC_SA_Config Config)
{
Config.Middle_Axis.TargetSpeed = Config.MiddleAxis_TargetSpeed;
Config.Middle_Axis.AddSpeed = Config.MiddleAxis_AddSpeed;
Config.Middle_Axis.DelSpeed = Config.MiddleAxis_DelSpeed;
Config.Middle_Axis.HomeAddSpeed = Config.MiddleAxis_HomeAddSpeed;
Config.Middle_Axis.HomeHighSpeed = Config.MiddleAxis_HomeHighSpeed;
Config.Middle_Axis.HomeLowSpeed = Config.MiddleAxis_HomeLowSpeed;
Config.InOut_Axis.TargetSpeed = Config.InoutAxis_TargetSpeed;
Config.InOut_Axis.DelSpeed = Config.InoutAxis_AddSpeed;
Config.InOut_Axis.AddSpeed = Config.InoutAxis_DelSpeed;
Config.InOut_Axis.HomeAddSpeed = Config.InoutAxis_HomeAddSpeed;
Config.InOut_Axis.HomeHighSpeed = Config.InoutAxis_HomeHighSpeed;
Config.InOut_Axis.HomeLowSpeed = Config.InoutAxis_HomeLowSpeed;
Config.UpDown_Axis.TargetSpeed = Config.UpdownAxis_TargetSpeed;
Config.UpDown_Axis.AddSpeed = Config.UpdownAxis_AddSpeed;
Config.UpDown_Axis.DelSpeed = Config.UpdownAxis_DelSpeed;
Config.UpDown_Axis.HomeAddSpeed = Config.UpdownAxis_HomeAddSpeed;
Config.UpDown_Axis.HomeHighSpeed = Config.UpdownAxis_HomeHighSpeed;
Config.UpDown_Axis.HomeLowSpeed = Config.UpdownAxis_HomeLowSpeed;
Config.Middle_Axis.CanErrorCountMin = Config.MiddleAxis_ErrorCountMin;
Config.InOut_Axis.CanErrorCountMin = Config.InoutAxis_ErrorCountMin;
Config.UpDown_Axis.CanErrorCountMin = Config.UpdownAxis_ErrorCountMin;
Config.Middle_Axis.CanErrorCountMax = Config.MiddleAxis_ErrorCountMax;
Config.InOut_Axis.CanErrorCountMax = Config.InoutAxis_ErrorCountMax;
Config.UpDown_Axis.CanErrorCountMax = Config.UpdownAxis_ErrorCountMax;
Config.Middle_Axis.PositionMin = Config.MiddleAxis_PositionMin;
Config.Middle_Axis.PositionMax = Config.MiddleAxis_PositionMax;
Config.InOut_Axis.PositionMin = Config.InoutAxis_PositionMin;
Config.InOut_Axis.PositionMax = Config.InoutAxis_PositionMax;
Config.UpDown_Axis.PositionMin = Config.UpdownAxis_PositionMin;
Config.UpDown_Axis.PositionMax = Config.UpdownAxis_PositionMax;
//Config.InOut_Axis.ResolveSpeed = Config.InoutAxis_ResolveSpeed;
//Config.UpDown_Axis.ResolveSpeed = Config.UpdownAxis_ResolveSpeed;
//Config.Middle_Axis.ResolveSpeed = Config.MiddleAxis_ResolveSpeed;
Config.Middle_Axis.DefaultPosition = Config.MiddleAxis_P1_Position;
Config.InOut_Axis.DefaultPosition = Config.InOutAxis_P1_Position;
Config.UpDown_Axis.DefaultPosition = Config.UpDownAxis_DoorOPosition_P1;
}
}
}
......@@ -44,12 +44,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AxisShowControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="AxisShowControl.Designer.cs">
<DependentUpon>AxisShowControl.cs</DependentUpon>
</Compile>
<Compile Include="ImageManager.cs" />
<Compile Include="IOStatusControl.cs">
<SubType>UserControl</SubType>
......@@ -57,24 +51,12 @@
<Compile Include="IOStatusControl.Designer.cs">
<DependentUpon>IOStatusControl.cs</DependentUpon>
</Compile>
<Compile Include="ModbusStatusControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ModbusStatusControl.Designer.cs">
<DependentUpon>ModbusStatusControl.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="AxisShowSControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="AxisShowSControl.Designer.cs">
<DependentUpon>AxisShowSControl.cs</DependentUpon>
</Compile>
<Compile Include="IOTextControl.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -84,22 +66,13 @@
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AxisShowControl.resx">
<DependentUpon>AxisShowControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOStatusControl.resx">
<DependentUpon>IOStatusControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ModbusStatusControl.resx">
<DependentUpon>ModbusStatusControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="AxisShowSControl.resx">
<DependentUpon>AxisShowSControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOTextControl.resx">
<DependentUpon>IOTextControl.cs</DependentUpon>
</EmbeddedResource>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!