领胜LDS 键盘AOI检测项目
wells.liu
2020-07-11 edc37f77fa57f8923ba28c5c84c29985ea555de8
界面修改
3个文件已修改
99 ■■■■■ 已修改文件
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs
@@ -140,11 +140,11 @@
            // 
            // textBoxP2PVel
            // 
            this.textBoxP2PVel.Location = new System.Drawing.Point(154, 34);
            this.textBoxP2PVel.Location = new System.Drawing.Point(340, 7);
            this.textBoxP2PVel.Name = "textBoxP2PVel";
            this.textBoxP2PVel.Size = new System.Drawing.Size(116, 21);
            this.textBoxP2PVel.TabIndex = 5;
            this.textBoxP2PVel.Text = "10";
            this.textBoxP2PVel.Text = "50";
            // 
            // textBoxP2PPrfPosition
            // 
@@ -164,7 +164,7 @@
            // 
            // textBoxP2PAcc
            // 
            this.textBoxP2PAcc.Location = new System.Drawing.Point(340, 4);
            this.textBoxP2PAcc.Location = new System.Drawing.Point(154, 35);
            this.textBoxP2PAcc.Name = "textBoxP2PAcc";
            this.textBoxP2PAcc.Size = new System.Drawing.Size(116, 21);
            this.textBoxP2PAcc.TabIndex = 5;
@@ -173,7 +173,7 @@
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(92, 37);
            this.label7.Location = new System.Drawing.Point(278, 10);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(41, 12);
            this.label7.TabIndex = 4;
@@ -186,7 +186,7 @@
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(65, 12);
            this.label6.TabIndex = 4;
            this.label6.Text = "规划位置:";
            this.label6.Text = "目标位置:";
            // 
            // label9
            // 
@@ -200,7 +200,7 @@
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(278, 7);
            this.label8.Location = new System.Drawing.Point(92, 38);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(53, 12);
            this.label8.TabIndex = 4;
@@ -236,7 +236,7 @@
            // 
            // textBoxJogDec
            // 
            this.textBoxJogDec.Location = new System.Drawing.Point(340, 4);
            this.textBoxJogDec.Location = new System.Drawing.Point(340, 34);
            this.textBoxJogDec.Name = "textBoxJogDec";
            this.textBoxJogDec.Size = new System.Drawing.Size(116, 21);
            this.textBoxJogDec.TabIndex = 5;
@@ -264,7 +264,7 @@
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(278, 7);
            this.label5.Location = new System.Drawing.Point(278, 37);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(53, 12);
            this.label5.TabIndex = 4;
@@ -276,7 +276,7 @@
            this.textBoxJogVel.Name = "textBoxJogVel";
            this.textBoxJogVel.Size = new System.Drawing.Size(116, 21);
            this.textBoxJogVel.TabIndex = 5;
            this.textBoxJogVel.Text = "5";
            this.textBoxJogVel.Text = "50";
            // 
            // label4
            // 
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs
@@ -38,11 +38,9 @@
            this.ioIndicatorCtrl1 = new Bro.UI.Model.Winform.IOIndicatorCtrl();
            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.timerAxisStatus = new System.Windows.Forms.Timer(this.components);
            this.groupBoxAxisStatus.SuspendLayout();
@@ -58,16 +56,14 @@
            this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl1);
            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);
            this.groupBoxAxisStatus.Controls.Add(this.label2);
            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(440, 148);
            this.groupBoxAxisStatus.Size = new System.Drawing.Size(440, 111);
            this.groupBoxAxisStatus.TabIndex = 5;
            this.groupBoxAxisStatus.TabStop = false;
            this.groupBoxAxisStatus.Text = "轴状态";
@@ -76,7 +72,7 @@
            // 
            this.ioIndicatorCtrl2.Desc = "伺服使能";
            this.ioIndicatorCtrl2.IsOn = null;
            this.ioIndicatorCtrl2.Location = new System.Drawing.Point(344, 22);
            this.ioIndicatorCtrl2.Location = new System.Drawing.Point(223, 22);
            this.ioIndicatorCtrl2.Name = "ioIndicatorCtrl2";
            this.ioIndicatorCtrl2.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl2.TabIndex = 4;
@@ -85,7 +81,7 @@
            // 
            this.ioIndicatorCtrl10.Desc = "运动出错";
            this.ioIndicatorCtrl10.IsOn = null;
            this.ioIndicatorCtrl10.Location = new System.Drawing.Point(223, 82);
            this.ioIndicatorCtrl10.Location = new System.Drawing.Point(223, 75);
            this.ioIndicatorCtrl10.Name = "ioIndicatorCtrl10";
            this.ioIndicatorCtrl10.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl10.TabIndex = 4;
@@ -94,7 +90,7 @@
            // 
            this.ioIndicatorCtrl9.Desc = "运动状态";
            this.ioIndicatorCtrl9.IsOn = null;
            this.ioIndicatorCtrl9.Location = new System.Drawing.Point(223, 112);
            this.ioIndicatorCtrl9.Location = new System.Drawing.Point(223, 48);
            this.ioIndicatorCtrl9.Name = "ioIndicatorCtrl9";
            this.ioIndicatorCtrl9.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl9.TabIndex = 4;
@@ -103,7 +99,7 @@
            // 
            this.ioIndicatorCtrl8.Desc = "负限位";
            this.ioIndicatorCtrl8.IsOn = null;
            this.ioIndicatorCtrl8.Location = new System.Drawing.Point(344, 52);
            this.ioIndicatorCtrl8.Location = new System.Drawing.Point(344, 48);
            this.ioIndicatorCtrl8.Name = "ioIndicatorCtrl8";
            this.ioIndicatorCtrl8.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl8.TabIndex = 4;
@@ -112,7 +108,7 @@
            // 
            this.ioIndicatorCtrl6.Desc = "正限位";
            this.ioIndicatorCtrl6.IsOn = null;
            this.ioIndicatorCtrl6.Location = new System.Drawing.Point(223, 52);
            this.ioIndicatorCtrl6.Location = new System.Drawing.Point(344, 19);
            this.ioIndicatorCtrl6.Name = "ioIndicatorCtrl6";
            this.ioIndicatorCtrl6.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl6.TabIndex = 4;
@@ -121,14 +117,14 @@
            // 
            this.ioIndicatorCtrl1.Desc = "驱动报警";
            this.ioIndicatorCtrl1.IsOn = null;
            this.ioIndicatorCtrl1.Location = new System.Drawing.Point(223, 22);
            this.ioIndicatorCtrl1.Location = new System.Drawing.Point(344, 75);
            this.ioIndicatorCtrl1.Name = "ioIndicatorCtrl1";
            this.ioIndicatorCtrl1.Size = new System.Drawing.Size(90, 24);
            this.ioIndicatorCtrl1.TabIndex = 4;
            // 
            // textBoxCurVel
            // 
            this.textBoxCurVel.Location = new System.Drawing.Point(76, 113);
            this.textBoxCurVel.Location = new System.Drawing.Point(76, 79);
            this.textBoxCurVel.Name = "textBoxCurVel";
            this.textBoxCurVel.ReadOnly = true;
            this.textBoxCurVel.Size = new System.Drawing.Size(116, 21);
@@ -136,23 +132,15 @@
            // 
            // textBoxPrfVel
            // 
            this.textBoxPrfVel.Location = new System.Drawing.Point(76, 84);
            this.textBoxPrfVel.Location = new System.Drawing.Point(76, 50);
            this.textBoxPrfVel.Name = "textBoxPrfVel";
            this.textBoxPrfVel.ReadOnly = true;
            this.textBoxPrfVel.Size = new System.Drawing.Size(116, 21);
            this.textBoxPrfVel.TabIndex = 3;
            // 
            // textBoxCurPosition
            //
            this.textBoxCurPosition.Location = new System.Drawing.Point(76, 55);
            this.textBoxCurPosition.Name = "textBoxCurPosition";
            this.textBoxCurPosition.ReadOnly = true;
            this.textBoxCurPosition.Size = new System.Drawing.Size(116, 21);
            this.textBoxCurPosition.TabIndex = 3;
            //
            // textBoxPrfPositon
            // 
            this.textBoxPrfPositon.Location = new System.Drawing.Point(76, 23);
            this.textBoxPrfPositon.Location = new System.Drawing.Point(76, 22);
            this.textBoxPrfPositon.Name = "textBoxPrfPositon";
            this.textBoxPrfPositon.ReadOnly = true;
            this.textBoxPrfPositon.Size = new System.Drawing.Size(116, 21);
@@ -161,7 +149,7 @@
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(14, 116);
            this.label5.Location = new System.Drawing.Point(14, 82);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(65, 12);
            this.label5.TabIndex = 2;
@@ -170,29 +158,20 @@
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(14, 87);
            this.label4.Location = new System.Drawing.Point(14, 53);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(65, 12);
            this.label4.TabIndex = 2;
            this.label4.Text = "规划速度:";
            // 
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(14, 58);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(65, 12);
            this.label3.TabIndex = 2;
            this.label3.Text = "实际位置:";
            //
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(14, 26);
            this.label2.Location = new System.Drawing.Point(14, 25);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(65, 12);
            this.label2.TabIndex = 2;
            this.label2.Text = "规划位置:";
            this.label2.Text = "目标位置:";
            // 
            // timerAxisStatus
            // 
@@ -206,7 +185,7 @@
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.groupBoxAxisStatus);
            this.Name = "CtrlMotionCardAxisStatus";
            this.Size = new System.Drawing.Size(440, 148);
            this.Size = new System.Drawing.Size(440, 111);
            this.groupBoxAxisStatus.ResumeLayout(false);
            this.groupBoxAxisStatus.PerformLayout();
            this.ResumeLayout(false);
@@ -224,11 +203,9 @@
        private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl1;
        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 timerAxisStatus;
    }
src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs
@@ -24,8 +24,8 @@
        private int _axisIndex { get; set; }
        private string _axisName { get; set; }
        public AxisMovingStatus _axisMovingStatus = new AxisMovingStatus();
        public CtrlMotionCardAxisStatus(IDevice device,int axisIndex,string axisName)
        public AxisMovingStatus _axisMovingStatus;
        public CtrlMotionCardAxisStatus(IDevice device, int axisIndex, string axisName)
        {
            InitializeComponent();
            Device = device;
@@ -37,19 +37,21 @@
        private void RefreshStatus(object sender, EventArgs e)
        {
            _axisMovingStatus = MotionCard.AxisStatusList.FirstOrDefault(u => u.AxisIndex == _axisIndex);
            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;
            if (_axisMovingStatus != null)
            {
                textBoxPrfPositon.Text = _axisMovingStatus.Destination.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;//运动出错
                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;//运动出错
            }
        }
    }
}