增加吸盘点位
This commit is contained in:
@@ -118,6 +118,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SuctionCupControl.cs" />
|
||||
<Compile Include="tempControl.cs" />
|
||||
<Compile Include="ZoomControl.cs" />
|
||||
<EmbeddedResource Include="ParameterInputForm.resx">
|
||||
|
||||
324
HitBotCSharpDemo/ShowForm.Designer.cs
generated
324
HitBotCSharpDemo/ShowForm.Designer.cs
generated
@@ -164,8 +164,9 @@
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tab_Zoom = new System.Windows.Forms.TabPage();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.label32 = new System.Windows.Forms.Label();
|
||||
this.button10 = new System.Windows.Forms.Button();
|
||||
this.button12 = new System.Windows.Forms.Button();
|
||||
this.cam_zoom = new System.Windows.Forms.PictureBox();
|
||||
@@ -180,12 +181,21 @@
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label27 = new System.Windows.Forms.Label();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.tab_SuctionCup = new System.Windows.Forms.TabPage();
|
||||
this.groupBox8 = new System.Windows.Forms.GroupBox();
|
||||
this.button17 = new System.Windows.Forms.Button();
|
||||
this.button16 = new System.Windows.Forms.Button();
|
||||
this.button15 = new System.Windows.Forms.Button();
|
||||
this.button14 = new System.Windows.Forms.Button();
|
||||
this.groupBox7 = new System.Windows.Forms.GroupBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label33 = new System.Windows.Forms.Label();
|
||||
this.button18 = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.cob_Robot_ID = new System.Windows.Forms.ComboBox();
|
||||
this.lbl_Refresh_ID = new System.Windows.Forms.Label();
|
||||
this.tim_IO_Refresh = new System.Windows.Forms.Timer(this.components);
|
||||
this.rit_Coord = new System.Windows.Forms.RichTextBox();
|
||||
this.label32 = new System.Windows.Forms.Label();
|
||||
this.tac_MainForm.SuspendLayout();
|
||||
this.tap_Axis.SuspendLayout();
|
||||
this.grb_R.SuspendLayout();
|
||||
@@ -207,11 +217,14 @@
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.grb_pos1.SuspendLayout();
|
||||
this.grb_temport.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tab_Zoom.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cam_zoom)).BeginInit();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.tab_SuctionCup.SuspendLayout();
|
||||
this.groupBox8.SuspendLayout();
|
||||
this.groupBox7.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -233,7 +246,8 @@
|
||||
this.tac_MainForm.Controls.Add(this.tap_Move);
|
||||
this.tac_MainForm.Controls.Add(this.tap_Cam);
|
||||
this.tac_MainForm.Controls.Add(this.tap_tempCtrl);
|
||||
this.tac_MainForm.Controls.Add(this.tabPage1);
|
||||
this.tac_MainForm.Controls.Add(this.tab_Zoom);
|
||||
this.tac_MainForm.Controls.Add(this.tab_SuctionCup);
|
||||
this.tac_MainForm.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tac_MainForm.Location = new System.Drawing.Point(0, 0);
|
||||
this.tac_MainForm.Name = "tac_MainForm";
|
||||
@@ -251,7 +265,7 @@
|
||||
this.tap_Axis.Controls.Add(this.grb_X);
|
||||
this.tap_Axis.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_Axis.Name = "tap_Axis";
|
||||
this.tap_Axis.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tap_Axis.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tap_Axis.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_Axis.TabIndex = 0;
|
||||
this.tap_Axis.Text = "轴移动";
|
||||
@@ -466,7 +480,7 @@
|
||||
this.tap_IO.Controls.Add(this.grb_Input);
|
||||
this.tap_IO.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_IO.Name = "tap_IO";
|
||||
this.tap_IO.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tap_IO.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tap_IO.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_IO.TabIndex = 1;
|
||||
this.tap_IO.Text = "IO信号显示";
|
||||
@@ -757,7 +771,7 @@
|
||||
this.tap_joint.Controls.Add(this.lbl_Joint_Number);
|
||||
this.tap_joint.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_joint.Name = "tap_joint";
|
||||
this.tap_joint.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tap_joint.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tap_joint.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_joint.TabIndex = 2;
|
||||
this.tap_joint.Text = "关节状态";
|
||||
@@ -873,7 +887,7 @@
|
||||
this.tap_Move.Controls.Add(this.btn_Start);
|
||||
this.tap_Move.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_Move.Name = "tap_Move";
|
||||
this.tap_Move.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tap_Move.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tap_Move.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_Move.TabIndex = 3;
|
||||
this.tap_Move.Text = "点位运动";
|
||||
@@ -1015,9 +1029,9 @@
|
||||
this.tap_Cam.Controls.Add(this.cam_btn_2);
|
||||
this.tap_Cam.Controls.Add(this.cam_btn_1);
|
||||
this.tap_Cam.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_Cam.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tap_Cam.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tap_Cam.Name = "tap_Cam";
|
||||
this.tap_Cam.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tap_Cam.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.tap_Cam.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_Cam.TabIndex = 4;
|
||||
this.tap_Cam.Text = "晶体检测";
|
||||
@@ -1037,7 +1051,7 @@
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(682, 49);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox1.TabIndex = 16;
|
||||
@@ -1047,7 +1061,7 @@
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(476, 53);
|
||||
this.checkBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.checkBox4.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(61, 21);
|
||||
this.checkBox4.TabIndex = 15;
|
||||
@@ -1059,7 +1073,7 @@
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(411, 53);
|
||||
this.checkBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.checkBox3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(61, 21);
|
||||
this.checkBox3.TabIndex = 14;
|
||||
@@ -1071,7 +1085,7 @@
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(345, 53);
|
||||
this.checkBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.checkBox2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(61, 21);
|
||||
this.checkBox2.TabIndex = 13;
|
||||
@@ -1083,7 +1097,7 @@
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(281, 53);
|
||||
this.checkBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.checkBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(61, 21);
|
||||
this.checkBox1.TabIndex = 12;
|
||||
@@ -1094,7 +1108,7 @@
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(653, 328);
|
||||
this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(100, 29);
|
||||
this.button2.TabIndex = 11;
|
||||
@@ -1105,7 +1119,7 @@
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Location = new System.Drawing.Point(531, 104);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(222, 184);
|
||||
this.pictureBox1.TabIndex = 10;
|
||||
@@ -1115,7 +1129,7 @@
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(531, 328);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(97, 29);
|
||||
this.button1.TabIndex = 9;
|
||||
@@ -1126,7 +1140,7 @@
|
||||
// cam_feed
|
||||
//
|
||||
this.cam_feed.Location = new System.Drawing.Point(281, 104);
|
||||
this.cam_feed.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_feed.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_feed.Name = "cam_feed";
|
||||
this.cam_feed.Size = new System.Drawing.Size(222, 184);
|
||||
this.cam_feed.TabIndex = 8;
|
||||
@@ -1136,7 +1150,7 @@
|
||||
// cam_shooting
|
||||
//
|
||||
this.cam_shooting.Location = new System.Drawing.Point(351, 328);
|
||||
this.cam_shooting.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_shooting.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_shooting.Name = "cam_shooting";
|
||||
this.cam_shooting.Size = new System.Drawing.Size(95, 29);
|
||||
this.cam_shooting.TabIndex = 7;
|
||||
@@ -1147,7 +1161,7 @@
|
||||
// init_pos_btn
|
||||
//
|
||||
this.init_pos_btn.Location = new System.Drawing.Point(81, 328);
|
||||
this.init_pos_btn.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.init_pos_btn.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.init_pos_btn.Name = "init_pos_btn";
|
||||
this.init_pos_btn.Size = new System.Drawing.Size(85, 29);
|
||||
this.init_pos_btn.TabIndex = 4;
|
||||
@@ -1158,7 +1172,7 @@
|
||||
// cam_btn_4
|
||||
//
|
||||
this.cam_btn_4.Location = new System.Drawing.Point(81, 249);
|
||||
this.cam_btn_4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_btn_4.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_btn_4.Name = "cam_btn_4";
|
||||
this.cam_btn_4.Size = new System.Drawing.Size(85, 29);
|
||||
this.cam_btn_4.TabIndex = 3;
|
||||
@@ -1169,7 +1183,7 @@
|
||||
// cam_btn_3
|
||||
//
|
||||
this.cam_btn_3.Location = new System.Drawing.Point(81, 183);
|
||||
this.cam_btn_3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_btn_3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_btn_3.Name = "cam_btn_3";
|
||||
this.cam_btn_3.Size = new System.Drawing.Size(85, 29);
|
||||
this.cam_btn_3.TabIndex = 2;
|
||||
@@ -1180,7 +1194,7 @@
|
||||
// cam_btn_2
|
||||
//
|
||||
this.cam_btn_2.Location = new System.Drawing.Point(81, 117);
|
||||
this.cam_btn_2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_btn_2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_btn_2.Name = "cam_btn_2";
|
||||
this.cam_btn_2.Size = new System.Drawing.Size(85, 29);
|
||||
this.cam_btn_2.TabIndex = 1;
|
||||
@@ -1191,7 +1205,7 @@
|
||||
// cam_btn_1
|
||||
//
|
||||
this.cam_btn_1.Location = new System.Drawing.Point(81, 53);
|
||||
this.cam_btn_1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_btn_1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_btn_1.Name = "cam_btn_1";
|
||||
this.cam_btn_1.Size = new System.Drawing.Size(85, 29);
|
||||
this.cam_btn_1.TabIndex = 0;
|
||||
@@ -1207,9 +1221,9 @@
|
||||
this.tap_tempCtrl.Controls.Add(this.grb_pos1);
|
||||
this.tap_tempCtrl.Controls.Add(this.grb_temport);
|
||||
this.tap_tempCtrl.Location = new System.Drawing.Point(4, 22);
|
||||
this.tap_tempCtrl.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tap_tempCtrl.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tap_tempCtrl.Name = "tap_tempCtrl";
|
||||
this.tap_tempCtrl.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tap_tempCtrl.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.tap_tempCtrl.Size = new System.Drawing.Size(807, 502);
|
||||
this.tap_tempCtrl.TabIndex = 5;
|
||||
this.tap_tempCtrl.Text = "温度控制";
|
||||
@@ -1228,9 +1242,9 @@
|
||||
this.groupBox3.Controls.Add(this.label21);
|
||||
this.groupBox3.Controls.Add(this.label22);
|
||||
this.groupBox3.Location = new System.Drawing.Point(41, 410);
|
||||
this.groupBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox3.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox3.Size = new System.Drawing.Size(729, 67);
|
||||
this.groupBox3.TabIndex = 11;
|
||||
this.groupBox3.TabStop = false;
|
||||
@@ -1239,7 +1253,7 @@
|
||||
// textBox9
|
||||
//
|
||||
this.textBox9.Location = new System.Drawing.Point(487, 26);
|
||||
this.textBox9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox9.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox9.Name = "textBox9";
|
||||
this.textBox9.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox9.TabIndex = 15;
|
||||
@@ -1268,7 +1282,7 @@
|
||||
// button11
|
||||
//
|
||||
this.button11.Location = new System.Drawing.Point(623, 18);
|
||||
this.button11.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button11.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button11.Name = "button11";
|
||||
this.button11.Size = new System.Drawing.Size(75, 27);
|
||||
this.button11.TabIndex = 7;
|
||||
@@ -1279,7 +1293,7 @@
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(206, 25);
|
||||
this.textBox5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox5.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox5.TabIndex = 8;
|
||||
@@ -1336,9 +1350,9 @@
|
||||
this.groupBox2.Controls.Add(this.label16);
|
||||
this.groupBox2.Controls.Add(this.label17);
|
||||
this.groupBox2.Location = new System.Drawing.Point(41, 325);
|
||||
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox2.Size = new System.Drawing.Size(729, 67);
|
||||
this.groupBox2.TabIndex = 10;
|
||||
this.groupBox2.TabStop = false;
|
||||
@@ -1347,7 +1361,7 @@
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(487, 25);
|
||||
this.textBox8.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox8.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox8.TabIndex = 14;
|
||||
@@ -1375,7 +1389,7 @@
|
||||
// button9
|
||||
//
|
||||
this.button9.Location = new System.Drawing.Point(623, 20);
|
||||
this.button9.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button9.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button9.Name = "button9";
|
||||
this.button9.Size = new System.Drawing.Size(75, 27);
|
||||
this.button9.TabIndex = 7;
|
||||
@@ -1386,7 +1400,7 @@
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(206, 25);
|
||||
this.textBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox4.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox4.TabIndex = 8;
|
||||
@@ -1443,9 +1457,9 @@
|
||||
this.groupBox1.Controls.Add(this.label11);
|
||||
this.groupBox1.Controls.Add(this.label12);
|
||||
this.groupBox1.Location = new System.Drawing.Point(41, 240);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox1.Size = new System.Drawing.Size(729, 67);
|
||||
this.groupBox1.TabIndex = 7;
|
||||
this.groupBox1.TabStop = false;
|
||||
@@ -1455,7 +1469,7 @@
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(487, 26);
|
||||
this.textBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox7.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox7.TabIndex = 13;
|
||||
@@ -1483,7 +1497,7 @@
|
||||
// button7
|
||||
//
|
||||
this.button7.Location = new System.Drawing.Point(623, 21);
|
||||
this.button7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button7.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button7.Name = "button7";
|
||||
this.button7.Size = new System.Drawing.Size(75, 27);
|
||||
this.button7.TabIndex = 7;
|
||||
@@ -1494,7 +1508,7 @@
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(206, 25);
|
||||
this.textBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox3.TabIndex = 8;
|
||||
@@ -1551,9 +1565,9 @@
|
||||
this.grb_pos1.Controls.Add(this.label4);
|
||||
this.grb_pos1.Controls.Add(this.label3);
|
||||
this.grb_pos1.Location = new System.Drawing.Point(41, 151);
|
||||
this.grb_pos1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.grb_pos1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.grb_pos1.Name = "grb_pos1";
|
||||
this.grb_pos1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.grb_pos1.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.grb_pos1.Size = new System.Drawing.Size(729, 67);
|
||||
this.grb_pos1.TabIndex = 6;
|
||||
this.grb_pos1.TabStop = false;
|
||||
@@ -1563,7 +1577,7 @@
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(487, 26);
|
||||
this.textBox6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox6.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox6.TabIndex = 12;
|
||||
@@ -1591,7 +1605,7 @@
|
||||
// button4
|
||||
//
|
||||
this.button4.Location = new System.Drawing.Point(623, 21);
|
||||
this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button4.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(75, 27);
|
||||
this.button4.TabIndex = 7;
|
||||
@@ -1602,7 +1616,7 @@
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(206, 26);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(68, 21);
|
||||
this.textBox2.TabIndex = 8;
|
||||
@@ -1657,9 +1671,9 @@
|
||||
this.grb_temport.Controls.Add(this.label2);
|
||||
this.grb_temport.Controls.Add(this.button3);
|
||||
this.grb_temport.Location = new System.Drawing.Point(41, 20);
|
||||
this.grb_temport.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.grb_temport.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.grb_temport.Name = "grb_temport";
|
||||
this.grb_temport.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.grb_temport.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.grb_temport.Size = new System.Drawing.Size(181, 113);
|
||||
this.grb_temport.TabIndex = 3;
|
||||
this.grb_temport.TabStop = false;
|
||||
@@ -1669,7 +1683,7 @@
|
||||
//
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Location = new System.Drawing.Point(72, 31);
|
||||
this.comboBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.comboBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(62, 20);
|
||||
this.comboBox1.TabIndex = 5;
|
||||
@@ -1688,7 +1702,7 @@
|
||||
// button3
|
||||
//
|
||||
this.button3.Location = new System.Drawing.Point(29, 67);
|
||||
this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(104, 27);
|
||||
this.button3.TabIndex = 0;
|
||||
@@ -1696,21 +1710,21 @@
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click_1);
|
||||
//
|
||||
// tabPage1
|
||||
// tab_Zoom
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.groupBox6);
|
||||
this.tabPage1.Controls.Add(this.cam_zoom);
|
||||
this.tabPage1.Controls.Add(this.groupBox5);
|
||||
this.tabPage1.Controls.Add(this.groupBox4);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tabPage1.Size = new System.Drawing.Size(807, 502);
|
||||
this.tabPage1.TabIndex = 6;
|
||||
this.tabPage1.Text = "变倍控制";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click_1);
|
||||
this.tab_Zoom.Controls.Add(this.groupBox6);
|
||||
this.tab_Zoom.Controls.Add(this.cam_zoom);
|
||||
this.tab_Zoom.Controls.Add(this.groupBox5);
|
||||
this.tab_Zoom.Controls.Add(this.groupBox4);
|
||||
this.tab_Zoom.Location = new System.Drawing.Point(4, 22);
|
||||
this.tab_Zoom.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tab_Zoom.Name = "tab_Zoom";
|
||||
this.tab_Zoom.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.tab_Zoom.Size = new System.Drawing.Size(807, 502);
|
||||
this.tab_Zoom.TabIndex = 6;
|
||||
this.tab_Zoom.Text = "变倍控制";
|
||||
this.tab_Zoom.UseVisualStyleBackColor = true;
|
||||
this.tab_Zoom.Click += new System.EventHandler(this.tabPage1_Click_1);
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
@@ -1718,18 +1732,28 @@
|
||||
this.groupBox6.Controls.Add(this.button10);
|
||||
this.groupBox6.Controls.Add(this.button12);
|
||||
this.groupBox6.Location = new System.Drawing.Point(45, 321);
|
||||
this.groupBox6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox6.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox6.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox6.Size = new System.Drawing.Size(192, 108);
|
||||
this.groupBox6.TabIndex = 7;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "运动控制";
|
||||
//
|
||||
// label32
|
||||
//
|
||||
this.label32.AutoSize = true;
|
||||
this.label32.Location = new System.Drawing.Point(11, 32);
|
||||
this.label32.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label32.Name = "label32";
|
||||
this.label32.Size = new System.Drawing.Size(65, 12);
|
||||
this.label32.TabIndex = 10;
|
||||
this.label32.Text = "倍数选择:";
|
||||
//
|
||||
// button10
|
||||
//
|
||||
this.button10.Location = new System.Drawing.Point(100, 56);
|
||||
this.button10.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button10.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button10.Name = "button10";
|
||||
this.button10.Size = new System.Drawing.Size(88, 27);
|
||||
this.button10.TabIndex = 7;
|
||||
@@ -1740,7 +1764,7 @@
|
||||
// button12
|
||||
//
|
||||
this.button12.Location = new System.Drawing.Point(4, 56);
|
||||
this.button12.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button12.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button12.Name = "button12";
|
||||
this.button12.Size = new System.Drawing.Size(88, 27);
|
||||
this.button12.TabIndex = 6;
|
||||
@@ -1751,7 +1775,7 @@
|
||||
// cam_zoom
|
||||
//
|
||||
this.cam_zoom.Location = new System.Drawing.Point(289, 39);
|
||||
this.cam_zoom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.cam_zoom.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cam_zoom.Name = "cam_zoom";
|
||||
this.cam_zoom.Size = new System.Drawing.Size(481, 390);
|
||||
this.cam_zoom.TabIndex = 6;
|
||||
@@ -1767,9 +1791,9 @@
|
||||
this.groupBox5.Controls.Add(this.button8);
|
||||
this.groupBox5.Controls.Add(this.button6);
|
||||
this.groupBox5.Location = new System.Drawing.Point(45, 159);
|
||||
this.groupBox5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox5.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox5.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox5.Size = new System.Drawing.Size(192, 151);
|
||||
this.groupBox5.TabIndex = 5;
|
||||
this.groupBox5.TabStop = false;
|
||||
@@ -1818,7 +1842,7 @@
|
||||
// button8
|
||||
//
|
||||
this.button8.Location = new System.Drawing.Point(100, 107);
|
||||
this.button8.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button8.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button8.Name = "button8";
|
||||
this.button8.Size = new System.Drawing.Size(88, 27);
|
||||
this.button8.TabIndex = 7;
|
||||
@@ -1829,7 +1853,7 @@
|
||||
// button6
|
||||
//
|
||||
this.button6.Location = new System.Drawing.Point(4, 107);
|
||||
this.button6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button6.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button6.Name = "button6";
|
||||
this.button6.Size = new System.Drawing.Size(88, 27);
|
||||
this.button6.TabIndex = 6;
|
||||
@@ -1843,19 +1867,20 @@
|
||||
this.groupBox4.Controls.Add(this.label27);
|
||||
this.groupBox4.Controls.Add(this.button5);
|
||||
this.groupBox4.Location = new System.Drawing.Point(45, 29);
|
||||
this.groupBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox4.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.groupBox4.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox4.Size = new System.Drawing.Size(192, 113);
|
||||
this.groupBox4.TabIndex = 4;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "串口设置";
|
||||
this.groupBox4.Enter += new System.EventHandler(this.groupBox4_Enter);
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Location = new System.Drawing.Point(72, 31);
|
||||
this.comboBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.comboBox2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.Size = new System.Drawing.Size(62, 20);
|
||||
this.comboBox2.TabIndex = 5;
|
||||
@@ -1874,7 +1899,7 @@
|
||||
// button5
|
||||
//
|
||||
this.button5.Location = new System.Drawing.Point(29, 67);
|
||||
this.button5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.button5.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(104, 27);
|
||||
this.button5.TabIndex = 0;
|
||||
@@ -1882,6 +1907,121 @@
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||
//
|
||||
// tab_SuctionCup
|
||||
//
|
||||
this.tab_SuctionCup.Controls.Add(this.groupBox8);
|
||||
this.tab_SuctionCup.Controls.Add(this.groupBox7);
|
||||
this.tab_SuctionCup.Location = new System.Drawing.Point(4, 22);
|
||||
this.tab_SuctionCup.Name = "tab_SuctionCup";
|
||||
this.tab_SuctionCup.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tab_SuctionCup.Size = new System.Drawing.Size(807, 502);
|
||||
this.tab_SuctionCup.TabIndex = 7;
|
||||
this.tab_SuctionCup.Text = "真空吸盘";
|
||||
this.tab_SuctionCup.UseVisualStyleBackColor = true;
|
||||
this.tab_SuctionCup.Click += new System.EventHandler(this.tab_SuctionCup_Click);
|
||||
//
|
||||
// groupBox8
|
||||
//
|
||||
this.groupBox8.Controls.Add(this.button17);
|
||||
this.groupBox8.Controls.Add(this.button16);
|
||||
this.groupBox8.Controls.Add(this.button15);
|
||||
this.groupBox8.Controls.Add(this.button14);
|
||||
this.groupBox8.Location = new System.Drawing.Point(43, 180);
|
||||
this.groupBox8.Name = "groupBox8";
|
||||
this.groupBox8.Size = new System.Drawing.Size(192, 127);
|
||||
this.groupBox8.TabIndex = 11;
|
||||
this.groupBox8.TabStop = false;
|
||||
this.groupBox8.Text = "吸盘点位";
|
||||
//
|
||||
// button17
|
||||
//
|
||||
this.button17.Location = new System.Drawing.Point(10, 29);
|
||||
this.button17.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button17.Name = "button17";
|
||||
this.button17.Size = new System.Drawing.Size(85, 29);
|
||||
this.button17.TabIndex = 5;
|
||||
this.button17.Text = "点位1";
|
||||
this.button17.UseVisualStyleBackColor = true;
|
||||
this.button17.Click += new System.EventHandler(this.button17_Click);
|
||||
//
|
||||
// button16
|
||||
//
|
||||
this.button16.Location = new System.Drawing.Point(99, 29);
|
||||
this.button16.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button16.Name = "button16";
|
||||
this.button16.Size = new System.Drawing.Size(85, 29);
|
||||
this.button16.TabIndex = 6;
|
||||
this.button16.Text = "点位2";
|
||||
this.button16.UseVisualStyleBackColor = true;
|
||||
this.button16.Click += new System.EventHandler(this.button16_Click);
|
||||
//
|
||||
// button15
|
||||
//
|
||||
this.button15.Location = new System.Drawing.Point(10, 75);
|
||||
this.button15.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button15.Name = "button15";
|
||||
this.button15.Size = new System.Drawing.Size(85, 29);
|
||||
this.button15.TabIndex = 7;
|
||||
this.button15.Text = "点位3";
|
||||
this.button15.UseVisualStyleBackColor = true;
|
||||
this.button15.Click += new System.EventHandler(this.button15_Click);
|
||||
//
|
||||
// button14
|
||||
//
|
||||
this.button14.Location = new System.Drawing.Point(99, 75);
|
||||
this.button14.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button14.Name = "button14";
|
||||
this.button14.Size = new System.Drawing.Size(85, 29);
|
||||
this.button14.TabIndex = 8;
|
||||
this.button14.Text = "点位4";
|
||||
this.button14.UseVisualStyleBackColor = true;
|
||||
this.button14.Click += new System.EventHandler(this.button14_Click);
|
||||
//
|
||||
// groupBox7
|
||||
//
|
||||
this.groupBox7.Controls.Add(this.comboBox3);
|
||||
this.groupBox7.Controls.Add(this.label33);
|
||||
this.groupBox7.Controls.Add(this.button18);
|
||||
this.groupBox7.Location = new System.Drawing.Point(43, 42);
|
||||
this.groupBox7.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox7.Name = "groupBox7";
|
||||
this.groupBox7.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBox7.Size = new System.Drawing.Size(192, 113);
|
||||
this.groupBox7.TabIndex = 10;
|
||||
this.groupBox7.TabStop = false;
|
||||
this.groupBox7.Text = "串口设置";
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Location = new System.Drawing.Point(72, 31);
|
||||
this.comboBox3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.Size = new System.Drawing.Size(62, 20);
|
||||
this.comboBox3.TabIndex = 5;
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
//
|
||||
// label33
|
||||
//
|
||||
this.label33.AutoSize = true;
|
||||
this.label33.Location = new System.Drawing.Point(27, 33);
|
||||
this.label33.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label33.Name = "label33";
|
||||
this.label33.Size = new System.Drawing.Size(41, 12);
|
||||
this.label33.TabIndex = 4;
|
||||
this.label33.Text = "端口:";
|
||||
//
|
||||
// button18
|
||||
//
|
||||
this.button18.Location = new System.Drawing.Point(29, 67);
|
||||
this.button18.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.button18.Name = "button18";
|
||||
this.button18.Size = new System.Drawing.Size(104, 27);
|
||||
this.button18.TabIndex = 0;
|
||||
this.button18.Text = "打开串口";
|
||||
this.button18.UseVisualStyleBackColor = true;
|
||||
this.button18.Click += new System.EventHandler(this.button18_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.tac_MainForm);
|
||||
@@ -1924,16 +2064,6 @@
|
||||
this.rit_Coord.Text = "";
|
||||
this.rit_Coord.TextChanged += new System.EventHandler(this.rit_Coord_TextChanged);
|
||||
//
|
||||
// label32
|
||||
//
|
||||
this.label32.AutoSize = true;
|
||||
this.label32.Location = new System.Drawing.Point(11, 32);
|
||||
this.label32.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label32.Name = "label32";
|
||||
this.label32.Size = new System.Drawing.Size(65, 12);
|
||||
this.label32.TabIndex = 10;
|
||||
this.label32.Text = "倍数选择:";
|
||||
//
|
||||
// ShowForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
@@ -1986,7 +2116,7 @@
|
||||
this.grb_pos1.PerformLayout();
|
||||
this.grb_temport.ResumeLayout(false);
|
||||
this.grb_temport.PerformLayout();
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tab_Zoom.ResumeLayout(false);
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.groupBox6.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cam_zoom)).EndInit();
|
||||
@@ -1994,6 +2124,10 @@
|
||||
this.groupBox5.PerformLayout();
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox4.PerformLayout();
|
||||
this.tab_SuctionCup.ResumeLayout(false);
|
||||
this.groupBox8.ResumeLayout(false);
|
||||
this.groupBox7.ResumeLayout(false);
|
||||
this.groupBox7.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
@@ -2141,7 +2275,7 @@
|
||||
private System.Windows.Forms.TextBox textBox9;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tab_Zoom;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label27;
|
||||
@@ -2158,6 +2292,16 @@
|
||||
private System.Windows.Forms.Button button12;
|
||||
private System.Windows.Forms.PictureBox cam_zoom;
|
||||
private System.Windows.Forms.Label label32;
|
||||
private System.Windows.Forms.TabPage tab_SuctionCup;
|
||||
private System.Windows.Forms.Button button14;
|
||||
private System.Windows.Forms.Button button15;
|
||||
private System.Windows.Forms.Button button16;
|
||||
private System.Windows.Forms.Button button17;
|
||||
private System.Windows.Forms.GroupBox groupBox8;
|
||||
private System.Windows.Forms.GroupBox groupBox7;
|
||||
private System.Windows.Forms.ComboBox comboBox3;
|
||||
private System.Windows.Forms.Label label33;
|
||||
private System.Windows.Forms.Button button18;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace HitBotCSharpDemo
|
||||
Thread thread_PosMove;
|
||||
private float[][] cameraPositions;
|
||||
private string filePath = "Cam_pos_path.txt";
|
||||
private float[][] suctionCupPositions;
|
||||
private string suctionCupFilePath = "SuctionCup_pos.txt";
|
||||
|
||||
private TcpClient tcpClient;
|
||||
private NetworkStream networkStream;
|
||||
@@ -71,6 +73,7 @@ namespace HitBotCSharpDemo
|
||||
private CameraManager cameraManager;
|
||||
private tempControl tempControl;
|
||||
private ZoomControl zoomControl;
|
||||
private SuctionCupControl suctionCupControl;
|
||||
private ControlBeanEx robot;
|
||||
public ShowForm()
|
||||
{
|
||||
@@ -81,23 +84,27 @@ namespace HitBotCSharpDemo
|
||||
//InitializeCamera(); // 初始化相机
|
||||
Control.CheckForIllegalCrossThreadCalls = false;
|
||||
}
|
||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
{
|
||||
// 停止循环检测
|
||||
if (isCycleRunning)
|
||||
{
|
||||
StopCycle();
|
||||
// 恢复控件状态
|
||||
SetControlsEnabled(true);
|
||||
}
|
||||
// 停止相机
|
||||
cameraManager?.StopCamera();
|
||||
//protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
//{
|
||||
// // 停止循环检测
|
||||
// if (isCycleRunning)
|
||||
// {
|
||||
// StopCycle();
|
||||
// // 恢复控件状态
|
||||
// SetControlsEnabled(true);
|
||||
// }
|
||||
|
||||
StopDetection();
|
||||
// 终结SDK
|
||||
SDKSystem.Finalize();
|
||||
base.OnFormClosing(e);
|
||||
}
|
||||
// // 停止相机
|
||||
// cameraManager?.StopCamera();
|
||||
// StopDetection();
|
||||
|
||||
// // 添加吸盘控制串口关闭
|
||||
// suctionCupControl?.OnFormClosing();
|
||||
|
||||
// // 终结SDK
|
||||
// SDKSystem.Finalize();
|
||||
// base.OnFormClosing(e);
|
||||
//}
|
||||
|
||||
private void LoadCameraPositions()
|
||||
{
|
||||
@@ -161,6 +168,59 @@ namespace HitBotCSharpDemo
|
||||
MessageBox.Show($"加载点位文件时出错:{ex.Message}");
|
||||
}
|
||||
}
|
||||
private void LoadSuctionCupPositions()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(suctionCupFilePath))
|
||||
{
|
||||
string[] lines = File.ReadAllLines(suctionCupFilePath);
|
||||
suctionCupPositions = new float[4][]; // 存储4个点位
|
||||
int positionIndex = 0;
|
||||
foreach (string line in lines)
|
||||
{
|
||||
// 跳过注释行(以#开头)和空行
|
||||
if (string.IsNullOrWhiteSpace(line) || line.StartsWith("#"))
|
||||
continue;
|
||||
if (positionIndex < 4)
|
||||
{
|
||||
string[] coords = line.Split(',');
|
||||
if (coords.Length == 4)
|
||||
{
|
||||
suctionCupPositions[positionIndex] = new float[4];
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (float.TryParse(coords[i].Trim(), out float value))
|
||||
{
|
||||
suctionCupPositions[positionIndex][i] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"解析吸盘点位第{positionIndex + 1}行第{i + 1}个坐标时出错:{coords[i]}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
positionIndex++;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"吸盘点位第{positionIndex + 1}行坐标格式错误,应该包含4个值(X,Y,Z,R)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"未找到文件:{suctionCupFilePath}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"加载吸盘点位文件时出错:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveToPosition(int positionIndex)
|
||||
{
|
||||
if (!isInit)
|
||||
@@ -200,6 +260,68 @@ namespace HitBotCSharpDemo
|
||||
MessageBox.Show($"移动到点位{positionIndex + 1}时出错:{ex.Message}");
|
||||
}
|
||||
}
|
||||
private void MoveToSuctionCupPosition(int positionIndex)
|
||||
{
|
||||
if (!isInit)
|
||||
{
|
||||
MessageBox.Show("机械臂未初始化");
|
||||
return;
|
||||
}
|
||||
if (suctionCupPositions == null || positionIndex >= suctionCupPositions.Length || suctionCupPositions[positionIndex] == null)
|
||||
{
|
||||
MessageBox.Show($"吸盘点位{positionIndex + 1}数据未加载或无效");
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
// 获取当前位置参数
|
||||
robot.get_scara_param();
|
||||
int currentHand = robot.get_lr(); // 使用当前手系
|
||||
float targetX = suctionCupPositions[positionIndex][0];
|
||||
float targetY = suctionCupPositions[positionIndex][1];
|
||||
float targetZ = suctionCupPositions[positionIndex][2];
|
||||
float targetR = suctionCupPositions[positionIndex][3];
|
||||
float safeZ = -97.6206f; // 安全Z轴高度
|
||||
robot.new_set_acc(30, 30, 30, 30); // 设置运动参数
|
||||
|
||||
// 判断当前Z轴高度是否小于安全高度
|
||||
if (robot.z < safeZ)
|
||||
{
|
||||
// 第一步:先将Z轴移动到安全高度
|
||||
int result0 = robot.new_movej_xyz_lr(robot.x, robot.y, safeZ, robot.rotation, 100, 0, currentHand);
|
||||
if (result0 != 1)
|
||||
{
|
||||
MessageBox.Show($"移动Z轴到安全高度失败,返回值:{result0}");
|
||||
return;
|
||||
}
|
||||
// 等待运动完成
|
||||
robot.wait_stop();
|
||||
robot.get_scara_param();
|
||||
}
|
||||
|
||||
// 先移动XY轴和R轴,保持当前Z轴位置
|
||||
int result1 = robot.new_movej_xyz_lr(targetX, targetY, robot.z, targetR, 100, 0, currentHand);
|
||||
if (result1 != 1)
|
||||
{
|
||||
MessageBox.Show($"移动到吸盘点位{positionIndex + 1}的XY位置失败,返回值:{result1}");
|
||||
return;
|
||||
}
|
||||
robot.wait_stop();
|
||||
robot.get_scara_param();
|
||||
|
||||
// 移动Z轴到目标位置
|
||||
int result2 = robot.new_movej_xyz_lr(targetX, targetY, targetZ, targetR, 100, 0, currentHand);
|
||||
if (result2 != 1)
|
||||
{
|
||||
MessageBox.Show($"移动到吸盘点位{positionIndex + 1}的Z位置失败,返回值:{result2}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"移动到吸盘点位{positionIndex + 1}时出错:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -207,6 +329,7 @@ namespace HitBotCSharpDemo
|
||||
lbl_Current_Output = new Label[] { lbl_OutputState_0, lbl_OutputState_1, lbl_OutputState_2, lbl_OutputState_3, lbl_OutputState_4, lbl_OutputState_5 };//输出信号数组
|
||||
|
||||
LoadCameraPositions();
|
||||
LoadSuctionCupPositions();
|
||||
|
||||
cameraManager = new CameraManager(cam_feed, cam_zoom);
|
||||
cameraManager.LoadConfiguration();
|
||||
@@ -221,6 +344,9 @@ namespace HitBotCSharpDemo
|
||||
zoomControl = new ZoomControl(this);
|
||||
zoomControl.LoadAvailablePorts(comboBox2);
|
||||
|
||||
suctionCupControl = new SuctionCupControl();
|
||||
suctionCupControl.LoadAvailablePorts(comboBox3);
|
||||
|
||||
textBox6.Click += TextBox_Click;
|
||||
textBox7.Click += TextBox_Click;
|
||||
textBox8.Click += TextBox_Click;
|
||||
@@ -1697,5 +1823,44 @@ namespace HitBotCSharpDemo
|
||||
cameraManager.SetZoomExposureAndSave(734515f);
|
||||
}
|
||||
|
||||
private void groupBox4_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void tab_SuctionCup_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
suctionCupControl.OnComboBoxSelectedIndexChanged(comboBox3, button18);
|
||||
}
|
||||
|
||||
private void button18_Click(object sender, EventArgs e)
|
||||
{
|
||||
suctionCupControl.ToggleSerialPort(button18, comboBox3);
|
||||
}
|
||||
|
||||
private void button17_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveToSuctionCupPosition(0); // 移动到第1个吸盘点位
|
||||
}
|
||||
|
||||
private void button16_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveToSuctionCupPosition(1); // 移动到第2个吸盘点位
|
||||
}
|
||||
|
||||
private void button15_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveToSuctionCupPosition(2); // 移动到第3个吸盘点位
|
||||
}
|
||||
|
||||
private void button14_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveToSuctionCupPosition(3); // 移动到第4个吸盘点位
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
193
HitBotCSharpDemo/SuctionCupControl.cs
Normal file
193
HitBotCSharpDemo/SuctionCupControl.cs
Normal file
@@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HitBotCSharpDemo
|
||||
{
|
||||
internal class SuctionCupControl
|
||||
{
|
||||
private SerialPort suctioncupport;
|
||||
|
||||
public SuctionCupControl()
|
||||
{
|
||||
InitializeSerialPort();
|
||||
}
|
||||
private void InitializeSerialPort()
|
||||
{
|
||||
suctioncupport = new SerialPort();
|
||||
suctioncupport.BaudRate = 115200; // 波特率
|
||||
suctioncupport.DataBits = 8; // 数据位
|
||||
suctioncupport.StopBits = StopBits.One; // 停止位
|
||||
suctioncupport.Parity = Parity.None; // 奇偶校验
|
||||
suctioncupport.DataReceived += SuctioncupPort_DataReceived;
|
||||
}
|
||||
|
||||
// 数据接收事件处理
|
||||
private void SuctioncupPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string data = suctioncupport.ReadExisting();
|
||||
// 处理接收到的数据
|
||||
Console.WriteLine($"吸盘控制器返回数据: {data}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"处理吸盘控制器数据时发生错误: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadAvailablePorts(ComboBox comboBox)
|
||||
{
|
||||
try
|
||||
{
|
||||
comboBox.Items.Clear();
|
||||
string[] ports = SerialPort.GetPortNames();
|
||||
if (ports.Length > 0)
|
||||
{
|
||||
foreach (string port in ports)
|
||||
{
|
||||
comboBox.Items.Add(port);
|
||||
}
|
||||
// 默认选择第一个串口
|
||||
comboBox.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("系统中没有找到可用的串口!", "提示",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"获取串口列表时发生错误: {ex.Message}", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
public void ToggleSerialPort(Button button, ComboBox comboBox)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (suctioncupport.IsOpen)
|
||||
{
|
||||
// 串口已打开,执行关闭操作
|
||||
suctioncupport.Close();
|
||||
UpdateUIStatus(false, button, comboBox);
|
||||
MessageBox.Show("吸盘控制串口已关闭", "提示",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 串口未打开,执行打开操作
|
||||
if (string.IsNullOrEmpty(suctioncupport.PortName))
|
||||
{
|
||||
MessageBox.Show("请先选择一个串口!", "提示",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
suctioncupport.Open();
|
||||
UpdateUIStatus(true, button, comboBox);
|
||||
MessageBox.Show($"吸盘控制串口 {suctioncupport.PortName} 已成功打开", "提示",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
MessageBox.Show("串口访问被拒绝,可能已被其他程序占用!", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
MessageBox.Show("串口名称无效!", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
MessageBox.Show("串口已经处于打开状态!", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"操作串口时发生错误: {ex.Message}", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
private void UpdateUIStatus(bool isPortOpen, Button button, ComboBox comboBox)
|
||||
{
|
||||
if (isPortOpen)
|
||||
{
|
||||
button.Text = "关闭串口";
|
||||
comboBox.Enabled = false; // 串口打开时禁用选择框
|
||||
}
|
||||
else
|
||||
{
|
||||
button.Text = "打开串口";
|
||||
comboBox.Enabled = true; // 串口关闭时启用选择框
|
||||
}
|
||||
}
|
||||
// ComboBox选择变化处理方法
|
||||
public void OnComboBoxSelectedIndexChanged(ComboBox comboBox, Button button)
|
||||
{
|
||||
if (suctioncupport != null && suctioncupport.IsOpen)
|
||||
{
|
||||
try
|
||||
{
|
||||
suctioncupport.Close();
|
||||
UpdateUIStatus(false, button, comboBox);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"关闭串口时发生错误: {ex.Message}", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
// 设置新选择的串口名称
|
||||
if (comboBox.SelectedItem != null)
|
||||
{
|
||||
suctioncupport.PortName = comboBox.SelectedItem.ToString();
|
||||
}
|
||||
}
|
||||
public void SendCommand(string command)
|
||||
{
|
||||
if (suctioncupport != null && suctioncupport.IsOpen)
|
||||
{
|
||||
try
|
||||
{
|
||||
suctioncupport.Write(command);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"发送吸盘控制命令失败: {ex.Message}", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("吸盘控制串口未打开", "提示",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
// 资源释放方法
|
||||
public void OnFormClosing()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (suctioncupport != null && suctioncupport.IsOpen)
|
||||
{
|
||||
suctioncupport.Close();
|
||||
}
|
||||
suctioncupport?.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"关闭吸盘控制串口时发生错误: {ex.Message}", "错误",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -92,11 +92,7 @@ namespace HitBotCSharpDemo
|
||||
comboBox.Items.Add(port);
|
||||
}
|
||||
// 默认选择第一个串口
|
||||
if (comboBox.Items.Count > 1)
|
||||
{
|
||||
comboBox.SelectedIndex = 1;
|
||||
}
|
||||
else if (comboBox.Items.Count > 0)
|
||||
if (comboBox.Items.Count > 0)
|
||||
{
|
||||
comboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
1321
HitBotCSharpDemo/bin/x64/Debug/SDK_LOG/id_74_2025-06-26.hilog
Normal file
1321
HitBotCSharpDemo/bin/x64/Debug/SDK_LOG/id_74_2025-06-26.hilog
Normal file
File diff suppressed because it is too large
Load Diff
5
HitBotCSharpDemo/bin/x64/Debug/SuctionCup_pos.txt
Normal file
5
HitBotCSharpDemo/bin/x64/Debug/SuctionCup_pos.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
# X,Y,Z,R
|
||||
288.4058,-221.6142,-119.9981,-1005.582
|
||||
285.9093,-66.2362,-119.9775,-1005.585
|
||||
287.3429,73.4231,-118.8535,-1005.557
|
||||
286.6182,214.8166,-119.9981,-1005.582
|
||||
@@ -1 +1 @@
|
||||
9a15c0881d0b7c96d6b314536d1a93e12eee9eb0d660fbc4d189e46b449fe422
|
||||
918f8f9dd9ea6d7c9583382c2685485fc97aa9ca5866c488dc4e9d2e71f33cf4
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user