Commit 958b95f7 LN

1

1 个父辈 6c12ac94
......@@ -54,19 +54,19 @@
this.btnComMove = new System.Windows.Forms.Button();
this.txtComSpeed = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.lblSpeed = new System.Windows.Forms.Label();
this.btnCCopy = new System.Windows.Forms.Button();
this.btnICopy = new System.Windows.Forms.Button();
this.btnUCopy = new System.Windows.Forms.Button();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.btnMCopy = new System.Windows.Forms.Button();
this.btnUCopy = new System.Windows.Forms.Button();
this.btnICopy = new System.Windows.Forms.Button();
this.btnCCopy = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(39, 77);
this.label1.Location = new System.Drawing.Point(39, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 17);
this.label1.TabIndex = 0;
......@@ -75,7 +75,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(39, 131);
this.label2.Location = new System.Drawing.Point(39, 136);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 17);
this.label2.TabIndex = 1;
......@@ -84,7 +84,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(39, 184);
this.label3.Location = new System.Drawing.Point(39, 194);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 17);
this.label3.TabIndex = 2;
......@@ -94,9 +94,10 @@
//
this.btnMiddleMove.BackColor = System.Drawing.SystemColors.Control;
this.btnMiddleMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMove.Location = new System.Drawing.Point(254, 70);
this.btnMiddleMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMove.Location = new System.Drawing.Point(246, 65);
this.btnMiddleMove.Name = "btnMiddleMove";
this.btnMiddleMove.Size = new System.Drawing.Size(131, 36);
this.btnMiddleMove.Size = new System.Drawing.Size(140, 45);
this.btnMiddleMove.TabIndex = 4;
this.btnMiddleMove.Text = "旋转轴+(顺时针)";
this.btnMiddleMove.UseVisualStyleBackColor = false;
......@@ -106,34 +107,41 @@
// txtMiddleSpeed
//
this.txtMiddleSpeed.Enabled = false;
this.txtMiddleSpeed.Location = new System.Drawing.Point(150, 75);
this.txtMiddleSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleSpeed.Location = new System.Drawing.Point(140, 74);
this.txtMiddleSpeed.MaxLength = 10;
this.txtMiddleSpeed.Name = "txtMiddleSpeed";
this.txtMiddleSpeed.Size = new System.Drawing.Size(89, 23);
this.txtMiddleSpeed.Size = new System.Drawing.Size(97, 26);
this.txtMiddleSpeed.TabIndex = 5;
//
// txtUpDownSpeed
//
this.txtUpDownSpeed.Enabled = false;
this.txtUpDownSpeed.Location = new System.Drawing.Point(150, 129);
this.txtUpDownSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownSpeed.Location = new System.Drawing.Point(140, 131);
this.txtUpDownSpeed.MaxLength = 10;
this.txtUpDownSpeed.Name = "txtUpDownSpeed";
this.txtUpDownSpeed.Size = new System.Drawing.Size(89, 23);
this.txtUpDownSpeed.Size = new System.Drawing.Size(97, 26);
this.txtUpDownSpeed.TabIndex = 6;
//
// txtInOutSpeed
//
this.txtInOutSpeed.Enabled = false;
this.txtInOutSpeed.Location = new System.Drawing.Point(150, 182);
this.txtInOutSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutSpeed.Location = new System.Drawing.Point(140, 189);
this.txtInOutSpeed.MaxLength = 10;
this.txtInOutSpeed.Name = "txtInOutSpeed";
this.txtInOutSpeed.Size = new System.Drawing.Size(89, 23);
this.txtInOutSpeed.Size = new System.Drawing.Size(97, 26);
this.txtInOutSpeed.TabIndex = 7;
//
// btnUpDownMove
//
this.btnUpDownMove.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMove.Location = new System.Drawing.Point(254, 124);
this.btnUpDownMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMove.Location = new System.Drawing.Point(246, 122);
this.btnUpDownMove.Name = "btnUpDownMove";
this.btnUpDownMove.Size = new System.Drawing.Size(131, 36);
this.btnUpDownMove.Size = new System.Drawing.Size(140, 45);
this.btnUpDownMove.TabIndex = 9;
this.btnUpDownMove.Text = "升降轴+(上升)";
this.btnUpDownMove.UseVisualStyleBackColor = false;
......@@ -144,9 +152,10 @@
//
this.btnInOutMove.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMove.Location = new System.Drawing.Point(254, 177);
this.btnInOutMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMove.Location = new System.Drawing.Point(246, 180);
this.btnInOutMove.Name = "btnInOutMove";
this.btnInOutMove.Size = new System.Drawing.Size(131, 36);
this.btnInOutMove.Size = new System.Drawing.Size(140, 45);
this.btnInOutMove.TabIndex = 10;
this.btnInOutMove.Text = "进出轴+(前进)";
this.btnInOutMove.UseVisualStyleBackColor = false;
......@@ -157,9 +166,10 @@
//
this.btnInOutMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMovej.Location = new System.Drawing.Point(389, 177);
this.btnInOutMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMovej.Location = new System.Drawing.Point(395, 180);
this.btnInOutMovej.Name = "btnInOutMovej";
this.btnInOutMovej.Size = new System.Drawing.Size(131, 36);
this.btnInOutMovej.Size = new System.Drawing.Size(140, 45);
this.btnInOutMovej.TabIndex = 14;
this.btnInOutMovej.Text = "进出轴-(后退)";
this.btnInOutMovej.UseVisualStyleBackColor = false;
......@@ -170,9 +180,10 @@
//
this.btnUpDownMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMovej.Location = new System.Drawing.Point(389, 124);
this.btnUpDownMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMovej.Location = new System.Drawing.Point(395, 122);
this.btnUpDownMovej.Name = "btnUpDownMovej";
this.btnUpDownMovej.Size = new System.Drawing.Size(131, 36);
this.btnUpDownMovej.Size = new System.Drawing.Size(140, 45);
this.btnUpDownMovej.TabIndex = 13;
this.btnUpDownMovej.Text = "升降轴-(下降)";
this.btnUpDownMovej.UseVisualStyleBackColor = false;
......@@ -183,9 +194,10 @@
//
this.btnMiddleMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnMiddleMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMovej.Location = new System.Drawing.Point(389, 70);
this.btnMiddleMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMovej.Location = new System.Drawing.Point(395, 65);
this.btnMiddleMovej.Name = "btnMiddleMovej";
this.btnMiddleMovej.Size = new System.Drawing.Size(131, 36);
this.btnMiddleMovej.Size = new System.Drawing.Size(140, 45);
this.btnMiddleMovej.TabIndex = 12;
this.btnMiddleMovej.Text = "旋转轴-(逆时针)";
this.btnMiddleMovej.UseVisualStyleBackColor = false;
......@@ -195,7 +207,7 @@
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(533, 330);
this.button1.Location = new System.Drawing.Point(569, 347);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 16;
......@@ -206,31 +218,37 @@
// txtInOutPosition
//
this.txtInOutPosition.Enabled = false;
this.txtInOutPosition.Location = new System.Drawing.Point(534, 182);
this.txtInOutPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutPosition.Location = new System.Drawing.Point(544, 189);
this.txtInOutPosition.MaxLength = 20;
this.txtInOutPosition.Name = "txtInOutPosition";
this.txtInOutPosition.Size = new System.Drawing.Size(108, 23);
this.txtInOutPosition.Size = new System.Drawing.Size(108, 26);
this.txtInOutPosition.TabIndex = 19;
//
// txtUpdownPosition
//
this.txtUpdownPosition.Enabled = false;
this.txtUpdownPosition.Location = new System.Drawing.Point(534, 129);
this.txtUpdownPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpdownPosition.Location = new System.Drawing.Point(544, 131);
this.txtUpdownPosition.MaxLength = 20;
this.txtUpdownPosition.Name = "txtUpdownPosition";
this.txtUpdownPosition.Size = new System.Drawing.Size(108, 23);
this.txtUpdownPosition.Size = new System.Drawing.Size(108, 26);
this.txtUpdownPosition.TabIndex = 18;
//
// txtMiddlePosition
//
this.txtMiddlePosition.Enabled = false;
this.txtMiddlePosition.Location = new System.Drawing.Point(534, 75);
this.txtMiddlePosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddlePosition.Location = new System.Drawing.Point(544, 74);
this.txtMiddlePosition.MaxLength = 20;
this.txtMiddlePosition.Name = "txtMiddlePosition";
this.txtMiddlePosition.Size = new System.Drawing.Size(108, 23);
this.txtMiddlePosition.Size = new System.Drawing.Size(108, 26);
this.txtMiddlePosition.TabIndex = 17;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(166, 31);
this.label5.Location = new System.Drawing.Point(172, 31);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 20;
......@@ -239,7 +257,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(554, 31);
this.label6.Location = new System.Drawing.Point(566, 31);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 21;
......@@ -253,18 +271,21 @@
// txtComPosition
//
this.txtComPosition.Enabled = false;
this.txtComPosition.Location = new System.Drawing.Point(534, 240);
this.txtComPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComPosition.Location = new System.Drawing.Point(544, 249);
this.txtComPosition.MaxLength = 20;
this.txtComPosition.Name = "txtComPosition";
this.txtComPosition.Size = new System.Drawing.Size(108, 23);
this.txtComPosition.Size = new System.Drawing.Size(108, 26);
this.txtComPosition.TabIndex = 26;
//
// btnComMovej
//
this.btnComMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnComMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMovej.Location = new System.Drawing.Point(389, 235);
this.btnComMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMovej.Location = new System.Drawing.Point(395, 240);
this.btnComMovej.Name = "btnComMovej";
this.btnComMovej.Size = new System.Drawing.Size(131, 36);
this.btnComMovej.Size = new System.Drawing.Size(140, 45);
this.btnComMovej.TabIndex = 25;
this.btnComMovej.Text = "压紧轴-(向上)";
this.btnComMovej.UseVisualStyleBackColor = false;
......@@ -275,9 +296,10 @@
//
this.btnComMove.BackColor = System.Drawing.SystemColors.Control;
this.btnComMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMove.Location = new System.Drawing.Point(254, 235);
this.btnComMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMove.Location = new System.Drawing.Point(246, 240);
this.btnComMove.Name = "btnComMove";
this.btnComMove.Size = new System.Drawing.Size(131, 36);
this.btnComMove.Size = new System.Drawing.Size(140, 45);
this.btnComMove.TabIndex = 24;
this.btnComMove.Text = "压紧轴+(向下)";
this.btnComMove.UseVisualStyleBackColor = false;
......@@ -287,90 +309,91 @@
// txtComSpeed
//
this.txtComSpeed.Enabled = false;
this.txtComSpeed.Location = new System.Drawing.Point(150, 240);
this.txtComSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComSpeed.Location = new System.Drawing.Point(140, 249);
this.txtComSpeed.MaxLength = 10;
this.txtComSpeed.Name = "txtComSpeed";
this.txtComSpeed.Size = new System.Drawing.Size(89, 23);
this.txtComSpeed.Size = new System.Drawing.Size(97, 26);
this.txtComSpeed.TabIndex = 23;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(39, 242);
this.label4.Location = new System.Drawing.Point(39, 254);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 17);
this.label4.TabIndex = 22;
this.label4.Text = "(轴四)压紧轴";
//
// lblSpeed
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Location = new System.Drawing.Point(313, 377);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(142, 17);
this.lblSpeed.TabIndex = 30;
this.lblSpeed.Text = "点动速度=0.2倍目标速度";
//
// trackBar1
//
this.trackBar1.LargeChange = 2;
this.trackBar1.Location = new System.Drawing.Point(53, 322);
this.trackBar1.Location = new System.Drawing.Point(42, 328);
this.trackBar1.Minimum = 1;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(366, 45);
this.trackBar1.TabIndex = 27;
this.trackBar1.TabIndex = 29;
this.trackBar1.Value = 2;
this.trackBar1.Scroll += new System.EventHandler(this.trackBar1_Scroll);
this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
//
// lblSpeed
// btnMCopy
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Location = new System.Drawing.Point(324, 374);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(142, 17);
this.lblSpeed.TabIndex = 28;
this.lblSpeed.Text = "点动速度=0.2倍目标速度";
this.btnMCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMCopy.Location = new System.Drawing.Point(661, 73);
this.btnMCopy.Name = "btnMCopy";
this.btnMCopy.Size = new System.Drawing.Size(69, 28);
this.btnMCopy.TabIndex = 31;
this.btnMCopy.Text = "复制";
this.btnMCopy.UseVisualStyleBackColor = true;
this.btnMCopy.Click += new System.EventHandler(this.btnMCopy_Click);
//
// btnCCopy
// btnUCopy
//
this.btnCCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCCopy.Location = new System.Drawing.Point(653, 237);
this.btnCCopy.Name = "btnCCopy";
this.btnCCopy.Size = new System.Drawing.Size(69, 28);
this.btnCCopy.TabIndex = 38;
this.btnCCopy.Text = "复制";
this.btnCCopy.UseVisualStyleBackColor = true;
this.btnCCopy.Click += new System.EventHandler(this.btnCCopy_Click);
this.btnUCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUCopy.Location = new System.Drawing.Point(661, 130);
this.btnUCopy.Name = "btnUCopy";
this.btnUCopy.Size = new System.Drawing.Size(69, 28);
this.btnUCopy.TabIndex = 32;
this.btnUCopy.Text = "复制";
this.btnUCopy.UseVisualStyleBackColor = true;
this.btnUCopy.Click += new System.EventHandler(this.btnUCopy_Click);
//
// btnICopy
//
this.btnICopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnICopy.Location = new System.Drawing.Point(653, 179);
this.btnICopy.Location = new System.Drawing.Point(661, 188);
this.btnICopy.Name = "btnICopy";
this.btnICopy.Size = new System.Drawing.Size(69, 28);
this.btnICopy.TabIndex = 37;
this.btnICopy.TabIndex = 33;
this.btnICopy.Text = "复制";
this.btnICopy.UseVisualStyleBackColor = true;
this.btnICopy.Click += new System.EventHandler(this.btnICopy_Click);
//
// btnUCopy
//
this.btnUCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUCopy.Location = new System.Drawing.Point(653, 128);
this.btnUCopy.Name = "btnUCopy";
this.btnUCopy.Size = new System.Drawing.Size(69, 28);
this.btnUCopy.TabIndex = 36;
this.btnUCopy.Text = "复制";
this.btnUCopy.UseVisualStyleBackColor = true;
this.btnUCopy.Click += new System.EventHandler(this.btnUCopy_Click);
//
// btnMCopy
// btnCCopy
//
this.btnMCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMCopy.Location = new System.Drawing.Point(653, 73);
this.btnMCopy.Name = "btnMCopy";
this.btnMCopy.Size = new System.Drawing.Size(69, 28);
this.btnMCopy.TabIndex = 35;
this.btnMCopy.Text = "复制";
this.btnMCopy.UseVisualStyleBackColor = true;
this.btnMCopy.Click += new System.EventHandler(this.btnMCopy_Click);
this.btnCCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCCopy.Location = new System.Drawing.Point(661, 248);
this.btnCCopy.Name = "btnCCopy";
this.btnCCopy.Size = new System.Drawing.Size(69, 28);
this.btnCCopy.TabIndex = 34;
this.btnCCopy.Text = "复制";
this.btnCCopy.UseVisualStyleBackColor = true;
this.btnCCopy.Click += new System.EventHandler(this.btnCCopy_Click);
//
// FrmAxisDebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(765, 413);
this.ClientSize = new System.Drawing.Size(805, 442);
this.Controls.Add(this.btnCCopy);
this.Controls.Add(this.btnICopy);
this.Controls.Add(this.btnUCopy);
......@@ -439,11 +462,11 @@
private System.Windows.Forms.Button btnComMove;
private System.Windows.Forms.TextBox txtComSpeed;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TrackBar trackBar1;
private System.Windows.Forms.Label lblSpeed;
private System.Windows.Forms.Button btnCCopy;
private System.Windows.Forms.Button btnICopy;
private System.Windows.Forms.Button btnUCopy;
private System.Windows.Forms.TrackBar trackBar1;
private System.Windows.Forms.Button btnMCopy;
private System.Windows.Forms.Button btnUCopy;
private System.Windows.Forms.Button btnICopy;
private System.Windows.Forms.Button btnCCopy;
}
}
\ No newline at end of file
此文件的差异太大,无法显示。
......@@ -47,12 +47,7 @@ namespace OnlineStore.ACPackingStore
return;
}
this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name;
//txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString();
cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList);
cmbAxisList.DisplayMember = "Explain";
cmbAxisList.ValueMember = "Explain";
cmbAxisList.SelectedIndex = 0;
this.Text = BoxBean.Name;
ACBoxPosition ktkPosition = null;
if (BoxBean.PositionNumList.Count > 0)
......@@ -157,26 +152,26 @@ namespace OnlineStore.ACPackingStore
lblTemp.Text = BoxBean.currTempStr;
// lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString() ;
//忙碌状态不读取状态
if (!BoxBean.storeRunStatus.Equals(StoreRunStatus.Busy))
{
if (chbAutoRead.Checked)
{
string portName = GetPortName();
int SlvAddr = GetSlaveAddr();
//判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{
txtServoStatue.Text = "✔";
int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
lblCountPulse.Text = string.Format("{0:d}", lCountPulse);
}
else
{
txtServoStatue.Text = "✘";
}
}
}
//if (!BoxBean.storeRunStatus.Equals(StoreRunStatus.Busy))
//{
// if (chbAutoRead.Checked)
// {
// string portName = GetPortName();
// int SlvAddr = GetSlaveAddr();
// //判断私服是否打开、
// if (ACServerManager.ServerOnStatus(portName, SlvAddr))
// {
// txtServoStatue.Text = "✔";
// int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
// lblCountPulse.Text = string.Format("{0:d}", lCountPulse);
// }
// else
// {
// txtServoStatue.Text = "✘";
// }
// }
//}
//ReadPosistion();
if (BoxBean.storeRunStatus > StoreRunStatus.Wait)
......@@ -285,63 +280,7 @@ namespace OnlineStore.ACPackingStore
btnStartAuTo.Text = "开始自动出入库";
}
}
private void ReadPosistion()
{
string portName = GetPortName();
int SlvAddr = GetSlaveAddr();
//判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{
txtServoStatue.Text = "✔";
}
else
{
txtServoStatue.Text = "✘";
}
string deviceName = GetPortName();
if (ACServerManager.ServerOnStatus(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue()))
{
axis_1_Alarm.IOValue = ACServerManager.GetAlarmStatus(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue());
axis_1_Alarm.ShowData();
int lOutPulse1 = ACServerManager.GetTargetPosition(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue());
lblOutPulse1.Text = string.Format("{0:d}", lOutPulse1);
int lCountPulse1 = ACServerManager.GetActualtPosition(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue());
lblCountPulse1.Text = string.Format("{0:d}", lCountPulse1);
txtMiddleTarget.Text = BoxBean.Config.Middle_Axis.TargetPosition.ToString();
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr))
{
lblCountPulse.Text = lblCountPulse1.Text;
}
}
if (ACServerManager.ServerOnStatus(BoxBean.Config.UpDown_Axis.DeviceName, BoxBean.Config.UpDown_Axis.GetAxisValue()))
{
axis_2_Alarm.IOValue = ACServerManager.GetAlarmStatus(BoxBean.Config.UpDown_Axis.DeviceName, BoxBean.Config.UpDown_Axis.GetAxisValue());
axis_2_Alarm.ShowData();
int lOutPulse2 = ACServerManager.GetTargetPosition(BoxBean.Config.UpDown_Axis.DeviceName, BoxBean.Config.UpDown_Axis.GetAxisValue());
lblOutPulse2.Text = string.Format("{0:d}", lOutPulse2);
int lCountPulse2 = ACServerManager.GetActualtPosition(BoxBean.Config.UpDown_Axis.DeviceName, BoxBean.Config.UpDown_Axis.GetAxisValue());
lblCountPulse2.Text = string.Format("{0:d}", lCountPulse2);
txtInoutTarget.Text = BoxBean.Config.InOut_Axis.TargetPosition.ToString();
if (BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
lblCountPulse.Text = lblCountPulse2.Text;
}
}
if (ACServerManager.ServerOnStatus(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue()))
{
axis_3_Alarm.IOValue = ACServerManager.GetAlarmStatus(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
int lOutPulse3 = ACServerManager.GetTargetPosition(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
lblOutPulse3.Text = string.Format("{0:d}", lOutPulse3);
int lCountPulse3 = ACServerManager.GetActualtPosition(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
lblCountPulse3.Text = string.Format("{0:d}", lCountPulse3);
txtUpdownTarget.Text = BoxBean.Config.UpDown_Axis.TargetPosition.ToString();
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr))
{
lblCountPulse.Text = lblCountPulse3.Text;
}
}
}
private void btnOutStore_Click(object sender, EventArgs e)
{
if (BoxBean.storeRunStatus >= StoreRunStatus.HomeMoving)
......@@ -397,16 +336,7 @@ namespace OnlineStore.ACPackingStore
ktk.Middle_P101 = FormUtil.GetIntValue(txtMP101);
return ktk;
}
private void btnComAlarmClear_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short slvAddr = FormUtil.GetShortValue(txtAxisValue);
LogUtil.info("点击【清理报警】,端口号【" + portName + "】地址【" + slvAddr + "】 ");
ACServerManager.AlarmClear(portName, slvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(portName, slvAddr);
}
private void cmbPosition_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbPosition.SelectedIndex >= 0)
......@@ -434,107 +364,7 @@ namespace OnlineStore.ACPackingStore
}
}
}
private void cmbAxisList_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.cmbAxisList.SelectedIndex >= 0)
{
ConfigMoveAxis SlvAddr = BoxBean.moveAxisList[cmbAxisList.SelectedIndex];
txtAxisDeviceName.Text = SlvAddr.DeviceName;
txtAxisValue.Text = SlvAddr.GetAxisValue().ToString();
txtASpeed.Text = SlvAddr.TargetSpeed.ToString();
}
}
private void btnAxisAMove_Click(object sender, EventArgs e)
{
//ConfigMoveAxis axisC = BoxBean.moveAxisList[cmbAxisList.SelectedIndex];
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
//if (axisC.PositionIsHasLimit() && (axisC.PositionMin > position || axisC.PositionMax < position))
//{
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return;
//}
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【绝对运动】,端口号【" + portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
{
//ConfigMoveAxis axisC = BoxBean.moveAxisList[cmbAxisList.SelectedIndex];
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【匀速运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(portName, SlvAddr, speed);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
{
//ConfigMoveAxis axisC = BoxBean.moveAxisList[cmbAxisList.SelectedIndex];
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
//int currPositon = ACServerManager.GetActualtPosition(portName, SlvAddr);
// int newPosition = position + currPositon;
// if (axisC.PositionIsHasLimit() && (axisC.PositionMin > newPosition || axisC.PositionMax < newPosition))
//{
// MessageBox.Show("位置超出"+axisC.Explain+"上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return;
//}
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【相对运动】,端口号【" + portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.RelMove(portName, SlvAddr, position, speed);
}
private void btnAxisStop_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
LogUtil.info("点击【停止运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 ");
ACServerManager.SuddenStop(portName, SlvAddr);
}
private void cmbAxisList_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index < 0)
{
return;
}
e.DrawBackground();
e.DrawFocusRectangle();
if (this.cmbAxisList.Items.Count > e.Index)
{
ConfigMoveAxis SlvAddr = (ConfigMoveAxis)cmbAxisList.Items[e.Index];
e.Graphics.DrawString(SlvAddr.DisplayStr, e.Font, new SolidBrush(e.ForeColor), e.Bounds.X, e.Bounds.Y + 3);
}
}
private void btnSavePosition_Click(object sender, EventArgs e)
{
//料仓格子位置保存
......@@ -619,20 +449,8 @@ namespace OnlineStore.ACPackingStore
StoreManager.UpdateBoxConfig(BoxBean.Config);
}
}
}
private void btnOpenAxis_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
LogUtil.info("点击【打开伺服】,端口号【" + portName + "】地址【" + SlvAddr + "】 ");
ACServerManager.OpenPort(portName);
//ACServerManager.InitSlvAddr(portName, SlvAddr);
//Thread.Sleep(100);
ACServerManager.AlarmClear(portName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(portName, SlvAddr);
}
/// <summary>
/// 判断进出轴是否在P1点
/// </summary>
......@@ -647,13 +465,7 @@ namespace OnlineStore.ACPackingStore
MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
private void btnCloseAxis_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
LogUtil.info("点击【关闭伺服】,端口号【" + portName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ServoOff(portName, SlvAddr);
}
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{
moveAxis.TargetPosition = targetPosition;
......@@ -904,67 +716,7 @@ namespace OnlineStore.ACPackingStore
this.btnMiddleP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
}
private int GetSlaveAddr()
{
return FormUtil.GetShortValue(txtAxisValue);
}
private string GetPortName()
{
return txtAxisDeviceName.Text;
}
private void btnAxisReturnHome_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【原点返回】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(portName, SlvAddr, speed);
}
private void btnReadPosition_Click(object sender, EventArgs e)
{
ReadPosistion();
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
string PortName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
txtServoStatue.Text = ACServerManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
}
private void button1_Click_1(object sender, EventArgs e)
{
int value = ACServerManager.GetBusyStatus(GetPortName(), GetSlaveAddr());
this.txtBusyStatus.Text = value.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetHomeEndStatus(GetPortName(), GetSlaveAddr());
this.txtHomeStatus.Text = value.ToString();
}
private void btnReadHomeSingle_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetHomeSingle(GetPortName(), GetSlaveAddr());
this.txtHomeSingle.Text = value.ToString();
}
private void btnTempInit_Click(object sender, EventArgs e)
{
......@@ -1007,7 +759,7 @@ namespace OnlineStore.ACPackingStore
internal void DebugStatus(bool isDebug)
{
groupAxis.Enabled = isDebug;
axisMoveControl1.Enabled = isDebug;
groupInout.Enabled = isDebug;
groupShelf.Enabled = isDebug;
}
......@@ -1119,16 +871,6 @@ namespace OnlineStore.ACPackingStore
frm.ShowDialog();
}
private void btnReadLimit1_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetLimitPositiveSingle(GetPortName(), GetSlaveAddr());
this.txtLimit1.Text = value.ToString();
}
private void btnReadLimit2_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetLimitNegativeSingle(GetPortName(), GetSlaveAddr());
this.txtLimit2.Text = value.ToString();
}
}
}
......@@ -29,32 +29,27 @@
private void InitializeComponent()
{
this.groupAxis = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtLimit2 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtLimit1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnReadHomeSingle = new System.Windows.Forms.Button();
this.txtHomeSingle = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.txtHomeStatus = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.txtBusyStatus = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtAlarmStatus = new System.Windows.Forms.TextBox();
this.btnGetAlarm = new System.Windows.Forms.Button();
this.btnReadPosition = new System.Windows.Forms.Button();
this.lblServerOn = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.btnOpenAxis = new System.Windows.Forms.Button();
this.btnCloseAxis = new System.Windows.Forms.Button();
this.lblCountPulse = new System.Windows.Forms.TextBox();
this.txtP = new System.Windows.Forms.TextBox();
this.txtASpeed = new System.Windows.Forms.TextBox();
this.lblOutPulse = new System.Windows.Forms.TextBox();
this.label47 = new System.Windows.Forms.Label();
this.btnAxisVMove = new System.Windows.Forms.Button();
this.btnAxisRMove = new System.Windows.Forms.Button();
......@@ -68,41 +63,62 @@
this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.label45 = new System.Windows.Forms.Label();
this.label46 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label49 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txt4Target = new System.Windows.Forms.TextBox();
this.lblTargetP4 = new System.Windows.Forms.TextBox();
this.lblActual4 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
this.txtUpdownTarget = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.lblTargetP1 = new System.Windows.Forms.TextBox();
this.lblActual1 = new System.Windows.Forms.TextBox();
this.lblTargetP3 = new System.Windows.Forms.TextBox();
this.lblActual3 = new System.Windows.Forms.TextBox();
this.lblTargetP2 = new System.Windows.Forms.TextBox();
this.lblActual2 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label();
this.axis_4_Alarm = new UserFromControl.IOStatusControl();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupAxis
//
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.Controls.Add(this.comboBox1);
this.groupAxis.Controls.Add(this.label7);
this.groupAxis.Controls.Add(this.txtServoStatue);
this.groupAxis.Controls.Add(this.label17);
this.groupAxis.Controls.Add(this.txtLimit2);
this.groupAxis.Controls.Add(this.label19);
this.groupAxis.Controls.Add(this.txtLimit1);
this.groupAxis.Controls.Add(this.label6);
this.groupAxis.Controls.Add(this.label1);
this.groupAxis.Controls.Add(this.btnReadHomeSingle);
this.groupAxis.Controls.Add(this.txtHomeSingle);
this.groupAxis.Controls.Add(this.label16);
this.groupAxis.Controls.Add(this.label15);
this.groupAxis.Controls.Add(this.label2);
this.groupAxis.Controls.Add(this.label11);
this.groupAxis.Controls.Add(this.txtHomeStatus);
this.groupAxis.Controls.Add(this.button2);
this.groupAxis.Controls.Add(this.label10);
this.groupAxis.Controls.Add(this.txtBusyStatus);
this.groupAxis.Controls.Add(this.button1);
this.groupAxis.Controls.Add(this.label3);
this.groupAxis.Controls.Add(this.label2);
this.groupAxis.Controls.Add(this.txtAlarmStatus);
this.groupAxis.Controls.Add(this.btnGetAlarm);
this.groupAxis.Controls.Add(this.btnReadPosition);
this.groupAxis.Controls.Add(this.lblServerOn);
this.groupAxis.Controls.Add(this.label7);
this.groupAxis.Controls.Add(this.label8);
this.groupAxis.Controls.Add(this.btnOpenAxis);
this.groupAxis.Controls.Add(this.btnCloseAxis);
this.groupAxis.Controls.Add(this.lblCountPulse);
this.groupAxis.Controls.Add(this.txtP);
this.groupAxis.Controls.Add(this.txtASpeed);
this.groupAxis.Controls.Add(this.lblOutPulse);
this.groupAxis.Controls.Add(this.label47);
this.groupAxis.Controls.Add(this.btnAxisVMove);
this.groupAxis.Controls.Add(this.btnAxisRMove);
......@@ -116,172 +132,148 @@
this.groupAxis.Controls.Add(this.txtAxisDeviceName);
this.groupAxis.Controls.Add(this.label45);
this.groupAxis.Controls.Add(this.label46);
this.groupAxis.Controls.Add(this.comboBox1);
this.groupAxis.Controls.Add(this.label49);
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(5, 2);
this.groupAxis.Location = new System.Drawing.Point(9, 6);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(604, 367);
this.groupAxis.TabIndex = 218;
this.groupAxis.Size = new System.Drawing.Size(535, 320);
this.groupAxis.TabIndex = 217;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
this.groupAxis.Enter += new System.EventHandler(this.groupAxis_Enter);
//
// comboBox1
// label7
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(89, 36);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(220, 28);
this.comboBox1.TabIndex = 301;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(51, 172);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(59, 17);
this.label7.TabIndex = 328;
this.label7.Text = "伺服状态:";
//
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(112, 169);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(150, 272);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(71, 17);
this.label17.TabIndex = 316;
this.label17.Text = "负极限信号:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit2
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(226, 269);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(150, 238);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(71, 17);
this.label19.TabIndex = 312;
this.label19.Text = "正极限信号:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(226, 235);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(89, 321);
this.label6.Location = new System.Drawing.Point(162, 204);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(68, 17);
this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
this.label6.Text = "原点信号:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(195, 321);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(94, 17);
this.label1.TabIndex = 299;
this.label1.Text = "1=ON,0=OFF";
//
// btnReadHomeSingle
//
this.btnReadHomeSingle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadHomeSingle.Location = new System.Drawing.Point(358, 318);
this.btnReadHomeSingle.Name = "btnReadHomeSingle";
this.btnReadHomeSingle.Size = new System.Drawing.Size(110, 34);
this.btnReadHomeSingle.TabIndex = 298;
this.btnReadHomeSingle.Text = "读原点信号";
this.btnReadHomeSingle.UseVisualStyleBackColor = true;
this.btnReadHomeSingle.Click += new System.EventHandler(this.btnReadHomeSingle_Click);
this.label6.Text = "原点信号:";
//
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(161, 318);
this.txtHomeSingle.Location = new System.Drawing.Point(226, 201);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(192, 288);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(112, 17);
this.label16.TabIndex = 295;
this.label16.Text = "1=完成,0=未完成";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(192, 257);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(124, 17);
this.label15.TabIndex = 294;
this.label15.Text = "1=执行中,0=未执行";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(192, 222);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 17);
this.label2.TabIndex = 293;
this.label2.Text = "1=报警,0=正常";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(43, 288);
this.label11.Location = new System.Drawing.Point(5, 272);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(114, 17);
this.label11.Size = new System.Drawing.Size(105, 17);
this.label11.TabIndex = 292;
this.label11.Text = "HOME-CMP状态";
this.label11.Text = "HOME-CMP状态:";
//
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(161, 285);
this.txtHomeStatus.Location = new System.Drawing.Point(112, 269);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
//
// button2
//
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(358, 283);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(110, 34);
this.button2.TabIndex = 290;
this.button2.Text = "读HOME状态";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(82, 255);
this.label10.Location = new System.Drawing.Point(44, 238);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(75, 17);
this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
this.label10.Text = "BUSY状态";
this.label10.Text = "BUSY状态:";
//
// txtBusyStatus
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(161, 252);
this.txtBusyStatus.Location = new System.Drawing.Point(112, 235);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(358, 248);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(110, 34);
this.button1.TabIndex = 287;
this.button1.Text = "读BUSY状态";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
// label2
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(89, 222);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 286;
this.label3.Text = "报警状态:";
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(51, 204);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 17);
this.label2.TabIndex = 286;
this.label2.Text = "报警状态:";
//
// txtAlarmStatus
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(161, 219);
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 201);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
//
// btnGetAlarm
//
this.btnGetAlarm.BackColor = System.Drawing.SystemColors.Control;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(358, 213);
this.btnGetAlarm.Location = new System.Drawing.Point(301, 205);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.Size = new System.Drawing.Size(105, 33);
this.btnGetAlarm.TabIndex = 284;
this.btnGetAlarm.Text = "读报警状态";
this.btnGetAlarm.UseVisualStyleBackColor = true;
this.btnGetAlarm.Text = "读状态";
this.btnGetAlarm.UseVisualStyleBackColor = false;
this.btnGetAlarm.Click += new System.EventHandler(this.btnGetAlarm_Click);
//
// btnReadPosition
......@@ -291,45 +283,24 @@
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(358, 154);
this.btnReadPosition.Location = new System.Drawing.Point(416, 244);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(110, 34);
this.btnReadPosition.Size = new System.Drawing.Size(105, 33);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = true;
this.btnReadPosition.UseVisualStyleBackColor = false;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
//
// lblServerOn
//
this.lblServerOn.AutoSize = true;
this.lblServerOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblServerOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblServerOn.ForeColor = System.Drawing.Color.Red;
this.lblServerOn.Location = new System.Drawing.Point(491, 297);
this.lblServerOn.Name = "lblServerOn";
this.lblServerOn.Size = new System.Drawing.Size(0, 19);
this.lblServerOn.TabIndex = 268;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(8, 148);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 17);
this.label7.TabIndex = 254;
this.label7.Text = "目标脉冲值:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(8, 180);
this.label8.Location = new System.Drawing.Point(143, 171);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(80, 17);
this.label8.Size = new System.Drawing.Size(59, 17);
this.label8.TabIndex = 255;
this.label8.Text = "实际脉冲值:";
this.label8.Text = "实时位置:";
//
// btnOpenAxis
//
......@@ -338,13 +309,13 @@
this.btnOpenAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnOpenAxis.Location = new System.Drawing.Point(358, 34);
this.btnOpenAxis.Location = new System.Drawing.Point(297, 25);
this.btnOpenAxis.Name = "btnOpenAxis";
this.btnOpenAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnOpenAxis.Size = new System.Drawing.Size(110, 34);
this.btnOpenAxis.Size = new System.Drawing.Size(105, 33);
this.btnOpenAxis.TabIndex = 253;
this.btnOpenAxis.Text = "打开伺服";
this.btnOpenAxis.UseVisualStyleBackColor = true;
this.btnOpenAxis.UseVisualStyleBackColor = false;
this.btnOpenAxis.Click += new System.EventHandler(this.btnOpenAxis_Click);
//
// btnCloseAxis
......@@ -354,57 +325,50 @@
this.btnCloseAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnCloseAxis.Location = new System.Drawing.Point(474, 33);
this.btnCloseAxis.Location = new System.Drawing.Point(416, 25);
this.btnCloseAxis.Name = "btnCloseAxis";
this.btnCloseAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnCloseAxis.Size = new System.Drawing.Size(110, 34);
this.btnCloseAxis.Size = new System.Drawing.Size(105, 33);
this.btnCloseAxis.TabIndex = 252;
this.btnCloseAxis.Text = "关闭伺服";
this.btnCloseAxis.UseVisualStyleBackColor = true;
this.btnCloseAxis.UseVisualStyleBackColor = false;
this.btnCloseAxis.Click += new System.EventHandler(this.btnCloseAxis_Click);
//
// lblCountPulse
// txtP
//
this.lblCountPulse.Location = new System.Drawing.Point(89, 175);
this.lblCountPulse.Name = "lblCountPulse";
this.lblCountPulse.ReadOnly = true;
this.lblCountPulse.Size = new System.Drawing.Size(87, 23);
this.lblCountPulse.TabIndex = 38;
this.txtP.Location = new System.Drawing.Point(207, 169);
this.txtP.Name = "txtP";
this.txtP.ReadOnly = true;
this.txtP.Size = new System.Drawing.Size(87, 23);
this.txtP.TabIndex = 38;
//
// txtASpeed
//
this.txtASpeed.AcceptsReturn = true;
this.txtASpeed.BackColor = System.Drawing.SystemColors.Window;
this.txtASpeed.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtASpeed.Location = new System.Drawing.Point(225, 106);
this.txtASpeed.Location = new System.Drawing.Point(189, 111);
this.txtASpeed.MaxLength = 12;
this.txtASpeed.Name = "txtASpeed";
this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtASpeed.Size = new System.Drawing.Size(84, 26);
this.txtASpeed.Size = new System.Drawing.Size(82, 23);
this.txtASpeed.TabIndex = 251;
this.txtASpeed.Text = "30";
//
// lblOutPulse
//
this.lblOutPulse.Location = new System.Drawing.Point(89, 146);
this.lblOutPulse.Name = "lblOutPulse";
this.lblOutPulse.ReadOnly = true;
this.lblOutPulse.Size = new System.Drawing.Size(87, 23);
this.lblOutPulse.TabIndex = 30;
//
// label47
//
this.label47.AutoSize = true;
this.label47.Cursor = System.Windows.Forms.Cursors.Default;
this.label47.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label47.ForeColor = System.Drawing.SystemColors.ControlText;
this.label47.Location = new System.Drawing.Point(170, 109);
this.label47.Location = new System.Drawing.Point(152, 112);
this.label47.Name = "label47";
this.label47.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label47.Size = new System.Drawing.Size(53, 20);
this.label47.Size = new System.Drawing.Size(35, 17);
this.label47.TabIndex = 250;
this.label47.Text = "速度";
this.label47.Text = "速度:";
this.label47.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisVMove
......@@ -414,13 +378,13 @@
this.btnAxisVMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisVMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisVMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisVMove.Location = new System.Drawing.Point(358, 115);
this.btnAxisVMove.Location = new System.Drawing.Point(297, 106);
this.btnAxisVMove.Name = "btnAxisVMove";
this.btnAxisVMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisVMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisVMove.Size = new System.Drawing.Size(105, 33);
this.btnAxisVMove.TabIndex = 249;
this.btnAxisVMove.Text = "匀速运动";
this.btnAxisVMove.UseVisualStyleBackColor = true;
this.btnAxisVMove.UseVisualStyleBackColor = false;
this.btnAxisVMove.Click += new System.EventHandler(this.btnAxisVMove_Click);
//
// btnAxisRMove
......@@ -430,13 +394,13 @@
this.btnAxisRMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisRMove.Location = new System.Drawing.Point(474, 75);
this.btnAxisRMove.Location = new System.Drawing.Point(416, 67);
this.btnAxisRMove.Name = "btnAxisRMove";
this.btnAxisRMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisRMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisRMove.Size = new System.Drawing.Size(105, 33);
this.btnAxisRMove.TabIndex = 248;
this.btnAxisRMove.Text = "相对运动";
this.btnAxisRMove.UseVisualStyleBackColor = true;
this.btnAxisRMove.UseVisualStyleBackColor = false;
this.btnAxisRMove.Click += new System.EventHandler(this.btnAxisRMove_Click);
//
// btnAxisReturnHome
......@@ -446,13 +410,13 @@
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(474, 154);
this.btnAxisReturnHome.Location = new System.Drawing.Point(416, 205);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(110, 34);
this.btnAxisReturnHome.Size = new System.Drawing.Size(105, 33);
this.btnAxisReturnHome.TabIndex = 247;
this.btnAxisReturnHome.Text = "原点返回";
this.btnAxisReturnHome.UseVisualStyleBackColor = true;
this.btnAxisReturnHome.UseVisualStyleBackColor = false;
this.btnAxisReturnHome.Click += new System.EventHandler(this.btnAxisReturnHome_Click);
//
// btnAxisAMove
......@@ -462,51 +426,53 @@
this.btnAxisAMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisAMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisAMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisAMove.Location = new System.Drawing.Point(358, 76);
this.btnAxisAMove.Location = new System.Drawing.Point(297, 67);
this.btnAxisAMove.Name = "btnAxisAMove";
this.btnAxisAMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisAMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisAMove.Size = new System.Drawing.Size(105, 33);
this.btnAxisAMove.TabIndex = 245;
this.btnAxisAMove.Text = "绝对运动";
this.btnAxisAMove.UseVisualStyleBackColor = true;
this.btnAxisAMove.UseVisualStyleBackColor = false;
this.btnAxisAMove.Click += new System.EventHandler(this.btnAxisAMove_Click);
//
// btnComAlarmClear
//
this.btnComAlarmClear.BackColor = System.Drawing.SystemColors.Control;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(474, 213);
this.btnComAlarmClear.Location = new System.Drawing.Point(301, 244);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(110, 34);
this.btnComAlarmClear.Size = new System.Drawing.Size(105, 33);
this.btnComAlarmClear.TabIndex = 50;
this.btnComAlarmClear.Text = "清除报警";
this.btnComAlarmClear.UseVisualStyleBackColor = true;
this.btnComAlarmClear.UseVisualStyleBackColor = false;
this.btnComAlarmClear.Click += new System.EventHandler(this.btnComAlarmClear_Click);
//
// txtAPosition
//
this.txtAPosition.BackColor = System.Drawing.SystemColors.Window;
this.txtAPosition.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtAPosition.Location = new System.Drawing.Point(225, 72);
this.txtAPosition.Location = new System.Drawing.Point(189, 72);
this.txtAPosition.MaxLength = 12;
this.txtAPosition.Name = "txtAPosition";
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtAPosition.Size = new System.Drawing.Size(84, 26);
this.txtAPosition.Size = new System.Drawing.Size(82, 23);
this.txtAPosition.TabIndex = 244;
this.txtAPosition.Text = "3000";
//
// label48
//
this.label48.AutoSize = true;
this.label48.Cursor = System.Windows.Forms.Cursors.Default;
this.label48.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label48.ForeColor = System.Drawing.SystemColors.ControlText;
this.label48.Location = new System.Drawing.Point(170, 75);
this.label48.Location = new System.Drawing.Point(152, 73);
this.label48.Name = "label48";
this.label48.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label48.Size = new System.Drawing.Size(53, 20);
this.label48.Size = new System.Drawing.Size(35, 17);
this.label48.TabIndex = 243;
this.label48.Text = "位置";
this.label48.Text = "位置:";
this.label48.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisStop
......@@ -516,34 +482,34 @@
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(474, 114);
this.btnAxisStop.Location = new System.Drawing.Point(416, 106);
this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(110, 34);
this.btnAxisStop.Size = new System.Drawing.Size(105, 33);
this.btnAxisStop.TabIndex = 246;
this.btnAxisStop.Text = " 停止运动";
this.btnAxisStop.UseVisualStyleBackColor = true;
this.btnAxisStop.UseVisualStyleBackColor = false;
this.btnAxisStop.Click += new System.EventHandler(this.btnAxisStop_Click);
//
// txtAxisValue
//
this.txtAxisValue.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisValue.Location = new System.Drawing.Point(89, 106);
this.txtAxisValue.Location = new System.Drawing.Point(88, 109);
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
this.txtAxisValue.Size = new System.Drawing.Size(68, 26);
this.txtAxisValue.Size = new System.Drawing.Size(58, 26);
this.txtAxisValue.TabIndex = 242;
this.txtAxisValue.Text = "0";
//
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(89, 72);
this.txtAxisDeviceName.Location = new System.Drawing.Point(88, 70);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(68, 26);
this.txtAxisDeviceName.Size = new System.Drawing.Size(58, 26);
this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Text = "0";
//
......@@ -552,11 +518,11 @@
this.label45.AutoSize = true;
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(32, 77);
this.label45.Location = new System.Drawing.Point(31, 75);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(56, 17);
this.label45.Size = new System.Drawing.Size(47, 17);
this.label45.TabIndex = 240;
this.label45.Text = "端口号";
this.label45.Text = "端口号:";
this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label46
......@@ -564,33 +530,303 @@
this.label46.AutoSize = true;
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(44, 111);
this.label46.Location = new System.Drawing.Point(43, 114);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(44, 17);
this.label46.Size = new System.Drawing.Size(35, 17);
this.label46.TabIndex = 239;
this.label46.Text = "地址";
this.label46.Text = "地址:";
this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboBox1
//
this.comboBox1.DisplayMember = "ProName";
this.comboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.ItemHeight = 25;
this.comboBox1.Location = new System.Drawing.Point(88, 26);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(187, 31);
this.comboBox1.TabIndex = 234;
this.comboBox1.ValueMember = "ProName";
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label49
//
this.label49.AutoSize = true;
this.label49.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label49.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label49.Location = new System.Drawing.Point(28, 41);
this.label49.Location = new System.Drawing.Point(27, 33);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(60, 17);
this.label49.Size = new System.Drawing.Size(51, 17);
this.label49.TabIndex = 233;
this.label49.Text = "AC伺服";
this.label49.Text = "AC伺服:";
this.label49.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.axis_4_Alarm);
this.groupBox1.Controls.Add(this.txt4Target);
this.groupBox1.Controls.Add(this.lblTargetP4);
this.groupBox1.Controls.Add(this.lblActual4);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.axis_1_Alarm);
this.groupBox1.Controls.Add(this.axis_3_Alarm);
this.groupBox1.Controls.Add(this.axis_2_Alarm);
this.groupBox1.Controls.Add(this.label38);
this.groupBox1.Controls.Add(this.txtMiddleTarget);
this.groupBox1.Controls.Add(this.txtInoutTarget);
this.groupBox1.Controls.Add(this.txtUpdownTarget);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.lblTargetP1);
this.groupBox1.Controls.Add(this.lblActual1);
this.groupBox1.Controls.Add(this.lblTargetP3);
this.groupBox1.Controls.Add(this.lblActual3);
this.groupBox1.Controls.Add(this.lblTargetP2);
this.groupBox1.Controls.Add(this.lblActual2);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
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(9, 332);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(535, 182);
this.groupBox1.TabIndex = 218;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
//
// txt4Target
//
this.txt4Target.Location = new System.Drawing.Point(409, 143);
this.txt4Target.Name = "txt4Target";
this.txt4Target.ReadOnly = true;
this.txt4Target.Size = new System.Drawing.Size(87, 23);
this.txt4Target.TabIndex = 270;
//
// lblTargetP4
//
this.lblTargetP4.Location = new System.Drawing.Point(409, 115);
this.lblTargetP4.Name = "lblTargetP4";
this.lblTargetP4.ReadOnly = true;
this.lblTargetP4.Size = new System.Drawing.Size(87, 23);
this.lblTargetP4.TabIndex = 269;
//
// lblActual4
//
this.lblActual4.Location = new System.Drawing.Point(409, 87);
this.lblActual4.Name = "lblActual4";
this.lblActual4.ReadOnly = true;
this.lblActual4.Size = new System.Drawing.Size(87, 23);
this.lblActual4.TabIndex = 268;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(406, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 17);
this.label1.TabIndex = 267;
this.label1.Text = "轴四:压紧轴";
//
// label38
//
this.label38.AutoSize = true;
this.label38.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label38.Location = new System.Drawing.Point(49, 40);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(37, 17);
this.label38.TabIndex = 263;
this.label38.Text = "ALM:";
//
// txtMiddleTarget
//
this.txtMiddleTarget.Location = new System.Drawing.Point(105, 144);
this.txtMiddleTarget.Name = "txtMiddleTarget";
this.txtMiddleTarget.ReadOnly = true;
this.txtMiddleTarget.Size = new System.Drawing.Size(87, 23);
this.txtMiddleTarget.TabIndex = 262;
//
// txtInoutTarget
//
this.txtInoutTarget.Location = new System.Drawing.Point(306, 144);
this.txtInoutTarget.Name = "txtInoutTarget";
this.txtInoutTarget.ReadOnly = true;
this.txtInoutTarget.Size = new System.Drawing.Size(87, 23);
this.txtInoutTarget.TabIndex = 260;
//
// txtUpdownTarget
//
this.txtUpdownTarget.Location = new System.Drawing.Point(206, 144);
this.txtUpdownTarget.Name = "txtUpdownTarget";
this.txtUpdownTarget.ReadOnly = true;
this.txtUpdownTarget.Size = new System.Drawing.Size(87, 23);
this.txtUpdownTarget.TabIndex = 259;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(7, 147);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(83, 17);
this.label12.TabIndex = 258;
this.label12.Text = "出入库目标值:";
//
// lblTargetP1
//
this.lblTargetP1.Location = new System.Drawing.Point(105, 116);
this.lblTargetP1.Name = "lblTargetP1";
this.lblTargetP1.ReadOnly = true;
this.lblTargetP1.Size = new System.Drawing.Size(87, 23);
this.lblTargetP1.TabIndex = 257;
//
// lblActual1
//
this.lblActual1.Location = new System.Drawing.Point(105, 88);
this.lblActual1.Name = "lblActual1";
this.lblActual1.ReadOnly = true;
this.lblActual1.Size = new System.Drawing.Size(87, 23);
this.lblActual1.TabIndex = 256;
//
// lblTargetP3
//
this.lblTargetP3.Location = new System.Drawing.Point(306, 116);
this.lblTargetP3.Name = "lblTargetP3";
this.lblTargetP3.ReadOnly = true;
this.lblTargetP3.Size = new System.Drawing.Size(87, 23);
this.lblTargetP3.TabIndex = 178;
//
// lblActual3
//
this.lblActual3.Location = new System.Drawing.Point(306, 88);
this.lblActual3.Name = "lblActual3";
this.lblActual3.ReadOnly = true;
this.lblActual3.Size = new System.Drawing.Size(87, 23);
this.lblActual3.TabIndex = 177;
//
// lblTargetP2
//
this.lblTargetP2.Location = new System.Drawing.Point(207, 116);
this.lblTargetP2.Name = "lblTargetP2";
this.lblTargetP2.ReadOnly = true;
this.lblTargetP2.Size = new System.Drawing.Size(87, 23);
this.lblTargetP2.TabIndex = 176;
//
// lblActual2
//
this.lblActual2.Location = new System.Drawing.Point(206, 88);
this.lblActual2.Name = "lblActual2";
this.lblActual2.ReadOnly = true;
this.lblActual2.Size = new System.Drawing.Size(87, 23);
this.lblActual2.TabIndex = 175;
//
// label4
//
this.label4.AutoSize = true;
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(303, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 17);
this.label4.TabIndex = 100;
this.label4.Text = "轴三:进出轴";
//
// label3
//
this.label3.AutoSize = true;
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(204, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(71, 17);
this.label3.TabIndex = 99;
this.label3.Text = "轴二:上下轴";
//
// label5
//
this.label5.AutoSize = true;
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(106, 15);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(71, 17);
this.label5.TabIndex = 97;
this.label5.Text = "轴一:旋转轴";
//
// label43
//
this.label43.AutoSize = true;
this.label43.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label43.Location = new System.Drawing.Point(15, 90);
this.label43.Name = "label43";
this.label43.Size = new System.Drawing.Size(71, 17);
this.label43.TabIndex = 23;
this.label43.Text = "输出脉冲值:";
//
// label42
//
this.label42.AutoSize = true;
this.label42.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label42.Location = new System.Drawing.Point(15, 117);
this.label42.Name = "label42";
this.label42.Size = new System.Drawing.Size(71, 17);
this.label42.TabIndex = 24;
this.label42.Text = "编码器计数:";
//
// axis_4_Alarm
//
this.axis_4_Alarm.IOName = "";
this.axis_4_Alarm.IOValue = 0;
this.axis_4_Alarm.isCanClick = false;
this.axis_4_Alarm.Location = new System.Drawing.Point(432, 39);
this.axis_4_Alarm.Name = "axis_4_Alarm";
this.axis_4_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_4_Alarm.TabIndex = 271;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(127, 40);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(329, 40);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(224, 40);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// AxisMoveControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(612, 374);
this.Size = new System.Drawing.Size(564, 529);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
......@@ -598,45 +834,66 @@
#endregion
private System.Windows.Forms.GroupBox groupAxis;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtServoStatue;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtLimit2;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtLimit1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnReadHomeSingle;
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtHomeStatus;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtBusyStatus;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAlarmStatus;
private System.Windows.Forms.Button btnGetAlarm;
internal System.Windows.Forms.Button btnReadPosition;
private System.Windows.Forms.Label lblServerOn;
private System.Windows.Forms.Label label7;
public System.Windows.Forms.Button btnReadPosition;
private System.Windows.Forms.Label label8;
internal System.Windows.Forms.Button btnOpenAxis;
internal System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.TextBox lblCountPulse;
internal System.Windows.Forms.TextBox txtASpeed;
private System.Windows.Forms.TextBox lblOutPulse;
internal System.Windows.Forms.Label label47;
internal System.Windows.Forms.Button btnAxisVMove;
internal System.Windows.Forms.Button btnAxisRMove;
internal System.Windows.Forms.Button btnAxisReturnHome;
internal System.Windows.Forms.Button btnAxisAMove;
public System.Windows.Forms.Button btnOpenAxis;
public System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.TextBox txtP;
public System.Windows.Forms.TextBox txtASpeed;
public System.Windows.Forms.Label label47;
public System.Windows.Forms.Button btnAxisVMove;
public System.Windows.Forms.Button btnAxisRMove;
public System.Windows.Forms.Button btnAxisReturnHome;
public System.Windows.Forms.Button btnAxisAMove;
private System.Windows.Forms.Button btnComAlarmClear;
internal System.Windows.Forms.TextBox txtAPosition;
internal System.Windows.Forms.Label label48;
internal System.Windows.Forms.Button btnAxisStop;
public System.Windows.Forms.TextBox txtAPosition;
public System.Windows.Forms.Label label48;
public System.Windows.Forms.Button btnAxisStop;
private System.Windows.Forms.TextBox txtAxisValue;
private System.Windows.Forms.TextBox txtAxisDeviceName;
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.GroupBox groupBox1;
private UserFromControl.IOStatusControl axis_4_Alarm;
private System.Windows.Forms.TextBox txt4Target;
private System.Windows.Forms.TextBox lblTargetP4;
private System.Windows.Forms.TextBox lblActual4;
private System.Windows.Forms.Label label1;
private UserFromControl.IOStatusControl axis_1_Alarm;
private UserFromControl.IOStatusControl axis_3_Alarm;
private UserFromControl.IOStatusControl axis_2_Alarm;
private System.Windows.Forms.Label label38;
private System.Windows.Forms.TextBox txtMiddleTarget;
private System.Windows.Forms.TextBox txtInoutTarget;
private System.Windows.Forms.TextBox txtUpdownTarget;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox lblTargetP1;
private System.Windows.Forms.TextBox lblActual1;
private System.Windows.Forms.TextBox lblTargetP3;
private System.Windows.Forms.TextBox lblActual3;
private System.Windows.Forms.TextBox lblTargetP2;
private System.Windows.Forms.TextBox lblActual2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label43;
private System.Windows.Forms.Label label42;
}
}
......@@ -11,13 +11,14 @@ using OnlineStore.DeviceLibrary;
using OnlineStore.Common;
using System.Threading;
using OnlineStore.LoadCSVLibrary;
using UserFromControl;
namespace OnlineStore.ACPackingStore
{
public partial class AxisMoveControl : UserControl
{
private List<ConfigMoveAxis> axisList = new List<ConfigMoveAxis>();
private AC_BOX_Bean boxBean= null;
private AC_BOX_Bean BoxBean= null;
private string PortName = "";
private int SlvAddr = 0;
......@@ -27,7 +28,7 @@ namespace OnlineStore.ACPackingStore
}
public void LoadData(AC_BOX_Bean boxBean, params ConfigMoveAxis[] moveAxis)
{
this.boxBean = boxBean;
this.BoxBean = boxBean;
axisList = new List<ConfigMoveAxis>(moveAxis);
if (axisList.Count > 0)
......@@ -47,44 +48,76 @@ namespace OnlineStore.ACPackingStore
}
private void btnOpenAxis_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
ACServerManager.OpenPort(portName);
ACServerManager.AlarmClear(portName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(portName, SlvAddr);
LogUtil.info("点击【打开伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
// boxBean.OpenAxis(axisList[comboBox1.SelectedIndex]);
ACServerManager.OpenPort(PortName);
ACServerManager.AlarmClear(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(PortName, SlvAddr);
}
private void btnCloseAxis_Click(object sender, EventArgs e)
{
{
LogUtil.info("点击【关闭伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ServoOff(PortName, SlvAddr);
// boxBean.CloseAxis(axisList[comboBox1.SelectedIndex]);
ACServerManager.ServoOff(PortName, SlvAddr);
}
/// <summary>
/// 判断进出轴是否在P1点
/// </summary>
private bool InOutIsIsP1()
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
int currValue = ACServerManager.GetActualtPosition(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
if (currValue <= InOutDefaultPosition)
{
return true;
}
MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
private void btnAxisAMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【绝对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(PortName, SlvAddr, position, speed);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【相对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.RelMove(PortName, SlvAddr, position, speed);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【匀速运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(PortName, SlvAddr, speed);
}
......@@ -106,41 +139,70 @@ namespace OnlineStore.ACPackingStore
private void btnAxisReturnHome_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【原点返回】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(PortName, SlvAddr, speed);
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetAlarmStatus(PortName, SlvAddr);
this.txtAlarmStatus.Text = value.ToString();
string PortName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
txtServoStatue.Text = ACServerManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
}
private void button1_Click(object sender, EventArgs e)
private void btnReadPosition_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetBusyStatus(PortName, SlvAddr);
this.txtBusyStatus.Text = value.ToString();
ReadPosistion();
}
private void button2_Click(object sender, EventArgs e)
private void ReadPosistion()
{
int value = ACServerManager.GetHomeEndStatus(PortName, SlvAddr);
this.txtHomeStatus.Text = value.ToString();
}
//判断私服是否打开、
if (ACServerManager.ServerOnStatus(PortName, SlvAddr))
{
txtServoStatue.Text = "✔";
}
else
{
txtServoStatue.Text = "✘";
}
ReadA(BoxBean.Config.Middle_Axis, lblActual1, lblTargetP1, txtMiddleTarget, axis_1_Alarm);
ReadA(BoxBean.Config.UpDown_Axis, lblActual2, lblTargetP2, txtUpdownTarget, axis_2_Alarm);
ReadA(BoxBean.Config.InOut_Axis, lblActual3, lblTargetP3, txtInoutTarget, axis_3_Alarm);
ReadA(BoxBean.Config.Comp_Axis, lblActual4, lblTargetP4, txt4Target, axis_4_Alarm);
private void btnReadHomeSingle_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetHomeSingle(PortName, SlvAddr);
this.txtHomeSingle.Text = value.ToString();
}
private void btnReadPosition_Click(object sender, EventArgs e)
private void ReadA(ConfigMoveAxis axis, TextBox lblActual, TextBox lblTarget, TextBox lblT, IOStatusControl sta)
{
lblOutPulse.Text = ACServerManager.GetTargetPosition(PortName, SlvAddr).ToString();
lblCountPulse.Text = ACServerManager.GetActualtPosition(PortName, SlvAddr).ToString();
}
if (ACServerManager.ServerOnStatus(axis.DeviceName, axis.GetAxisValue()))
{
sta.IOValue = ACServerManager.GetAlarmStatus(axis.DeviceName, axis.GetAxisValue());
int tP = ACServerManager.GetTargetPosition(axis.DeviceName, axis.GetAxisValue());
lblTarget.Text = string.Format("{0:d}", tP);
int aP = ACServerManager.GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
lblActual.Text = string.Format("{0:d}", aP);
lblT.Text = axis.TargetPosition.ToString();
if (axis.IsSameAxis(PortName, SlvAddr))
{
txtP.Text = lblActual.Text;
}
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex > 0)
......@@ -150,9 +212,46 @@ namespace OnlineStore.ACPackingStore
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
Color color = Color.Black;
if (BoxBean.Config.Middle_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Red;
}
else if (BoxBean.Config.UpDown_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Blue;
}
else if (BoxBean.Config.InOut_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Green;
}
else if (BoxBean.Config.Comp_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Purple;
}
btnOpenAxis.ForeColor = color;
btnCloseAxis.ForeColor = color;
btnAxisAMove.ForeColor = color;
btnAxisRMove.ForeColor = color;
btnAxisVMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color;
btnComAlarmClear.ForeColor = color;
btnReadPosition.ForeColor = color;
btnGetAlarm.ForeColor = color;
}
}
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{
moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
}
private void groupAxis_Enter(object sender, EventArgs e)
{
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!