Commit 2930429c 几米阳光

工作界面增加ATI分离和吸附功能

1 个父辈 7510721e
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.lblAOIResult = new System.Windows.Forms.Label(); this.lblAOIResult = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnFixtureMove = new System.Windows.Forms.Button();
this.chbXunHuan = new System.Windows.Forms.CheckBox(); this.chbXunHuan = new System.Windows.Forms.CheckBox();
this.btnWeld = new System.Windows.Forms.Button(); this.btnWeld = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
...@@ -254,6 +255,7 @@ ...@@ -254,6 +255,7 @@
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.btnFixtureMove);
this.groupBox1.Controls.Add(this.chbXunHuan); this.groupBox1.Controls.Add(this.chbXunHuan);
this.groupBox1.Controls.Add(this.btnWeld); this.groupBox1.Controls.Add(this.btnWeld);
this.groupBox1.Controls.Add(this.panel2); this.groupBox1.Controls.Add(this.panel2);
...@@ -267,6 +269,17 @@ ...@@ -267,6 +269,17 @@
this.groupBox1.TabIndex = 268; this.groupBox1.TabIndex = 268;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// btnFixtureMove
//
this.btnFixtureMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFixtureMove.Location = new System.Drawing.Point(523, 16);
this.btnFixtureMove.Name = "btnFixtureMove";
this.btnFixtureMove.Size = new System.Drawing.Size(150, 52);
this.btnFixtureMove.TabIndex = 316;
this.btnFixtureMove.Text = "ATI分离";
this.btnFixtureMove.UseVisualStyleBackColor = true;
this.btnFixtureMove.Click += new System.EventHandler(this.btnFixtureMove_Click);
//
// chbXunHuan // chbXunHuan
// //
this.chbXunHuan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbXunHuan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -300,9 +313,9 @@ ...@@ -300,9 +313,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Controls.Add(this.lblRobotWarnMsg); this.panel2.Controls.Add(this.lblRobotWarnMsg);
this.panel2.Location = new System.Drawing.Point(518, 11); this.panel2.Location = new System.Drawing.Point(679, 11);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(552, 59); this.panel2.Size = new System.Drawing.Size(391, 59);
this.panel2.TabIndex = 270; this.panel2.TabIndex = 270;
// //
// lblRobotWarnMsg // lblRobotWarnMsg
...@@ -313,7 +326,7 @@ ...@@ -313,7 +326,7 @@
this.lblRobotWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblRobotWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblRobotWarnMsg.Location = new System.Drawing.Point(4, 3); this.lblRobotWarnMsg.Location = new System.Drawing.Point(4, 3);
this.lblRobotWarnMsg.Name = "lblRobotWarnMsg"; this.lblRobotWarnMsg.Name = "lblRobotWarnMsg";
this.lblRobotWarnMsg.Size = new System.Drawing.Size(542, 51); this.lblRobotWarnMsg.Size = new System.Drawing.Size(381, 51);
this.lblRobotWarnMsg.TabIndex = 4; this.lblRobotWarnMsg.TabIndex = 4;
// //
// btnStart // btnStart
...@@ -814,5 +827,6 @@ ...@@ -814,5 +827,6 @@
private System.Windows.Forms.Label lblProName; private System.Windows.Forms.Label lblProName;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnWeld; private System.Windows.Forms.Button btnWeld;
private System.Windows.Forms.Button btnFixtureMove;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -398,6 +398,14 @@ namespace URSoldering.Client ...@@ -398,6 +398,14 @@ namespace URSoldering.Client
{ {
LoadCountPoint(btnChange.Text.Equals("每周统计")); LoadCountPoint(btnChange.Text.Equals("每周统计"));
} }
if (RobotBean.KNDIOValue(IO_Type.Fixture_Clamp).Equals(IO_VALUE.HIGH) && RobotBean.KNDIOValue(IO_Type.Fixture_Clamp).Equals(IO_VALUE.LOW))
{
btnFixtureMove.Text = "ATI分离";
}
else
{
btnFixtureMove.Text = "ATI吸附";
}
} }
private void UpdateCheckResult(Label lblshowMsg, int result) private void UpdateCheckResult(Label lblshowMsg, int result)
{ {
...@@ -862,5 +870,27 @@ namespace URSoldering.Client ...@@ -862,5 +870,27 @@ namespace URSoldering.Client
MessageBox.Show("焊接失败:" + msg); MessageBox.Show("焊接失败:" + msg);
} }
} }
private void FixtureCylinderMove(IO_VALUE clamp, IO_VALUE relax)
{
RobotBean.KNDIOMove(IO_Type.Fixture_Clamp, clamp);
RobotBean.KNDIOMove(IO_Type.Fixture_Relax, relax);
}
private void btnFixtureMove_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("确定进行"+btnFixtureMove.Text+"?","确认",MessageBoxButtons.OKCancel,MessageBoxIcon.Question );
if (result.Equals(DialogResult.OK))
{
if (btnFixtureMove.Text.Equals("ATI分离"))
{
FixtureCylinderMove(IO_VALUE.LOW, IO_VALUE.HIGH);
btnFixtureMove.Text = "ATI吸附";
}
else
{
FixtureCylinderMove(IO_VALUE.HIGH, IO_VALUE.LOW);
btnFixtureMove.Text = "ATI分离";
}
}
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!