优化测试界面

更换版本号
master
lhiven 12 months ago
parent 5fe238bbe7
commit b1c82f696a

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.20.24.01")]
[assembly: AssemblyVersion("1.20.24.02")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

@ -28,20 +28,10 @@
/// </summary>
private void InitializeComponent()
{
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.button21 = new System.Windows.Forms.Button();
this.button24 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.radioButton16 = new System.Windows.Forms.RadioButton();
@ -61,91 +51,31 @@
this.radioButton9 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button14 = new System.Windows.Forms.Button();
this.button15 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// button7
//
this.button7.Location = new System.Drawing.Point(193, 25);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(89, 63);
this.button7.TabIndex = 6;
this.button7.Text = "Input上料";
this.button7.UseVisualStyleBackColor = true;
//
// button8
//
this.button8.Location = new System.Drawing.Point(299, 25);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(89, 63);
this.button8.TabIndex = 6;
this.button8.Text = "Empty上料";
this.button8.UseVisualStyleBackColor = true;
//
// button10
//
this.button10.Location = new System.Drawing.Point(68, 25);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(89, 63);
this.button10.TabIndex = 8;
this.button10.Text = "Ok料仓上料";
this.button10.UseVisualStyleBackColor = true;
//
// button21
//
this.button21.Location = new System.Drawing.Point(259, 154);
this.button21.Name = "button21";
this.button21.Size = new System.Drawing.Size(108, 53);
this.button21.TabIndex = 18;
this.button21.Text = "飞拍验证";
this.button21.UseVisualStyleBackColor = true;
this.button21.Click += new System.EventHandler(this.button21_Click);
//
// button24
//
this.button24.Location = new System.Drawing.Point(68, 154);
this.button24.ForeColor = System.Drawing.Color.Black;
this.button24.Location = new System.Drawing.Point(24, 116);
this.button24.Name = "button24";
this.button24.Size = new System.Drawing.Size(141, 53);
this.button24.Size = new System.Drawing.Size(119, 55);
this.button24.TabIndex = 20;
this.button24.Text = "重复精度验证";
this.button24.UseVisualStyleBackColor = true;
this.button24.Click += new System.EventHandler(this.button24_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(68, 276);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(141, 49);
this.button1.TabIndex = 21;
this.button1.Text = "治具5取放料测试";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// button2
//
this.button2.Location = new System.Drawing.Point(247, 276);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(141, 49);
this.button2.TabIndex = 21;
this.button2.Text = "治具5取放料测试";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// button3
//
this.button3.Location = new System.Drawing.Point(521, 183);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 22;
this.button3.Text = "button3";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(68, 387);
this.button4.ForeColor = System.Drawing.Color.Black;
this.button4.Location = new System.Drawing.Point(24, 29);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(119, 55);
this.button4.TabIndex = 23;
@ -155,7 +85,8 @@
//
// button5
//
this.button5.Location = new System.Drawing.Point(248, 387);
this.button5.ForeColor = System.Drawing.Color.Black;
this.button5.Location = new System.Drawing.Point(204, 29);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(119, 55);
this.button5.TabIndex = 23;
@ -163,46 +94,17 @@
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click_1);
//
// button6
//
this.button6.Location = new System.Drawing.Point(82, 479);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(75, 23);
this.button6.TabIndex = 24;
this.button6.Text = "button6";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click_1);
//
// button9
//
this.button9.Location = new System.Drawing.Point(247, 478);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(75, 23);
this.button9.TabIndex = 25;
this.button9.Text = "button9";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// button11
//
this.button11.Location = new System.Drawing.Point(572, 531);
this.button11.ForeColor = System.Drawing.Color.Black;
this.button11.Location = new System.Drawing.Point(68, 103);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(75, 23);
this.button11.Size = new System.Drawing.Size(223, 50);
this.button11.TabIndex = 26;
this.button11.Text = "开始测试";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// button12
//
this.button12.Location = new System.Drawing.Point(484, 355);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(129, 56);
this.button12.TabIndex = 27;
this.button12.Text = "工作前准备";
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// button13
//
this.button13.ForeColor = System.Drawing.Color.Black;
@ -234,7 +136,7 @@
this.groupBox1.Controls.Add(this.radioButton1);
this.groupBox1.Controls.Add(this.button13);
this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Location = new System.Drawing.Point(82, 628);
this.groupBox1.Location = new System.Drawing.Point(840, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(336, 187);
this.groupBox1.TabIndex = 31;
@ -435,79 +337,98 @@
//
// groupBox2
//
this.groupBox2.Location = new System.Drawing.Point(82, 522);
this.groupBox2.Controls.Add(this.comboBox1);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.textBox1);
this.groupBox2.Controls.Add(this.button11);
this.groupBox2.ForeColor = System.Drawing.Color.White;
this.groupBox2.Location = new System.Drawing.Point(415, 25);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(336, 100);
this.groupBox2.Size = new System.Drawing.Size(362, 174);
this.groupBox2.TabIndex = 32;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "groupBox2";
//
// button14
//
this.button14.Location = new System.Drawing.Point(493, 479);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(75, 23);
this.button14.TabIndex = 33;
this.button14.Text = "button14";
this.button14.UseVisualStyleBackColor = true;
this.button14.Click += new System.EventHandler(this.button14_Click);
//
// button15
//
this.button15.Location = new System.Drawing.Point(594, 479);
this.button15.Name = "button15";
this.button15.Size = new System.Drawing.Size(75, 23);
this.button15.TabIndex = 33;
this.button15.Text = "button14";
this.button15.UseVisualStyleBackColor = true;
this.button15.Click += new System.EventHandler(this.button15_Click_1);
this.groupBox2.Text = "Test";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5",
"6"});
this.comboBox1.Location = new System.Drawing.Point(103, 21);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(188, 20);
this.comboBox1.TabIndex = 29;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(54, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 12);
this.label1.TabIndex = 28;
this.label1.Text = "SN:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(103, 63);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(188, 21);
this.textBox1.TabIndex = 27;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.button24);
this.groupBox3.Controls.Add(this.button4);
this.groupBox3.Controls.Add(this.button5);
this.groupBox3.ForeColor = System.Drawing.Color.White;
this.groupBox3.Location = new System.Drawing.Point(29, 12);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(336, 187);
this.groupBox3.TabIndex = 32;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "相机";
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(54, 22);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 12);
this.label2.TabIndex = 28;
this.label2.Text = "治具:";
//
// TestFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1336, 854);
this.Controls.Add(this.button15);
this.Controls.Add(this.button14);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.button12);
this.Controls.Add(this.button11);
this.Controls.Add(this.button9);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.button24);
this.Controls.Add(this.button21);
this.Controls.Add(this.button10);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Name = "TestFrm";
this.Text = "TestFrm";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button21;
private System.Windows.Forms.Button button24;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton radioButton16;
@ -527,7 +448,10 @@
private System.Windows.Forms.RadioButton radioButton9;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button15;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
}
}

@ -87,57 +87,7 @@ namespace Rs.MotionPlat
}
private void button21_Click(object sender, EventArgs e)
{
Task.Run(() => {
//UpCameraHelper.Grab();
//string msg = VisionHelper.OneGrabOne();
//ProductLocationResult result = new ProductLocationResult();
//result.Parse(msg);
//ProductLocationFlow.Instance.Grab("test");
VisionHelper.loadTakeProductVision.ClearQueue();
AxisControl.LoadY2.ClearCompare(1);
//取点位
double[] points = new double[16];
SlotPoint startPoint = TrayPointManager.GetSlotPoint(ETrayType.Grr, 16);
SlotPoint endPoint = TrayPointManager.GetSlotPoint(ETrayType.Grr, 1);
for (int i = 0; i < 16; i++)
{
points[i] = startPoint.Y + (i * 5);
}
AxisControl.LoadX.MovePos(startPoint.X, 30);
AxisControl.LoadY1.MovePos(GlobalVar.StockSideY1, 30);
AxisControl.LoadY2.MovePos(startPoint.Y - 10, 30);
while (true)
{
if (Ops.IsStop("LoadX", "LoadY1", "LoadY2"))
{
break;
}
}
AxisControl.LoadY2.SetPosCompare(1, points);
//Thread.Sleep(1000);
AxisControl.LoadY2.CompareStatus(out short pStatus, out int count);
MessageQueue.Instance.Insert($"{string.Join(",", points)}");
MessageQueue.Instance.Insert($"Status:{pStatus}");
AxisControl.LoadY2.MovePos(endPoint.Y + 10, GlobalVar.WholeSpeed);
while (true)
{
AxisControl.LoadY2.CompareStatus(out pStatus, out count);
if (pStatus == 1)
{ break; }
}
// VisionHelper.loadTakeProductVision.OneGrabFour();
});
}
private void button22_Click(object sender, EventArgs e)
{
@ -240,11 +190,6 @@ namespace Rs.MotionPlat
});
}
private void button3_Click(object sender, EventArgs e)
{
stop = !stop;
}
private void button4_Click(object sender, EventArgs e)
{
AxisControl.LoadY2.ComparePulse(1, false);
@ -266,27 +211,11 @@ namespace Rs.MotionPlat
}
}
private void button6_Click_1(object sender, EventArgs e)
{
VisionHelper.sideCameraVision.ClearQueue(2);
}
private void button9_Click(object sender, EventArgs e)
{
VisionHelper.sideCameraVision.Grab(2,"123");
}
private void button11_Click(object sender, EventArgs e)
{
TestFixtureManager.Instance.GetTestFixture(5).StartTest("123");
}
private void button12_Click(object sender, EventArgs e)
{
Task.Run(() => {
EnvironmentPrepareFlow.Instance.Prepare();
});
int.TryParse(this.comboBox1.SelectedItem.ToString(), out int fixtureIndex);
TestFixtureManager.Instance.GetTestFixture(fixtureIndex).StartTest(this.textBox1.Text);
}
private void button13_Click(object sender, EventArgs e)
@ -318,15 +247,5 @@ namespace Rs.MotionPlat
});
}
private void button14_Click(object sender, EventArgs e)
{
BuzzerManager.Instance.On();
}
private void button15_Click_1(object sender, EventArgs e)
{
BuzzerManager.Instance.Off();
}
}
}

Loading…
Cancel
Save