src/Bro.Common.Model/Model/MotionCardRelated.cs
@@ -227,6 +227,11 @@ /// </summary> public double PrfVelocity { get; set; } /// <summary> /// 轴状态 /// </summary> public int AxisStatus { get; set; } public string GetDisplayText() { return $"轴{AxisIndex}:{AxisName}-当前:{CurPosition}-规划:{Destination}"; src/Bro.Device.GTSCard/GTSCardDriver.cs
@@ -552,7 +552,7 @@ repeatTime = 1000; do { isStop = IsStop((short)IConfig.CardNum, (short)optionPara.AxisIndex); isStop = IsStop((short)optionPara.AxisIndex); Thread.Sleep(50); repeatTime--; } while (!isStop && repeatTime > 0); @@ -624,7 +624,7 @@ repeatTime = 1000; do { isStop = IsStop((short)IConfig.CardNum, (short)optionPara.AxisIndex); isStop = IsStop((short)optionPara.AxisIndex); Thread.Sleep(50); repeatTime--; } while (!isStop && repeatTime > 0); @@ -667,7 +667,7 @@ int repeatTime = 100; do { isStop = IsStop((short)IConfig.CardNum, (short)axisNum); isStop = IsStop((short)axisNum); Thread.Sleep(10); repeatTime--; } while (!isStop && repeatTime > 0); @@ -799,18 +799,29 @@ /// <param name="cardNum">板卡号</param> /// <param name="axisNum">轴号</param> /// <returns></returns> public bool IsStop(short cardNum, short axisNum) public bool IsStop(short axisNum) { int sts = GetAxisStatus(axisNum); if ((sts & 0x400) == 0) return true;//停止返回true else return false; //运行中返回false } /// <summary> /// 读取轴状态 /// </summary> /// <param name="cardNum">板卡号</param> /// <param name="axisNum">轴号</param> /// <returns></returns> public int GetAxisStatus(int axisNum) { lock (moveLock) { int sts = 0; uint pclock = 0; GTSCardAPI.GT_GetSts(cardNum, axisNum, out sts, 1, out pclock); if ((sts & 0x400) == 0) return true;//停止返回true else return false; //运行中返回false GTSCardAPI.GT_GetSts((short)IConfig.CardNum, (short)axisNum, out sts, 1, out pclock); return sts; } } #endregion #region IMonitor @@ -827,6 +838,8 @@ axisMovingStatus.Destination = Convert.ToInt32(GetPrfPosition(axisMovingStatus.AxisIndex)); axisMovingStatus.CurVelocity = GetVelocity(axisMovingStatus.AxisIndex); axisMovingStatus.PrfVelocity = GetPrfVelocity(axisMovingStatus.AxisIndex); axisMovingStatus.AxisStatus = GetAxisStatus(axisMovingStatus.AxisIndex); axisMovingStatusesList.Add(axisMovingStatus); } @@ -997,12 +1010,11 @@ public override void ResetAlarm() { int axis_sts; uint clk; var axisSettings = IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled); GTSCardAPI.GT_ClrSts((short)IConfig.CardNum, 1, (short)axisSettings.Count); foreach (var axisSetting in axisSettings) { GTSCardAPI.GT_GetSts((short)IConfig.CardNum, (short)axisSetting.AxisIndex, out axis_sts, 1, out clk); axis_sts = GetAxisStatus((short)axisSetting.AxisIndex); if ((axis_sts & 0x200) == 0) { var rst = GTSCardAPI.GT_AxisOn((short)IConfig.CardNum, (short)axisSetting.AxisIndex); src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs
@@ -28,46 +28,46 @@ /// </summary> private void InitializeComponent() { this.groupBoxAxisStatus = new System.Windows.Forms.GroupBox(); this.groupBoxAxisOperration = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); this.label2 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.buttonClearStatus = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.label5 = new System.Windows.Forms.Label(); this.textBox3 = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.textBox4 = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); this.textBox6 = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); this.textBox7 = new System.Windows.Forms.TextBox(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.groupBoxAxisStatus.SuspendLayout(); this.button2 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox7 = new System.Windows.Forms.TextBox(); this.textBox6 = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.button1 = new System.Windows.Forms.Button(); this.textBox3 = new System.Windows.Forms.TextBox(); this.buttonClearStatus = new System.Windows.Forms.Button(); this.textBox2 = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBoxAxisOperration.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // groupBoxAxisStatus // groupBoxAxisOperration // this.groupBoxAxisStatus.Controls.Add(this.tableLayoutPanel1); this.groupBoxAxisStatus.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBoxAxisStatus.Location = new System.Drawing.Point(0, 0); this.groupBoxAxisStatus.Name = "groupBoxAxisStatus"; this.groupBoxAxisStatus.Size = new System.Drawing.Size(547, 148); this.groupBoxAxisStatus.TabIndex = 5; this.groupBoxAxisStatus.TabStop = false; this.groupBoxAxisStatus.Text = "轴操作"; this.groupBoxAxisOperration.Controls.Add(this.tableLayoutPanel1); this.groupBoxAxisOperration.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBoxAxisOperration.Location = new System.Drawing.Point(0, 0); this.groupBoxAxisOperration.Name = "groupBoxAxisOperration"; this.groupBoxAxisOperration.Size = new System.Drawing.Size(547, 148); this.groupBoxAxisOperration.TabIndex = 5; this.groupBoxAxisOperration.TabStop = false; this.groupBoxAxisOperration.Text = "轴操作"; // // tableLayoutPanel1 // @@ -85,36 +85,6 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(541, 128); this.tableLayoutPanel1.TabIndex = 0; // // panel1 // this.panel1.Controls.Add(this.button1); this.panel1.Controls.Add(this.textBox3); this.panel1.Controls.Add(this.buttonClearStatus); this.panel1.Controls.Add(this.textBox2); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.textBox1); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label2); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(3, 3); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(535, 58); this.panel1.TabIndex = 2; // // label2 // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Location = new System.Drawing.Point(0, 21); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(77, 19); this.label2.TabIndex = 2; this.label2.Text = "Jog模式"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // panel2 // @@ -135,6 +105,24 @@ this.panel2.Size = new System.Drawing.Size(535, 58); this.panel2.TabIndex = 3; // // button3 // this.button3.Location = new System.Drawing.Point(462, 31); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(70, 25); this.button3.TabIndex = 6; this.button3.Text = "停止"; this.button3.UseVisualStyleBackColor = true; // // button2 // this.button2.Location = new System.Drawing.Point(462, 3); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(70, 25); this.button2.TabIndex = 6; this.button2.Text = "开始"; this.button2.UseVisualStyleBackColor = true; // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -148,80 +136,12 @@ this.label1.Text = "P2P模式"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // textBox1 // textBox5 // this.textBox1.Location = new System.Drawing.Point(154, 4); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(116, 21); this.textBox1.TabIndex = 5; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(92, 7); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(41, 12); this.label3.TabIndex = 4; this.label3.Text = "速度:"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(92, 38); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(53, 12); this.label4.TabIndex = 4; this.label4.Text = "加速度:"; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(154, 35); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(116, 21); this.textBox2.TabIndex = 5; // // buttonClearStatus // this.buttonClearStatus.Location = new System.Drawing.Point(462, 3); this.buttonClearStatus.Name = "buttonClearStatus"; this.buttonClearStatus.Size = new System.Drawing.Size(70, 25); this.buttonClearStatus.TabIndex = 6; this.buttonClearStatus.Text = "正向"; this.buttonClearStatus.UseVisualStyleBackColor = true; // // button1 // this.button1.Location = new System.Drawing.Point(462, 33); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(70, 25); this.button1.TabIndex = 6; this.button1.Text = "负向"; this.button1.UseVisualStyleBackColor = true; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(278, 7); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(53, 12); this.label5.TabIndex = 4; this.label5.Text = "减速度:"; // // textBox3 // this.textBox3.Location = new System.Drawing.Point(340, 4); this.textBox3.Name = "textBox3"; this.textBox3.Size = new System.Drawing.Size(116, 21); this.textBox3.TabIndex = 5; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(92, 7); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(65, 12); this.label6.TabIndex = 4; this.label6.Text = "规划位置:"; this.textBox5.Location = new System.Drawing.Point(154, 34); this.textBox5.Name = "textBox5"; this.textBox5.Size = new System.Drawing.Size(116, 21); this.textBox5.TabIndex = 5; // // textBox4 // @@ -229,6 +149,20 @@ this.textBox4.Name = "textBox4"; this.textBox4.Size = new System.Drawing.Size(116, 21); this.textBox4.TabIndex = 5; // // textBox7 // this.textBox7.Location = new System.Drawing.Point(340, 34); this.textBox7.Name = "textBox7"; this.textBox7.Size = new System.Drawing.Size(116, 21); this.textBox7.TabIndex = 5; // // textBox6 // this.textBox6.Location = new System.Drawing.Point(340, 4); this.textBox6.Name = "textBox6"; this.textBox6.Size = new System.Drawing.Size(116, 21); this.textBox6.TabIndex = 5; // // label7 // @@ -239,28 +173,14 @@ this.label7.TabIndex = 4; this.label7.Text = "速度:"; // // textBox5 // label6 // this.textBox5.Location = new System.Drawing.Point(154, 34); this.textBox5.Name = "textBox5"; this.textBox5.Size = new System.Drawing.Size(116, 21); this.textBox5.TabIndex = 5; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(278, 7); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(53, 12); this.label8.TabIndex = 4; this.label8.Text = "加速度:"; // // textBox6 // this.textBox6.Location = new System.Drawing.Point(340, 4); this.textBox6.Name = "textBox6"; this.textBox6.Size = new System.Drawing.Size(116, 21); this.textBox6.TabIndex = 5; this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(92, 7); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(65, 12); this.label6.TabIndex = 4; this.label6.Text = "规划位置:"; // // label9 // @@ -271,51 +191,131 @@ this.label9.TabIndex = 4; this.label9.Text = "减速度:"; // // textBox7 // label8 // this.textBox7.Location = new System.Drawing.Point(340, 34); this.textBox7.Name = "textBox7"; this.textBox7.Size = new System.Drawing.Size(116, 21); this.textBox7.TabIndex = 5; this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(278, 7); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(53, 12); this.label8.TabIndex = 4; this.label8.Text = "加速度:"; // // button2 // panel1 // this.button2.Location = new System.Drawing.Point(462, 3); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(70, 25); this.button2.TabIndex = 6; this.button2.Text = "开始"; this.button2.UseVisualStyleBackColor = true; this.panel1.Controls.Add(this.button1); this.panel1.Controls.Add(this.textBox3); this.panel1.Controls.Add(this.buttonClearStatus); this.panel1.Controls.Add(this.textBox2); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.textBox1); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label2); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(3, 3); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(535, 58); this.panel1.TabIndex = 2; // // button3 // button1 // this.button3.Location = new System.Drawing.Point(462, 31); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(70, 25); this.button3.TabIndex = 6; this.button3.Text = "停止"; this.button3.UseVisualStyleBackColor = true; this.button1.Location = new System.Drawing.Point(462, 33); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(70, 25); this.button1.TabIndex = 6; this.button1.Text = "负向"; this.button1.UseVisualStyleBackColor = true; // // textBox3 // this.textBox3.Location = new System.Drawing.Point(340, 4); this.textBox3.Name = "textBox3"; this.textBox3.Size = new System.Drawing.Size(116, 21); this.textBox3.TabIndex = 5; // // buttonClearStatus // this.buttonClearStatus.Location = new System.Drawing.Point(462, 3); this.buttonClearStatus.Name = "buttonClearStatus"; this.buttonClearStatus.Size = new System.Drawing.Size(70, 25); this.buttonClearStatus.TabIndex = 6; this.buttonClearStatus.Text = "正向"; this.buttonClearStatus.UseVisualStyleBackColor = true; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(154, 35); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(116, 21); this.textBox2.TabIndex = 5; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(278, 7); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(53, 12); this.label5.TabIndex = 4; this.label5.Text = "减速度:"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(154, 4); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(116, 21); this.textBox1.TabIndex = 5; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(92, 38); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(53, 12); this.label4.TabIndex = 4; this.label4.Text = "加速度:"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(92, 7); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(41, 12); this.label3.TabIndex = 4; this.label3.Text = "速度:"; // // label2 // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Location = new System.Drawing.Point(0, 21); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(77, 19); this.label2.TabIndex = 2; this.label2.Text = "Jog模式"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // CtrlMotionCardAxisOperation // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBoxAxisStatus); this.Controls.Add(this.groupBoxAxisOperration); this.Name = "CtrlMotionCardAxisOperation"; this.Size = new System.Drawing.Size(547, 148); this.groupBoxAxisStatus.ResumeLayout(false); this.groupBoxAxisOperration.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.GroupBox groupBoxAxisStatus; private System.Windows.Forms.GroupBox groupBoxAxisOperration; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Label label1; src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.cs
@@ -17,5 +17,11 @@ InitializeComponent(); } public CtrlMotionCardAxisOperation(int axisIndex,string axisName) { InitializeComponent(); groupBoxAxisOperration.Text = $"运动轴:{axisIndex}-{axisName}"; } } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs
@@ -28,6 +28,7 @@ /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.groupBoxAxisStatus = new System.Windows.Forms.GroupBox(); this.ioIndicatorCtrl2 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl10 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); @@ -35,14 +36,15 @@ this.ioIndicatorCtrl8 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl6 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl1 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBoxCurVel = new System.Windows.Forms.TextBox(); this.textBoxPrfVel = new System.Windows.Forms.TextBox(); this.textBoxCurPosition = new System.Windows.Forms.TextBox(); this.textBoxPrfPositon = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.groupBoxAxisStatus.SuspendLayout(); this.SuspendLayout(); // @@ -54,10 +56,10 @@ this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl8); this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl6); this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl1); this.groupBoxAxisStatus.Controls.Add(this.textBox4); this.groupBoxAxisStatus.Controls.Add(this.textBox3); this.groupBoxAxisStatus.Controls.Add(this.textBox2); this.groupBoxAxisStatus.Controls.Add(this.textBox1); this.groupBoxAxisStatus.Controls.Add(this.textBoxCurVel); this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfVel); this.groupBoxAxisStatus.Controls.Add(this.textBoxCurPosition); this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfPositon); this.groupBoxAxisStatus.Controls.Add(this.label5); this.groupBoxAxisStatus.Controls.Add(this.label4); this.groupBoxAxisStatus.Controls.Add(this.label3); @@ -81,7 +83,7 @@ // // ioIndicatorCtrl10 // this.ioIndicatorCtrl10.Desc = "回零状态"; this.ioIndicatorCtrl10.Desc = "运动出错"; this.ioIndicatorCtrl10.IsOn = null; this.ioIndicatorCtrl10.Location = new System.Drawing.Point(328, 77); this.ioIndicatorCtrl10.Name = "ioIndicatorCtrl10"; @@ -124,42 +126,42 @@ this.ioIndicatorCtrl1.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl1.TabIndex = 4; // // textBox4 // textBoxCurVel // this.textBox4.Location = new System.Drawing.Point(85, 114); this.textBox4.Name = "textBox4"; this.textBox4.ReadOnly = true; this.textBox4.Size = new System.Drawing.Size(116, 21); this.textBox4.TabIndex = 3; this.textBoxCurVel.Location = new System.Drawing.Point(85, 113); this.textBoxCurVel.Name = "textBoxCurVel"; this.textBoxCurVel.ReadOnly = true; this.textBoxCurVel.Size = new System.Drawing.Size(116, 21); this.textBoxCurVel.TabIndex = 3; // // textBox3 // textBoxPrfVel // this.textBox3.Location = new System.Drawing.Point(85, 53); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; this.textBox3.Size = new System.Drawing.Size(116, 21); this.textBox3.TabIndex = 3; this.textBoxPrfVel.Location = new System.Drawing.Point(85, 84); this.textBoxPrfVel.Name = "textBoxPrfVel"; this.textBoxPrfVel.ReadOnly = true; this.textBoxPrfVel.Size = new System.Drawing.Size(116, 21); this.textBoxPrfVel.TabIndex = 3; // // textBox2 // textBoxCurPosition // this.textBox2.Location = new System.Drawing.Point(85, 83); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.Size = new System.Drawing.Size(116, 21); this.textBox2.TabIndex = 3; this.textBoxCurPosition.Location = new System.Drawing.Point(85, 55); this.textBoxCurPosition.Name = "textBoxCurPosition"; this.textBoxCurPosition.ReadOnly = true; this.textBoxCurPosition.Size = new System.Drawing.Size(116, 21); this.textBoxCurPosition.TabIndex = 3; // // textBox1 // textBoxPrfPositon // this.textBox1.Location = new System.Drawing.Point(85, 22); this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.Size = new System.Drawing.Size(116, 21); this.textBox1.TabIndex = 3; this.textBoxPrfPositon.Location = new System.Drawing.Point(85, 23); this.textBoxPrfPositon.Name = "textBoxPrfPositon"; this.textBoxPrfPositon.ReadOnly = true; this.textBoxPrfPositon.Size = new System.Drawing.Size(116, 21); this.textBoxPrfPositon.TabIndex = 3; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(23, 117); this.label5.Location = new System.Drawing.Point(23, 116); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(65, 12); this.label5.TabIndex = 2; @@ -168,7 +170,7 @@ // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(23, 56); this.label4.Location = new System.Drawing.Point(23, 87); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(65, 12); this.label4.TabIndex = 2; @@ -177,7 +179,7 @@ // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(23, 86); this.label3.Location = new System.Drawing.Point(23, 58); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(65, 12); this.label3.TabIndex = 2; @@ -186,11 +188,15 @@ // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(23, 25); this.label2.Location = new System.Drawing.Point(23, 26); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(65, 12); this.label2.TabIndex = 2; this.label2.Text = "规划位置:"; // // timer1 // this.timer1.Tick += new System.EventHandler(this.RefreshStatus); // // CtrlMotionCardAxisStatus // @@ -214,13 +220,14 @@ private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl8; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl6; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl1; private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBoxCurVel; private System.Windows.Forms.TextBox textBoxPrfVel; private System.Windows.Forms.TextBox textBoxCurPosition; private System.Windows.Forms.TextBox textBoxPrfPositon; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Timer timer1; } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs
@@ -1,11 +1,5 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using Bro.Common.Model; using System; using System.Windows.Forms; namespace Bro.UI.Device.Winform @@ -16,5 +10,30 @@ { InitializeComponent(); } public AxisMovingStatus _axisMovingStatus = new AxisMovingStatus(); public CtrlMotionCardAxisStatus(AxisMovingStatus axisMovingStatus) { InitializeComponent(); _axisMovingStatus = axisMovingStatus; groupBoxAxisStatus.Text = $"运动轴:{_axisMovingStatus.AxisIndex}-{_axisMovingStatus.AxisName}"; } private void RefreshStatus(object sender, EventArgs e) { textBoxPrfPositon.Text = _axisMovingStatus.Destination.ToString(); textBoxCurPosition.Text = _axisMovingStatus.CurPosition.ToString(); textBoxPrfVel.Text = _axisMovingStatus.PrfVelocity.ToString(); textBoxCurVel.Text = _axisMovingStatus.CurVelocity.ToString(); int axis_sts = _axisMovingStatus.AxisStatus; ioIndicatorCtrl1.IsOn = (axis_sts & 0x2) == 0;//驱动报警 ioIndicatorCtrl2.IsOn = (axis_sts & 0x200) == 0;//伺服使能 ioIndicatorCtrl6.IsOn = (axis_sts & 0x20) == 0;//正限位 ioIndicatorCtrl8.IsOn = (axis_sts & 0x40) == 0;//负限位 ioIndicatorCtrl9.IsOn =(axis_sts & 0x400) == 0;//运动状态 ioIndicatorCtrl10.IsOn = (axis_sts & 0x10) == 0;//运动出错 } } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.resx
@@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.Designer.cs
@@ -28,52 +28,54 @@ /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.ioIndicatorCtrl14 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl13 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl12 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl26 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl25 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl24 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl17 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl16 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl20 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl19 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl23 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl22 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl21 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl18 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl15 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl11 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.ioIndicatorCtrl27 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl28 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl29 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl30 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl31 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl32 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl33 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl34 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl35 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl36 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl37 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl38 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl39 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl40 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl41 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIndicatorCtrl42 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.groupBoxIOOut = new System.Windows.Forms.GroupBox(); this.ioOut4 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut3 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut2 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut16 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut15 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut14 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut13 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut9 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut8 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut7 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut12 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut11 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut10 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut6 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut5 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioOut1 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.groupBoxIOIn = new System.Windows.Forms.GroupBox(); this.ioIn4 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn3 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn2 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn16 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn15 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn14 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn13 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn9 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn8 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn7 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn12 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn11 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn10 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn6 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn5 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.ioIn1 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.tableLayoutPanel1.SuspendLayout(); this.groupBox5.SuspendLayout(); this.groupBox6.SuspendLayout(); this.groupBoxIOOut.SuspendLayout(); this.groupBoxIOIn.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.Controls.Add(this.groupBox6, 0, 1); this.tableLayoutPanel1.Controls.Add(this.groupBox5, 0, 0); this.tableLayoutPanel1.Controls.Add(this.groupBoxIOOut, 0, 1); this.tableLayoutPanel1.Controls.Add(this.groupBoxIOIn, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -83,345 +85,351 @@ this.tableLayoutPanel1.Size = new System.Drawing.Size(580, 288); this.tableLayoutPanel1.TabIndex = 0; // // groupBox5 // groupBoxIOOut // this.groupBox5.Controls.Add(this.ioIndicatorCtrl14); this.groupBox5.Controls.Add(this.ioIndicatorCtrl13); this.groupBox5.Controls.Add(this.ioIndicatorCtrl12); this.groupBox5.Controls.Add(this.ioIndicatorCtrl26); this.groupBox5.Controls.Add(this.ioIndicatorCtrl25); this.groupBox5.Controls.Add(this.ioIndicatorCtrl24); this.groupBox5.Controls.Add(this.ioIndicatorCtrl17); this.groupBox5.Controls.Add(this.ioIndicatorCtrl16); this.groupBox5.Controls.Add(this.ioIndicatorCtrl20); this.groupBox5.Controls.Add(this.ioIndicatorCtrl19); this.groupBox5.Controls.Add(this.ioIndicatorCtrl23); this.groupBox5.Controls.Add(this.ioIndicatorCtrl22); this.groupBox5.Controls.Add(this.ioIndicatorCtrl21); this.groupBox5.Controls.Add(this.ioIndicatorCtrl18); this.groupBox5.Controls.Add(this.ioIndicatorCtrl15); this.groupBox5.Controls.Add(this.ioIndicatorCtrl11); this.groupBox5.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox5.Location = new System.Drawing.Point(3, 3); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(574, 138); this.groupBox5.TabIndex = 7; this.groupBox5.TabStop = false; this.groupBox5.Text = "数字量输入"; this.groupBoxIOOut.Controls.Add(this.ioOut4); this.groupBoxIOOut.Controls.Add(this.ioOut3); this.groupBoxIOOut.Controls.Add(this.ioOut2); this.groupBoxIOOut.Controls.Add(this.ioOut16); this.groupBoxIOOut.Controls.Add(this.ioOut15); this.groupBoxIOOut.Controls.Add(this.ioOut14); this.groupBoxIOOut.Controls.Add(this.ioOut13); this.groupBoxIOOut.Controls.Add(this.ioOut9); this.groupBoxIOOut.Controls.Add(this.ioOut8); this.groupBoxIOOut.Controls.Add(this.ioOut7); this.groupBoxIOOut.Controls.Add(this.ioOut12); this.groupBoxIOOut.Controls.Add(this.ioOut11); this.groupBoxIOOut.Controls.Add(this.ioOut10); this.groupBoxIOOut.Controls.Add(this.ioOut6); this.groupBoxIOOut.Controls.Add(this.ioOut5); this.groupBoxIOOut.Controls.Add(this.ioOut1); this.groupBoxIOOut.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBoxIOOut.Location = new System.Drawing.Point(3, 147); this.groupBoxIOOut.Name = "groupBoxIOOut"; this.groupBoxIOOut.Size = new System.Drawing.Size(574, 138); this.groupBoxIOOut.TabIndex = 8; this.groupBoxIOOut.TabStop = false; this.groupBoxIOOut.Text = "数字量输出"; // // ioIndicatorCtrl14 // ioOut4 // this.ioIndicatorCtrl14.Desc = "IN 4"; this.ioIndicatorCtrl14.IsOn = null; this.ioIndicatorCtrl14.Location = new System.Drawing.Point(477, 18); this.ioIndicatorCtrl14.Name = "ioIndicatorCtrl14"; this.ioIndicatorCtrl14.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl14.TabIndex = 4; this.ioOut4.Desc = "OUT 4"; this.ioOut4.IsOn = null; this.ioOut4.Location = new System.Drawing.Point(477, 18); this.ioOut4.Name = "ioOut4"; this.ioOut4.Size = new System.Drawing.Size(90, 24); this.ioOut4.TabIndex = 4; // // ioIndicatorCtrl13 // ioOut3 // this.ioIndicatorCtrl13.Desc = "IN 3"; this.ioIndicatorCtrl13.IsOn = null; this.ioIndicatorCtrl13.Location = new System.Drawing.Point(306, 18); this.ioIndicatorCtrl13.Name = "ioIndicatorCtrl13"; this.ioIndicatorCtrl13.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl13.TabIndex = 4; this.ioOut3.Desc = "OUT 3"; this.ioOut3.IsOn = null; this.ioOut3.Location = new System.Drawing.Point(306, 18); this.ioOut3.Name = "ioOut3"; this.ioOut3.Size = new System.Drawing.Size(90, 24); this.ioOut3.TabIndex = 4; // // ioIndicatorCtrl12 // ioOut2 // this.ioIndicatorCtrl12.Desc = "IN 2"; this.ioIndicatorCtrl12.IsOn = null; this.ioIndicatorCtrl12.Location = new System.Drawing.Point(145, 18); this.ioIndicatorCtrl12.Name = "ioIndicatorCtrl12"; this.ioIndicatorCtrl12.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl12.TabIndex = 4; this.ioOut2.Desc = "OUT 2"; this.ioOut2.IsOn = null; this.ioOut2.Location = new System.Drawing.Point(145, 18); this.ioOut2.Name = "ioOut2"; this.ioOut2.Size = new System.Drawing.Size(90, 24); this.ioOut2.TabIndex = 4; // // ioIndicatorCtrl26 // ioOut16 // this.ioIndicatorCtrl26.Desc = "IN 16"; this.ioIndicatorCtrl26.IsOn = null; this.ioIndicatorCtrl26.Location = new System.Drawing.Point(477, 107); this.ioIndicatorCtrl26.Name = "ioIndicatorCtrl26"; this.ioIndicatorCtrl26.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl26.TabIndex = 4; this.ioOut16.Desc = "OUT 16"; this.ioOut16.IsOn = null; this.ioOut16.Location = new System.Drawing.Point(477, 107); this.ioOut16.Name = "ioOut16"; this.ioOut16.Size = new System.Drawing.Size(90, 24); this.ioOut16.TabIndex = 4; // // ioIndicatorCtrl25 // ioOut15 // this.ioIndicatorCtrl25.Desc = "IN 15"; this.ioIndicatorCtrl25.IsOn = null; this.ioIndicatorCtrl25.Location = new System.Drawing.Point(306, 107); this.ioIndicatorCtrl25.Name = "ioIndicatorCtrl25"; this.ioIndicatorCtrl25.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl25.TabIndex = 4; this.ioOut15.Desc = "OUT 15"; this.ioOut15.IsOn = null; this.ioOut15.Location = new System.Drawing.Point(306, 107); this.ioOut15.Name = "ioOut15"; this.ioOut15.Size = new System.Drawing.Size(90, 24); this.ioOut15.TabIndex = 4; // // ioIndicatorCtrl24 // ioOut14 // this.ioIndicatorCtrl24.Desc = "IN 14"; this.ioIndicatorCtrl24.IsOn = null; this.ioIndicatorCtrl24.Location = new System.Drawing.Point(145, 107); this.ioIndicatorCtrl24.Name = "ioIndicatorCtrl24"; this.ioIndicatorCtrl24.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl24.TabIndex = 4; this.ioOut14.Desc = "OUT 14"; this.ioOut14.IsOn = null; this.ioOut14.Location = new System.Drawing.Point(145, 107); this.ioOut14.Name = "ioOut14"; this.ioOut14.Size = new System.Drawing.Size(90, 24); this.ioOut14.TabIndex = 4; // // ioIndicatorCtrl17 // ioOut13 // this.ioIndicatorCtrl17.Desc = "IN 13"; this.ioIndicatorCtrl17.IsOn = null; this.ioIndicatorCtrl17.Location = new System.Drawing.Point(9, 106); this.ioIndicatorCtrl17.Name = "ioIndicatorCtrl17"; this.ioIndicatorCtrl17.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl17.TabIndex = 4; this.ioOut13.Desc = "OUT 13"; this.ioOut13.IsOn = null; this.ioOut13.Location = new System.Drawing.Point(9, 106); this.ioOut13.Name = "ioOut13"; this.ioOut13.Size = new System.Drawing.Size(90, 24); this.ioOut13.TabIndex = 4; // // ioIndicatorCtrl16 // ioOut9 // this.ioIndicatorCtrl16.Desc = "IN 9"; this.ioIndicatorCtrl16.IsOn = null; this.ioIndicatorCtrl16.Location = new System.Drawing.Point(9, 77); this.ioIndicatorCtrl16.Name = "ioIndicatorCtrl16"; this.ioIndicatorCtrl16.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl16.TabIndex = 4; this.ioOut9.Desc = "OUT 9"; this.ioOut9.IsOn = null; this.ioOut9.Location = new System.Drawing.Point(9, 77); this.ioOut9.Name = "ioOut9"; this.ioOut9.Size = new System.Drawing.Size(90, 24); this.ioOut9.TabIndex = 4; // // ioIndicatorCtrl20 // ioOut8 // this.ioIndicatorCtrl20.Desc = "IN 8"; this.ioIndicatorCtrl20.IsOn = null; this.ioIndicatorCtrl20.Location = new System.Drawing.Point(477, 48); this.ioIndicatorCtrl20.Name = "ioIndicatorCtrl20"; this.ioIndicatorCtrl20.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl20.TabIndex = 4; this.ioOut8.Desc = "OUT 8"; this.ioOut8.IsOn = null; this.ioOut8.Location = new System.Drawing.Point(477, 48); this.ioOut8.Name = "ioOut8"; this.ioOut8.Size = new System.Drawing.Size(90, 24); this.ioOut8.TabIndex = 4; // // ioIndicatorCtrl19 // ioOut7 // this.ioIndicatorCtrl19.Desc = "IN 7"; this.ioIndicatorCtrl19.IsOn = null; this.ioIndicatorCtrl19.Location = new System.Drawing.Point(306, 48); this.ioIndicatorCtrl19.Name = "ioIndicatorCtrl19"; this.ioIndicatorCtrl19.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl19.TabIndex = 4; this.ioOut7.Desc = "OUT 7"; this.ioOut7.IsOn = null; this.ioOut7.Location = new System.Drawing.Point(306, 48); this.ioOut7.Name = "ioOut7"; this.ioOut7.Size = new System.Drawing.Size(90, 24); this.ioOut7.TabIndex = 4; // // ioIndicatorCtrl23 // ioOut12 // this.ioIndicatorCtrl23.Desc = "IN 12"; this.ioIndicatorCtrl23.IsOn = null; this.ioIndicatorCtrl23.Location = new System.Drawing.Point(477, 77); this.ioIndicatorCtrl23.Name = "ioIndicatorCtrl23"; this.ioIndicatorCtrl23.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl23.TabIndex = 4; this.ioOut12.Desc = "OUT 12"; this.ioOut12.IsOn = null; this.ioOut12.Location = new System.Drawing.Point(477, 77); this.ioOut12.Name = "ioOut12"; this.ioOut12.Size = new System.Drawing.Size(90, 24); this.ioOut12.TabIndex = 4; // // ioIndicatorCtrl22 // ioOut11 // this.ioIndicatorCtrl22.Desc = "IN 11"; this.ioIndicatorCtrl22.IsOn = null; this.ioIndicatorCtrl22.Location = new System.Drawing.Point(306, 77); this.ioIndicatorCtrl22.Name = "ioIndicatorCtrl22"; this.ioIndicatorCtrl22.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl22.TabIndex = 4; this.ioOut11.Desc = "OUT 11"; this.ioOut11.IsOn = null; this.ioOut11.Location = new System.Drawing.Point(306, 77); this.ioOut11.Name = "ioOut11"; this.ioOut11.Size = new System.Drawing.Size(90, 24); this.ioOut11.TabIndex = 4; // // ioIndicatorCtrl21 // ioOut10 // this.ioIndicatorCtrl21.Desc = "IN 10"; this.ioIndicatorCtrl21.IsOn = null; this.ioIndicatorCtrl21.Location = new System.Drawing.Point(145, 77); this.ioIndicatorCtrl21.Name = "ioIndicatorCtrl21"; this.ioIndicatorCtrl21.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl21.TabIndex = 4; this.ioOut10.Desc = "OUT 10"; this.ioOut10.IsOn = null; this.ioOut10.Location = new System.Drawing.Point(145, 77); this.ioOut10.Name = "ioOut10"; this.ioOut10.Size = new System.Drawing.Size(90, 24); this.ioOut10.TabIndex = 4; // // ioIndicatorCtrl18 // ioOut6 // this.ioIndicatorCtrl18.Desc = "IN 6"; this.ioIndicatorCtrl18.IsOn = null; this.ioIndicatorCtrl18.Location = new System.Drawing.Point(145, 48); this.ioIndicatorCtrl18.Name = "ioIndicatorCtrl18"; this.ioIndicatorCtrl18.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl18.TabIndex = 4; this.ioOut6.Desc = "OUT 6"; this.ioOut6.IsOn = null; this.ioOut6.Location = new System.Drawing.Point(145, 48); this.ioOut6.Name = "ioOut6"; this.ioOut6.Size = new System.Drawing.Size(90, 24); this.ioOut6.TabIndex = 4; // // ioIndicatorCtrl15 // ioOut5 // this.ioIndicatorCtrl15.Desc = "IN 5"; this.ioIndicatorCtrl15.IsOn = null; this.ioIndicatorCtrl15.Location = new System.Drawing.Point(9, 48); this.ioIndicatorCtrl15.Name = "ioIndicatorCtrl15"; this.ioIndicatorCtrl15.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl15.TabIndex = 4; this.ioOut5.Desc = "OUT 5"; this.ioOut5.IsOn = null; this.ioOut5.Location = new System.Drawing.Point(9, 48); this.ioOut5.Name = "ioOut5"; this.ioOut5.Size = new System.Drawing.Size(90, 24); this.ioOut5.TabIndex = 4; // // ioIndicatorCtrl11 // ioOut1 // this.ioIndicatorCtrl11.Desc = "IN 1"; this.ioIndicatorCtrl11.IsOn = null; this.ioIndicatorCtrl11.Location = new System.Drawing.Point(9, 18); this.ioIndicatorCtrl11.Name = "ioIndicatorCtrl11"; this.ioIndicatorCtrl11.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl11.TabIndex = 4; this.ioOut1.Desc = "OUT 1"; this.ioOut1.IsOn = null; this.ioOut1.Location = new System.Drawing.Point(9, 18); this.ioOut1.Name = "ioOut1"; this.ioOut1.Size = new System.Drawing.Size(90, 24); this.ioOut1.TabIndex = 4; // // groupBoxIOIn // this.groupBoxIOIn.Controls.Add(this.ioIn4); this.groupBoxIOIn.Controls.Add(this.ioIn3); this.groupBoxIOIn.Controls.Add(this.ioIn2); this.groupBoxIOIn.Controls.Add(this.ioIn16); this.groupBoxIOIn.Controls.Add(this.ioIn15); this.groupBoxIOIn.Controls.Add(this.ioIn14); this.groupBoxIOIn.Controls.Add(this.ioIn13); this.groupBoxIOIn.Controls.Add(this.ioIn9); this.groupBoxIOIn.Controls.Add(this.ioIn8); this.groupBoxIOIn.Controls.Add(this.ioIn7); this.groupBoxIOIn.Controls.Add(this.ioIn12); this.groupBoxIOIn.Controls.Add(this.ioIn11); this.groupBoxIOIn.Controls.Add(this.ioIn10); this.groupBoxIOIn.Controls.Add(this.ioIn6); this.groupBoxIOIn.Controls.Add(this.ioIn5); this.groupBoxIOIn.Controls.Add(this.ioIn1); this.groupBoxIOIn.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBoxIOIn.Location = new System.Drawing.Point(3, 3); this.groupBoxIOIn.Name = "groupBoxIOIn"; this.groupBoxIOIn.Size = new System.Drawing.Size(574, 138); this.groupBoxIOIn.TabIndex = 7; this.groupBoxIOIn.TabStop = false; this.groupBoxIOIn.Text = "数字量输入"; // // groupBox6 // ioIn4 // this.groupBox6.Controls.Add(this.ioIndicatorCtrl27); this.groupBox6.Controls.Add(this.ioIndicatorCtrl28); this.groupBox6.Controls.Add(this.ioIndicatorCtrl29); this.groupBox6.Controls.Add(this.ioIndicatorCtrl30); this.groupBox6.Controls.Add(this.ioIndicatorCtrl31); this.groupBox6.Controls.Add(this.ioIndicatorCtrl32); this.groupBox6.Controls.Add(this.ioIndicatorCtrl33); this.groupBox6.Controls.Add(this.ioIndicatorCtrl34); this.groupBox6.Controls.Add(this.ioIndicatorCtrl35); this.groupBox6.Controls.Add(this.ioIndicatorCtrl36); this.groupBox6.Controls.Add(this.ioIndicatorCtrl37); this.groupBox6.Controls.Add(this.ioIndicatorCtrl38); this.groupBox6.Controls.Add(this.ioIndicatorCtrl39); this.groupBox6.Controls.Add(this.ioIndicatorCtrl40); this.groupBox6.Controls.Add(this.ioIndicatorCtrl41); this.groupBox6.Controls.Add(this.ioIndicatorCtrl42); this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox6.Location = new System.Drawing.Point(3, 147); this.groupBox6.Name = "groupBox6"; this.groupBox6.Size = new System.Drawing.Size(574, 138); this.groupBox6.TabIndex = 8; this.groupBox6.TabStop = false; this.groupBox6.Text = "数字量输出"; this.ioIn4.Desc = "IN 4"; this.ioIn4.IsOn = null; this.ioIn4.Location = new System.Drawing.Point(477, 18); this.ioIn4.Name = "ioIn4"; this.ioIn4.Size = new System.Drawing.Size(90, 24); this.ioIn4.TabIndex = 4; // // ioIndicatorCtrl27 // ioIn3 // this.ioIndicatorCtrl27.Desc = "OUT 4"; this.ioIndicatorCtrl27.IsOn = null; this.ioIndicatorCtrl27.Location = new System.Drawing.Point(477, 18); this.ioIndicatorCtrl27.Name = "ioIndicatorCtrl27"; this.ioIndicatorCtrl27.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl27.TabIndex = 4; this.ioIn3.Desc = "IN 3"; this.ioIn3.IsOn = null; this.ioIn3.Location = new System.Drawing.Point(306, 18); this.ioIn3.Name = "ioIn3"; this.ioIn3.Size = new System.Drawing.Size(90, 24); this.ioIn3.TabIndex = 4; // // ioIndicatorCtrl28 // ioIn2 // this.ioIndicatorCtrl28.Desc = "OUT 3"; this.ioIndicatorCtrl28.IsOn = null; this.ioIndicatorCtrl28.Location = new System.Drawing.Point(306, 18); this.ioIndicatorCtrl28.Name = "ioIndicatorCtrl28"; this.ioIndicatorCtrl28.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl28.TabIndex = 4; this.ioIn2.Desc = "IN 2"; this.ioIn2.IsOn = null; this.ioIn2.Location = new System.Drawing.Point(145, 18); this.ioIn2.Name = "ioIn2"; this.ioIn2.Size = new System.Drawing.Size(90, 24); this.ioIn2.TabIndex = 4; // // ioIndicatorCtrl29 // ioIn16 // this.ioIndicatorCtrl29.Desc = "OUT 2"; this.ioIndicatorCtrl29.IsOn = null; this.ioIndicatorCtrl29.Location = new System.Drawing.Point(145, 18); this.ioIndicatorCtrl29.Name = "ioIndicatorCtrl29"; this.ioIndicatorCtrl29.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl29.TabIndex = 4; this.ioIn16.Desc = "IN 16"; this.ioIn16.IsOn = null; this.ioIn16.Location = new System.Drawing.Point(477, 107); this.ioIn16.Name = "ioIn16"; this.ioIn16.Size = new System.Drawing.Size(90, 24); this.ioIn16.TabIndex = 4; // // ioIndicatorCtrl30 // ioIn15 // this.ioIndicatorCtrl30.Desc = "OUT 16"; this.ioIndicatorCtrl30.IsOn = null; this.ioIndicatorCtrl30.Location = new System.Drawing.Point(477, 107); this.ioIndicatorCtrl30.Name = "ioIndicatorCtrl30"; this.ioIndicatorCtrl30.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl30.TabIndex = 4; this.ioIn15.Desc = "IN 15"; this.ioIn15.IsOn = null; this.ioIn15.Location = new System.Drawing.Point(306, 107); this.ioIn15.Name = "ioIn15"; this.ioIn15.Size = new System.Drawing.Size(90, 24); this.ioIn15.TabIndex = 4; // // ioIndicatorCtrl31 // ioIn14 // this.ioIndicatorCtrl31.Desc = "OUT 15"; this.ioIndicatorCtrl31.IsOn = null; this.ioIndicatorCtrl31.Location = new System.Drawing.Point(306, 107); this.ioIndicatorCtrl31.Name = "ioIndicatorCtrl31"; this.ioIndicatorCtrl31.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl31.TabIndex = 4; this.ioIn14.Desc = "IN 14"; this.ioIn14.IsOn = null; this.ioIn14.Location = new System.Drawing.Point(145, 107); this.ioIn14.Name = "ioIn14"; this.ioIn14.Size = new System.Drawing.Size(90, 24); this.ioIn14.TabIndex = 4; // // ioIndicatorCtrl32 // ioIn13 // this.ioIndicatorCtrl32.Desc = "OUT 14"; this.ioIndicatorCtrl32.IsOn = null; this.ioIndicatorCtrl32.Location = new System.Drawing.Point(145, 107); this.ioIndicatorCtrl32.Name = "ioIndicatorCtrl32"; this.ioIndicatorCtrl32.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl32.TabIndex = 4; this.ioIn13.Desc = "IN 13"; this.ioIn13.IsOn = null; this.ioIn13.Location = new System.Drawing.Point(9, 106); this.ioIn13.Name = "ioIn13"; this.ioIn13.Size = new System.Drawing.Size(90, 24); this.ioIn13.TabIndex = 4; // // ioIndicatorCtrl33 // ioIn9 // this.ioIndicatorCtrl33.Desc = "OUT 13"; this.ioIndicatorCtrl33.IsOn = null; this.ioIndicatorCtrl33.Location = new System.Drawing.Point(9, 106); this.ioIndicatorCtrl33.Name = "ioIndicatorCtrl33"; this.ioIndicatorCtrl33.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl33.TabIndex = 4; this.ioIn9.Desc = "IN 9"; this.ioIn9.IsOn = null; this.ioIn9.Location = new System.Drawing.Point(9, 77); this.ioIn9.Name = "ioIn9"; this.ioIn9.Size = new System.Drawing.Size(90, 24); this.ioIn9.TabIndex = 4; // // ioIndicatorCtrl34 // ioIn8 // this.ioIndicatorCtrl34.Desc = "OUT 9"; this.ioIndicatorCtrl34.IsOn = null; this.ioIndicatorCtrl34.Location = new System.Drawing.Point(9, 77); this.ioIndicatorCtrl34.Name = "ioIndicatorCtrl34"; this.ioIndicatorCtrl34.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl34.TabIndex = 4; this.ioIn8.Desc = "IN 8"; this.ioIn8.IsOn = null; this.ioIn8.Location = new System.Drawing.Point(477, 48); this.ioIn8.Name = "ioIn8"; this.ioIn8.Size = new System.Drawing.Size(90, 24); this.ioIn8.TabIndex = 4; // // ioIndicatorCtrl35 // ioIn7 // this.ioIndicatorCtrl35.Desc = "OUT 8"; this.ioIndicatorCtrl35.IsOn = null; this.ioIndicatorCtrl35.Location = new System.Drawing.Point(477, 48); this.ioIndicatorCtrl35.Name = "ioIndicatorCtrl35"; this.ioIndicatorCtrl35.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl35.TabIndex = 4; this.ioIn7.Desc = "IN 7"; this.ioIn7.IsOn = null; this.ioIn7.Location = new System.Drawing.Point(306, 48); this.ioIn7.Name = "ioIn7"; this.ioIn7.Size = new System.Drawing.Size(90, 24); this.ioIn7.TabIndex = 4; // // ioIndicatorCtrl36 // ioIn12 // this.ioIndicatorCtrl36.Desc = "OUT 7"; this.ioIndicatorCtrl36.IsOn = null; this.ioIndicatorCtrl36.Location = new System.Drawing.Point(306, 48); this.ioIndicatorCtrl36.Name = "ioIndicatorCtrl36"; this.ioIndicatorCtrl36.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl36.TabIndex = 4; this.ioIn12.Desc = "IN 12"; this.ioIn12.IsOn = null; this.ioIn12.Location = new System.Drawing.Point(477, 77); this.ioIn12.Name = "ioIn12"; this.ioIn12.Size = new System.Drawing.Size(90, 24); this.ioIn12.TabIndex = 4; // // ioIndicatorCtrl37 // ioIn11 // this.ioIndicatorCtrl37.Desc = "OUT 12"; this.ioIndicatorCtrl37.IsOn = null; this.ioIndicatorCtrl37.Location = new System.Drawing.Point(477, 77); this.ioIndicatorCtrl37.Name = "ioIndicatorCtrl37"; this.ioIndicatorCtrl37.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl37.TabIndex = 4; this.ioIn11.Desc = "IN 11"; this.ioIn11.IsOn = null; this.ioIn11.Location = new System.Drawing.Point(306, 77); this.ioIn11.Name = "ioIn11"; this.ioIn11.Size = new System.Drawing.Size(90, 24); this.ioIn11.TabIndex = 4; // // ioIndicatorCtrl38 // ioIn10 // this.ioIndicatorCtrl38.Desc = "OUT 11"; this.ioIndicatorCtrl38.IsOn = null; this.ioIndicatorCtrl38.Location = new System.Drawing.Point(306, 77); this.ioIndicatorCtrl38.Name = "ioIndicatorCtrl38"; this.ioIndicatorCtrl38.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl38.TabIndex = 4; this.ioIn10.Desc = "IN 10"; this.ioIn10.IsOn = null; this.ioIn10.Location = new System.Drawing.Point(145, 77); this.ioIn10.Name = "ioIn10"; this.ioIn10.Size = new System.Drawing.Size(90, 24); this.ioIn10.TabIndex = 4; // // ioIndicatorCtrl39 // ioIn6 // this.ioIndicatorCtrl39.Desc = "OUT 10"; this.ioIndicatorCtrl39.IsOn = null; this.ioIndicatorCtrl39.Location = new System.Drawing.Point(145, 77); this.ioIndicatorCtrl39.Name = "ioIndicatorCtrl39"; this.ioIndicatorCtrl39.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl39.TabIndex = 4; this.ioIn6.Desc = "IN 6"; this.ioIn6.IsOn = null; this.ioIn6.Location = new System.Drawing.Point(145, 48); this.ioIn6.Name = "ioIn6"; this.ioIn6.Size = new System.Drawing.Size(90, 24); this.ioIn6.TabIndex = 4; // // ioIndicatorCtrl40 // ioIn5 // this.ioIndicatorCtrl40.Desc = "OUT 6"; this.ioIndicatorCtrl40.IsOn = null; this.ioIndicatorCtrl40.Location = new System.Drawing.Point(145, 48); this.ioIndicatorCtrl40.Name = "ioIndicatorCtrl40"; this.ioIndicatorCtrl40.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl40.TabIndex = 4; this.ioIn5.Desc = "IN 5"; this.ioIn5.IsOn = null; this.ioIn5.Location = new System.Drawing.Point(9, 48); this.ioIn5.Name = "ioIn5"; this.ioIn5.Size = new System.Drawing.Size(90, 24); this.ioIn5.TabIndex = 4; // // ioIndicatorCtrl41 // ioIn1 // this.ioIndicatorCtrl41.Desc = "OUT 5"; this.ioIndicatorCtrl41.IsOn = null; this.ioIndicatorCtrl41.Location = new System.Drawing.Point(9, 48); this.ioIndicatorCtrl41.Name = "ioIndicatorCtrl41"; this.ioIndicatorCtrl41.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl41.TabIndex = 4; this.ioIn1.Desc = "IN 1"; this.ioIn1.IsOn = null; this.ioIn1.Location = new System.Drawing.Point(9, 18); this.ioIn1.Name = "ioIn1"; this.ioIn1.Size = new System.Drawing.Size(90, 24); this.ioIn1.TabIndex = 4; // // ioIndicatorCtrl42 // timer1 // this.ioIndicatorCtrl42.Desc = "OUT 1"; this.ioIndicatorCtrl42.IsOn = null; this.ioIndicatorCtrl42.Location = new System.Drawing.Point(9, 18); this.ioIndicatorCtrl42.Name = "ioIndicatorCtrl42"; this.ioIndicatorCtrl42.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl42.TabIndex = 4; this.timer1.Enabled = true; this.timer1.Interval = 200; this.timer1.Tick += new System.EventHandler(this.RefreshIOStatus); // // CtrlMotionCardIOStatus // @@ -431,8 +439,8 @@ this.Name = "CtrlMotionCardIOStatus"; this.Size = new System.Drawing.Size(580, 288); this.tableLayoutPanel1.ResumeLayout(false); this.groupBox5.ResumeLayout(false); this.groupBox6.ResumeLayout(false); this.groupBoxIOOut.ResumeLayout(false); this.groupBoxIOIn.ResumeLayout(false); this.ResumeLayout(false); } @@ -440,39 +448,40 @@ #endregion private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.GroupBox groupBox5; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl14; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl13; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl12; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl26; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl25; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl24; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl17; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl16; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl20; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl19; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl23; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl22; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl21; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl18; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl15; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl11; private System.Windows.Forms.GroupBox groupBox6; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl27; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl28; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl29; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl30; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl31; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl32; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl33; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl34; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl35; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl36; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl37; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl38; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl39; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl40; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl41; private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl42; private System.Windows.Forms.GroupBox groupBoxIOIn; private Model.Winform.IOIndicatorCtrl ioIn4; private Model.Winform.IOIndicatorCtrl ioIn3; private Model.Winform.IOIndicatorCtrl ioIn2; private Model.Winform.IOIndicatorCtrl ioIn16; private Model.Winform.IOIndicatorCtrl ioIn15; private Model.Winform.IOIndicatorCtrl ioIn14; private Model.Winform.IOIndicatorCtrl ioIn13; private Model.Winform.IOIndicatorCtrl ioIn9; private Model.Winform.IOIndicatorCtrl ioIn8; private Model.Winform.IOIndicatorCtrl ioIn7; private Model.Winform.IOIndicatorCtrl ioIn12; private Model.Winform.IOIndicatorCtrl ioIn11; private Model.Winform.IOIndicatorCtrl ioIn10; private Model.Winform.IOIndicatorCtrl ioIn6; private Model.Winform.IOIndicatorCtrl ioIn5; private Model.Winform.IOIndicatorCtrl ioIn1; private System.Windows.Forms.GroupBox groupBoxIOOut; private Model.Winform.IOIndicatorCtrl ioOut4; private Model.Winform.IOIndicatorCtrl ioOut3; private Model.Winform.IOIndicatorCtrl ioOut2; private Model.Winform.IOIndicatorCtrl ioOut16; private Model.Winform.IOIndicatorCtrl ioOut15; private Model.Winform.IOIndicatorCtrl ioOut14; private Model.Winform.IOIndicatorCtrl ioOut13; private Model.Winform.IOIndicatorCtrl ioOut9; private Model.Winform.IOIndicatorCtrl ioOut8; private Model.Winform.IOIndicatorCtrl ioOut7; private Model.Winform.IOIndicatorCtrl ioOut12; private Model.Winform.IOIndicatorCtrl ioOut11; private Model.Winform.IOIndicatorCtrl ioOut10; private Model.Winform.IOIndicatorCtrl ioOut6; private Model.Winform.IOIndicatorCtrl ioOut5; private Model.Winform.IOIndicatorCtrl ioOut1; private System.Windows.Forms.Timer timer1; } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs
@@ -7,14 +7,51 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Bro.Common.Model; using Bro.UI.Model.Winform; using static Bro.Common.Helper.EnumHelper; namespace Bro.UI.Device.Winform { public partial class CtrlMotionCardIOStatus : UserControl { public List<IOItem> _monitorValues { get; set; } public CtrlMotionCardIOStatus() { InitializeComponent(); } public CtrlMotionCardIOStatus(List<IOItem> monitorValues) { InitializeComponent(); _monitorValues = monitorValues; } private void RefreshIOStatus(object sender, EventArgs e) { foreach (var ioItem in _monitorValues) { if (ioItem.IOType == Common.Helper.EnumHelper.IOType.INPUT) { var ioInArray = groupBoxIOIn.Controls.Find("ioIn" + ioItem.IONum, false); if (ioInArray != null && ioInArray.Length == 1) { var ioIn = ioInArray[0] as IOIndicatorCtrl; ioIn.IsOn = ioItem.Value == IOValue.TRUE; } } else { var ioOutArray = groupBoxIOOut.Controls.Find("ioOut" + ioItem.IONum, false); if (ioOutArray != null && ioOutArray.Length == 1) { var ioOut = ioOutArray[0] as IOIndicatorCtrl; ioOut.IsOn = ioItem.Value == IOValue.TRUE; } } } } } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.resx
@@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.Designer.cs
@@ -33,6 +33,7 @@ this.listBoxMsg = new System.Windows.Forms.ListBox(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.buttonMotionCardOperation = new System.Windows.Forms.Button(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.tableLayoutPanel1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -44,6 +45,7 @@ this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 3); this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1); this.tableLayoutPanel1.Controls.Add(this.buttonMotionCardOperation, 0, 0); this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 2); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -52,6 +54,7 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 110F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(615, 587); this.tableLayoutPanel1.TabIndex = 5; // @@ -95,6 +98,14 @@ this.buttonMotionCardOperation.UseVisualStyleBackColor = true; this.buttonMotionCardOperation.Click += new System.EventHandler(this.buttonMotionCardOperation_Click); // // flowLayoutPanel2 // this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 256); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; this.flowLayoutPanel2.Size = new System.Drawing.Size(609, 217); this.flowLayoutPanel2.TabIndex = 13; // // CtrlMotionCardRunBase // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -114,5 +125,6 @@ private System.Windows.Forms.ListBox listBoxMsg; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Button buttonMotionCardOperation; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; } } src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs
@@ -25,18 +25,6 @@ Device = device; InitialLayout(); MotionCard.OnMonitorInvoke += MotionCard_OnMonitorInvoke; //CvImage = new Canvas(); //CvImage.IsShowElementList = false; //CvImage.IsShowROITool = false; //CvImage.Dock = DockStyle.Fill; //Controls.Add(CvImage); //Camera.OnImageUpdated += Camera_UpdateShowImage; //Camera.OnElementsUpdated += Camera_OnElementsUpdated; //Camera.OnCameraOpModeChanged += Camera_OnCameraOpModeChanged; //InitialToolBarVisible(); } private void MotionCard_OnMonitorInvoke(DateTime arg1, string arg2, IDevice arg3, IMonitorSet arg4) @@ -46,7 +34,19 @@ private void InitialLayout() { foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled)) { var axisMovingStatus = MotionCard.AxisMovingOptionValues.FirstOrDefault(u=>u.AxisIndex== axisConfig.AxisIndex); if (axisMovingStatus!=null) { CtrlMotionCardAxisStatus ctrlMotionCardAxisStatus = new CtrlMotionCardAxisStatus(axisMovingStatus); ctrlMotionCardAxisStatus.Dock = DockStyle.Fill; flowLayoutPanel1.Controls.Add(ctrlMotionCardAxisStatus); } } CtrlMotionCardIOStatus ctrlMotionCardIOStatus = new CtrlMotionCardIOStatus(); flowLayoutPanel2.Controls.Add(ctrlMotionCardIOStatus); } public IDevice Device { get; set; } @@ -61,5 +61,6 @@ FrmMotionCardOperationBase motionCardOperationBase = new FrmMotionCardOperationBase(Device); motionCardOperationBase.Show(); } } } src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.Designer.cs
@@ -32,6 +32,7 @@ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.groupBoxPara = new System.Windows.Forms.GroupBox(); @@ -45,6 +46,7 @@ this.buttonPositionReset = new System.Windows.Forms.Button(); this.tableLayoutPanel1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.groupBoxPara.SuspendLayout(); @@ -77,6 +79,7 @@ // // tabPage1 // this.tabPage1.Controls.Add(this.flowLayoutPanel1); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); @@ -84,6 +87,14 @@ this.tabPage1.TabIndex = 0; this.tabPage1.Text = "快捷操作"; this.tabPage1.UseVisualStyleBackColor = true; // // flowLayoutPanel1 // this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Size = new System.Drawing.Size(464, 643); this.flowLayoutPanel1.TabIndex = 0; // // tabPage2 // @@ -163,6 +174,7 @@ this.btnStart.Text = " 启 动"; this.btnStart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.btnStart.UseVisualStyleBackColor = true; this.btnStart.Click += new System.EventHandler(this.btnStart_Click); // // buttonClearStatus // @@ -172,6 +184,7 @@ this.buttonClearStatus.TabIndex = 4; this.buttonClearStatus.Text = "清除状态"; this.buttonClearStatus.UseVisualStyleBackColor = true; this.buttonClearStatus.Click += new System.EventHandler(this.buttonClearStatus_Click); // // buttonEmergencyStop // @@ -181,6 +194,7 @@ this.buttonEmergencyStop.TabIndex = 4; this.buttonEmergencyStop.Text = "紧急停止"; this.buttonEmergencyStop.UseVisualStyleBackColor = true; this.buttonEmergencyStop.Click += new System.EventHandler(this.buttonEmergencyStop_Click); // // buttonServoEnable // @@ -190,6 +204,7 @@ this.buttonServoEnable.TabIndex = 4; this.buttonServoEnable.Text = "伺服使能"; this.buttonServoEnable.UseVisualStyleBackColor = true; this.buttonServoEnable.Click += new System.EventHandler(this.buttonServoEnable_Click); // // buttonSmoothStop // @@ -199,6 +214,7 @@ this.buttonSmoothStop.TabIndex = 4; this.buttonSmoothStop.Text = "平滑停止"; this.buttonSmoothStop.UseVisualStyleBackColor = true; this.buttonSmoothStop.Click += new System.EventHandler(this.buttonSmoothStop_Click); // // buttonPositionReset // @@ -208,6 +224,7 @@ this.buttonPositionReset.TabIndex = 4; this.buttonPositionReset.Text = "位置清零"; this.buttonPositionReset.UseVisualStyleBackColor = true; this.buttonPositionReset.Click += new System.EventHandler(this.buttonPositionReset_Click); // // FrmMotionCardOperationBase // @@ -218,6 +235,7 @@ this.Name = "FrmMotionCardOperationBase"; this.tableLayoutPanel1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); this.groupBoxPara.ResumeLayout(false); @@ -243,5 +261,6 @@ private System.Windows.Forms.Button buttonPositionReset; private System.Windows.Forms.GroupBox groupBoxPara; private System.Windows.Forms.PropertyGrid propGrid; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; } } src/Bro.UI.Device.Winform/MotionCard/FrmMotionCardOperationBase.cs
@@ -3,6 +3,7 @@ using Bro.Common.Interface; using Bro.Common.Model; using System; using System.Linq; using System.Windows.Forms; namespace Bro.UI.Device.Winform @@ -32,38 +33,20 @@ InitializeComponent(); Device = device; MotionCardOperationConfig = new MotionCardOperationConfigBase(); InitialLayout(); } MovingOption movingConfig = null; #region ILogoutput public Action<LogMsg> OnLogMsgOutput { get; set; } public void LogDisplay(LogMsg msg) private void InitialLayout() { foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled)) { var axisMovingStatus = MotionCard.AxisMovingOptionValues.FirstOrDefault(u => u.AxisIndex == axisConfig.AxisIndex); if (axisMovingStatus != null) { CtrlMotionCardAxisOperation axisOperation = new CtrlMotionCardAxisOperation(axisMovingStatus.AxisIndex, axisMovingStatus.AxisName); axisOperation.Dock = DockStyle.Fill; flowLayoutPanel1.Controls.Add(axisOperation); } #endregion private void RadioButton_CheckedChanged(object sender, EventArgs e) { //加载对应运动的 movingConfig //if (radioP2P.Checked) //{ // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Normal); //} //else if (radioJog.Checked) //{ // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Jog); //} //else if (radioGoHome.Checked) //{ // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.FindOri); //} propGrid.SelectedObject = movingConfig; } } private void buttonClearStatus_Click(object sender, EventArgs e)