Commit d0b3f6b5 LN

调试bug修改

1 个父辈 0212dd39
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,1,HC,,250,1000,1000,60,80,50,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,2,HC,,150,400,400,100,200,200,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,3,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,4,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,250,1000,1000,60,80,50,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,1,HC,,150,400,400,100,200,200,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,100,300,300,20,60,200,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料点 P1,UpDownAxis_DoorOPosition_P1,304500,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,325300,,,,,,,,,,,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,1,HC,,250,1000,1000,60,80,50,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,2,HC,,150,400,400,100,200,200,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,3,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,4,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴一)旋转轴,Middle_Axis,4,HC,,250,1000,1000,60,80,50,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,5,HC,,150,400,400,100,200,200,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,6,HC,,100,300,300,20,60,200,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,7,HC,,100,300,300,20,60,200,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料点 P1,UpDownAxis_DoorOPosition_P1,304500,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,325300,,,,,,,,,,,,
......
......@@ -104,7 +104,6 @@ namespace OnlineStore.DeviceLibrary
public override bool StartRun()
{
LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString());
autoNext = false;
mainTimer.Enabled = false;
......@@ -122,6 +121,7 @@ namespace OnlineStore.DeviceLibrary
return false;
}
LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString());
//TODO 启动时先所有轴远点返回,测试暂时关闭
storeRunStatus = StoreRunStatus.HomeMoving;
storeStatus = StoreStatus.ResetMove;
......@@ -131,10 +131,11 @@ namespace OnlineStore.DeviceLibrary
ReturnHome();
StartTime = DateTime.Now;
InProcess = false;
mainTimer.Enabled = true;
IoCheckTimer.Enabled = true;
serverConnectTimer.Enabled = true;
IsRun = true;
serverConnectTimer.Enabled = true;
IsRun = true;
return true;
}
else
......@@ -160,16 +161,12 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = "";
CurrInOutACount = 0;
CurrInOutCount = 0;
IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.HIGH);
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
storeRunStatus = StoreRunStatus.HomeMoving;
MoveInfo.NewMove(StoreMoveType.ReturnHome);
storeRunStatus = StoreRunStatus.HomeMoving;
MoveInfo.NewMove(StoreMoveType.ReturnHome);
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
ACAxisHomeMove(Config.InOut_Axis);
LogUtil.info(Name + "开始原点返回,先把进出轴回原点");
LogUtil.info(Name + "开始原点返回,先把进出轴回原点");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
public void MoveToP1()
......@@ -185,16 +182,12 @@ namespace OnlineStore.DeviceLibrary
{
CurrInOutCount = 0;
CurrInOutACount = 0;
IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.HIGH);
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
//复位之前先停止运行
if (isNeedClearAuto)
{
autoNext = false;
}
}
AxisManager.instance.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
AxisManager.instance.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
......@@ -209,9 +202,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(StoreMoveType.StoreReset);
WarnMsg = "";
if (!OpenAllAxis(true))
////打开四个轴
//if (!OpenAllAxis())
if (!OpenAllAxis(true))
{
LogUtil.info(Name + "复位时打开轴失败,需要再次复位,直接报警停止复位");
return;
......
......@@ -441,5 +441,6 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
}
}
\ No newline at end of file
......@@ -115,7 +115,10 @@ namespace OnlineStore.DeviceLibrary
OutStoreProcess();
isInPro = false;
break;
case StoreMoveType.ReturnHome:
case StoreMoveType.ReturnHome:
ResetProcess();
isInPro = false;
break;
case StoreMoveType.StoreReset:
ResetProcess();
isInPro = false;
......@@ -400,16 +403,20 @@ namespace OnlineStore.DeviceLibrary
{
inout = "_出库:" + MoveInfo.MoveParam.PosInfo.ToStr();
}
else
{
inout = " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep;
}
return sta + "_" + aa+inout;
}
else
{
return sta;
return sta + " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep;
}
}
else
{
return sta;
return sta + " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep;
}
}
......
......@@ -279,9 +279,9 @@
this.groupBox4.Controls.Add(this.label5);
this.groupBox4.Controls.Add(this.cmbWriteIO);
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Location = new System.Drawing.Point(532, 252);
this.groupBox4.Location = new System.Drawing.Point(532, 264);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(472, 138);
this.groupBox4.Size = new System.Drawing.Size(472, 129);
this.groupBox4.TabIndex = 108;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO写入";
......@@ -342,6 +342,7 @@
this.btnOpenDoor.TabIndex = 248;
this.btnOpenDoor.Text = "打开仓门";
this.btnOpenDoor.UseVisualStyleBackColor = true;
this.btnOpenDoor.Click += new System.EventHandler(this.btnOpenDoor_Click);
//
// label17
//
......@@ -365,6 +366,7 @@
this.btnCloseDoor.TabIndex = 249;
this.btnCloseDoor.Text = "关闭仓门";
this.btnCloseDoor.UseVisualStyleBackColor = true;
this.btnCloseDoor.Click += new System.EventHandler(this.btnCloseDoor_Click);
//
// label14
//
......@@ -421,7 +423,7 @@
this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox5.Location = new System.Drawing.Point(775, 3);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(229, 242);
this.groupBox5.Size = new System.Drawing.Size(229, 252);
this.groupBox5.TabIndex = 107;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "DO列表";
......@@ -438,7 +440,7 @@
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 222);
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 232);
this.tableLayoutPanel2.TabIndex = 103;
//
// lblTemp
......@@ -460,7 +462,7 @@
this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox6.Location = new System.Drawing.Point(532, 3);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(229, 242);
this.groupBox6.Size = new System.Drawing.Size(229, 252);
this.groupBox6.TabIndex = 106;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "DI列表";
......@@ -477,7 +479,7 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 222);
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 232);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupInout
......@@ -528,7 +530,7 @@
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(3, 3);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(514, 465);
this.groupInout.Size = new System.Drawing.Size(514, 456);
this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作";
......@@ -1183,10 +1185,10 @@
this.tabPage1.Controls.Add(this.btnAxisOn);
this.tabPage1.Controls.Add(this.btnAxisOff);
this.tabPage1.Controls.Add(this.btnAxisP);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1075, 488);
this.tabPage1.Size = new System.Drawing.Size(1075, 485);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
......
......@@ -734,7 +734,7 @@ namespace OnlineStore.ACSingleStore
}
private void btnStoreStart_Click(object sender, EventArgs e)
{
if (boxBean.storeRunStatus > StoreRunStatus.Wait)
if (boxBean.storeRunStatus >= StoreRunStatus.Wait)
{
LogUtil.info(boxBean.Name + "点击:启用调试");
boxBean.StartRun();
......@@ -780,8 +780,7 @@ namespace OnlineStore.ACSingleStore
this.btnUpDownP6.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP7.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP8.ForeColor = System.Drawing.Color.Red;
//this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
//this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.btnComP1.ForeColor = System.Drawing.Color.Purple;
this.btnComP3.ForeColor = System.Drawing.Color.Purple;
......@@ -1019,6 +1018,8 @@ namespace OnlineStore.ACSingleStore
txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.IO_IP;
IOTextControl newControl = DOControlList[io.ProName];
if (selectControl != null) { selectControl.BorderStyle = BorderStyle.None; }
newControl.BorderStyle = BorderStyle.FixedSingle;
selectControl = newControl;
}
}
......@@ -1057,7 +1058,6 @@ namespace OnlineStore.ACSingleStore
{
boxBean.CloseDoor(false);
}
}
}
......@@ -207,6 +207,27 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="box.ico" />
<Content Include="image\gray.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\gray1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\gray2 - 副本.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\gray2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\green.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\green1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\red0.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="记录.txt" />
</ItemGroup>
<ItemGroup>
......
......@@ -31,6 +31,7 @@
this.components = new System.ComponentModel.Container();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.ioSingle = new UserFromControl.IOTextControl();
this.txtP4Offset = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtP3Offset = new System.Windows.Forms.TextBox();
......@@ -69,8 +70,6 @@
this.btnClear = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.ioSingle = new UserFromControl.IOTextControl();
this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -127,6 +126,17 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "位置信息";
//
// ioSingle
//
this.ioSingle.BackColor = System.Drawing.Color.White;
this.ioSingle.IOName = "检测信号";
this.ioSingle.IOValue = 0;
this.ioSingle.isCanClick = false;
this.ioSingle.Location = new System.Drawing.Point(46, 425);
this.ioSingle.Name = "ioSingle";
this.ioSingle.Size = new System.Drawing.Size(202, 27);
this.ioSingle.TabIndex = 289;
//
// txtP4Offset
//
this.txtP4Offset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -526,33 +536,11 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(715, 0);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(116, 24);
this.radioButton1.TabIndex = 251;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "radioButton1";
this.radioButton1.UseVisualStyleBackColor = true;
//
// ioSingle
//
this.ioSingle.IOName = "检测信号";
this.ioSingle.IOValue = 0;
this.ioSingle.isCanClick = false;
this.ioSingle.Location = new System.Drawing.Point(46, 425);
this.ioSingle.Name = "ioSingle";
this.ioSingle.Size = new System.Drawing.Size(202, 27);
this.ioSingle.TabIndex = 289;
//
// FrmPositionTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1020, 719);
this.Controls.Add(this.radioButton1);
this.Controls.Add(this.groupBox6);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "FrmPositionTool";
......@@ -566,7 +554,6 @@
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
......@@ -612,7 +599,6 @@
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtP5Offset;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.RadioButton radioButton1;
private UserFromControl.IOTextControl ioSingle;
}
}
......
......@@ -76,7 +76,7 @@
this.btnComAlarmClear = new System.Windows.Forms.Button();
this.btnAxisStop = new System.Windows.Forms.Button();
this.btnAxisReturnHome = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.cmbAxis = new System.Windows.Forms.ComboBox();
this.btnDelMove = new System.Windows.Forms.Button();
this.btnOpenAxis = new System.Windows.Forms.Button();
this.btnCloseAxis = new System.Windows.Forms.Button();
......@@ -160,7 +160,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(246, 90);
this.label4.Location = new System.Drawing.Point(267, 90);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 17);
......@@ -170,7 +170,7 @@
// lblhomeSts
//
this.lblhomeSts.AutoSize = true;
this.lblhomeSts.Location = new System.Drawing.Point(311, 90);
this.lblhomeSts.Location = new System.Drawing.Point(332, 90);
this.lblhomeSts.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhomeSts.Name = "lblhomeSts";
this.lblhomeSts.Size = new System.Drawing.Size(17, 17);
......@@ -292,7 +292,7 @@
// label53
//
this.label53.AutoSize = true;
this.label53.Location = new System.Drawing.Point(123, 90);
this.label53.Location = new System.Drawing.Point(134, 90);
this.label53.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label53.Name = "label53";
this.label53.Size = new System.Drawing.Size(59, 17);
......@@ -322,7 +322,7 @@
// label52
//
this.label52.AutoSize = true;
this.label52.Location = new System.Drawing.Point(123, 65);
this.label52.Location = new System.Drawing.Point(134, 65);
this.label52.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label52.Name = "label52";
this.label52.Size = new System.Drawing.Size(59, 17);
......@@ -342,7 +342,7 @@
// lblAxPrfVel
//
this.lblAxPrfVel.AutoSize = true;
this.lblAxPrfVel.Location = new System.Drawing.Point(188, 90);
this.lblAxPrfVel.Location = new System.Drawing.Point(199, 90);
this.lblAxPrfVel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfVel.Name = "lblAxPrfVel";
this.lblAxPrfVel.Size = new System.Drawing.Size(17, 17);
......@@ -362,7 +362,7 @@
// lblAxPrfPos
//
this.lblAxPrfPos.AutoSize = true;
this.lblAxPrfPos.Location = new System.Drawing.Point(188, 65);
this.lblAxPrfPos.Location = new System.Drawing.Point(199, 65);
this.lblAxPrfPos.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfPos.Name = "lblAxPrfPos";
this.lblAxPrfPos.Size = new System.Drawing.Size(17, 17);
......@@ -372,7 +372,7 @@
// lblAxisPrfMode
//
this.lblAxisPrfMode.AutoSize = true;
this.lblAxisPrfMode.Location = new System.Drawing.Point(311, 65);
this.lblAxisPrfMode.Location = new System.Drawing.Point(332, 65);
this.lblAxisPrfMode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxisPrfMode.Name = "lblAxisPrfMode";
this.lblAxisPrfMode.Size = new System.Drawing.Size(17, 17);
......@@ -382,7 +382,7 @@
// label50
//
this.label50.AutoSize = true;
this.label50.Location = new System.Drawing.Point(246, 65);
this.label50.Location = new System.Drawing.Point(267, 65);
this.label50.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label50.Name = "label50";
this.label50.Size = new System.Drawing.Size(59, 17);
......@@ -553,7 +553,7 @@
this.panel1.Controls.Add(this.btnComAlarmClear);
this.panel1.Controls.Add(this.btnAxisStop);
this.panel1.Controls.Add(this.btnAxisReturnHome);
this.panel1.Controls.Add(this.comboBox1);
this.panel1.Controls.Add(this.cmbAxis);
this.panel1.Controls.Add(this.btnDelMove);
this.panel1.Controls.Add(this.btnOpenAxis);
this.panel1.Controls.Add(this.btnCloseAxis);
......@@ -645,16 +645,16 @@
this.btnAxisReturnHome.UseVisualStyleBackColor = false;
this.btnAxisReturnHome.Click += new System.EventHandler(this.btnAxisReturnHome_Click);
//
// comboBox1
// cmbAxis
//
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(71, 6);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(227, 28);
this.comboBox1.TabIndex = 301;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
this.cmbAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAxis.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAxis.FormattingEnabled = true;
this.cmbAxis.Location = new System.Drawing.Point(71, 6);
this.cmbAxis.Name = "cmbAxis";
this.cmbAxis.Size = new System.Drawing.Size(227, 28);
this.cmbAxis.TabIndex = 301;
this.cmbAxis.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// btnDelMove
//
......@@ -960,7 +960,7 @@
#endregion
private System.Windows.Forms.GroupBox groupAxis;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox cmbAxis;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label11;
......
......@@ -34,12 +34,12 @@ namespace OnlineStore.AutoCountClient
if (axisList.Count > 0)
{
comboBox1.Items.Clear();
cmbAxis.Items.Clear();
foreach (ConfigMoveAxis a in axisList)
{
comboBox1.Items.Add(a.Explain);
cmbAxis.Items.Add(a.Explain);
}
comboBox1.SelectedIndex = 0;
cmbAxis.SelectedIndex = 0;
PortName = axisList[0].DeviceName;
SlvAddr = axisList[0].GetAxisValue();
......@@ -194,9 +194,9 @@ namespace OnlineStore.AutoCountClient
private List<Color> colorsList = new List<Color>();
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex >= 0)
if (cmbAxis.SelectedIndex >= 0)
{
ConfigMoveAxis axis = axisList[comboBox1.SelectedIndex];
ConfigMoveAxis axis = axisList[cmbAxis.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
......@@ -213,7 +213,7 @@ namespace OnlineStore.AutoCountClient
btnAddMove.Text = "点动+ ";
btnDelMove.Text = "点动- ";
txtASpeed.Text = targetSpeed.ToString();
int SelIndex = comboBox1.SelectedIndex;
int SelIndex = cmbAxis.SelectedIndex;
if (colorsList.Count <= 0)
{
......@@ -326,9 +326,10 @@ namespace OnlineStore.AutoCountClient
}
private void ReadAxisStatus()
{
groupBox2.Text = cmbAxis.Text + "-状态监控";
//【1】更新轴号
short axisNo = SlvAddr;
if (axisNo <= 0)
if (axisNo < 0)
{
return;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!