优化测高,采用两点测高

master
lhiven 1 year ago
parent a1c58de4d4
commit 45169511a4

@ -522,27 +522,6 @@ namespace Rs.Framework
}
}
/// <summary>
/// 周转盘测高高度
/// </summary>
public static double TurnoverCheckBaseHeight
{
get
{
return SysConfigParam.GetValue<double>(nameof(TurnoverCheckBaseHeight));
}
}
/// <summary>
/// 测试治具测高高度 TurnoverTrayForceNozzleHeight
/// </summary>
public static double TestFixtureCheckBaseHeight
{
get
{
return SysConfigParam.GetValue<double>(nameof(TestFixtureCheckBaseHeight));
}
}
/// <summary>
/// 强力吸嘴周转盘取料高度 ExceptionTrayForceNozzleHeight
@ -697,5 +676,48 @@ namespace Rs.Framework
}
}
/// <summary>
/// 周转盘测高高度差
/// </summary>
public static double TurnoverTrayOffsetHeight
{
get
{
return SysConfigParam.GetValue<double>(nameof(TurnoverTrayOffsetHeight));
}
}
/// <summary>
/// 周转盘测高X轴偏移
/// </summary>
public static double TurnoverTrayTestHeightOffsetX
{
get
{
return SysConfigParam.GetValue<double>(nameof(TurnoverTrayTestHeightOffsetX));
}
}
/// <summary>
/// 测试治具测高高度差
/// </summary>
public static double TestFixtureTrayOffsetHeight
{
get
{
return SysConfigParam.GetValue<double>(nameof(TestFixtureTrayOffsetHeight));
}
}
/// <summary>
/// 测试治具测高X轴偏移
/// </summary>
public static double TestFixtureTrayTestHeightOffsetX
{
get
{
return SysConfigParam.GetValue<double>(nameof(TestFixtureTrayTestHeightOffsetX));
}
}
}
}

@ -738,7 +738,7 @@ namespace Rs.MotionPlat.Flow
}
break;
case ETipButton.Skip:
//镭射头过来复检,有产品则继续报警
//镭射头过来复检,有产品则继续报警
if (!LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex))
{
VacManager.TestTrayVacSuction(EVacOperator.Close, nozzle.NozzleIndex);

@ -1,4 +1,5 @@
using Rs.Framework;
using Newtonsoft.Json;
using Rs.Framework;
using Rs.Motion;
using Rs.MotionPlat.AuxiliaryEquipment;
using Rs.MotionPlat.Commom;
@ -16,7 +17,8 @@ namespace Rs.MotionPlat.Flow.SubFlow
{
,
,
,
}
/// <summary>
/// 镭射头到穴位上方
@ -27,8 +29,12 @@ namespace Rs.MotionPlat.Flow.SubFlow
string logInfo = string.Empty;
string alarmInfo = string.Empty;
bool finished = false;
bool hasProduct = false;
ErrorCode errCode = ErrorCode.Ok;
/// <summary>
/// 测量点位
/// </summary>
int testPoint = 1;
TestHeightResult result = new TestHeightResult();
private LaserFlow() { }
private static LaserFlow instance;
public static LaserFlow Instance
@ -40,13 +46,22 @@ namespace Rs.MotionPlat.Flow.SubFlow
return instance;
}
}
private void ResetResult()
{
result = new TestHeightResult();
result.HasProduct = false;
result.TestHeight2 = 0.0;
result.TestHeight1 = 0.0;
}
/// <summary>
/// 到测高位测高
/// </summary>
/// <param name="trayType"></param>
/// <param name="slotIndex"></param>
public bool HasProduct(ETrayType trayType,int slotIndex)
public TestHeightResult HasProduct(ETrayType trayType,int slotIndex)
{
ResetResult();
SlotPoint targetSlot = new SlotPoint();
finished = false;
step = ELaserFlowStep.;
@ -71,7 +86,21 @@ namespace Rs.MotionPlat.Flow.SubFlow
if (targetSlot != null)
{
errCode = AxisControl.TurnoverX.MovePos(targetSlot.X, GlobalVar.WholeSpeed);
if(testPoint==1)
{
errCode = AxisControl.TurnoverX.MovePos(targetSlot.X, GlobalVar.WholeSpeed);
}
else
{
if(trayType== ETrayType.Test)
{
errCode = AxisControl.TurnoverX.MovePos(targetSlot.X - GlobalVar.TestFixtureTrayOffsetHeight, GlobalVar.WholeSpeed);
}
else if(trayType== ETrayType.Turnover)
{
errCode = AxisControl.TurnoverX.MovePos(targetSlot.X - GlobalVar.TurnoverTrayTestHeightOffsetX, GlobalVar.WholeSpeed);
}
}
if(errCode== ErrorCode.Ok || GlobalVar.VirtualAxis)
{
errCode = AxisControl.TurnoverY.MovePos(targetSlot.Y, GlobalVar.WholeSpeed);
@ -120,23 +149,32 @@ namespace Rs.MotionPlat.Flow.SubFlow
case ELaserFlowStep.:
double heightVal = DeviceFactory.checkHeightDev.Read();
logInfo = GetClassName() + $"开始测高:{heightVal}";
logInfo = GetClassName() + $"start test height:point{testPoint}:{heightVal}";
MessageQueue.Instance.Insert(logInfo);
if(trayType== ETrayType.Turnover)
if(testPoint==1)
{
hasProduct = !(Math.Abs(GlobalVar.TurnoverCheckBaseHeight-heightVal) < 0.7);
result.TestHeight1 = heightVal;
testPoint++;
step = ELaserFlowStep.;
}
else if(trayType== ETrayType.Test)
else
{
hasProduct = !(Math.Abs(GlobalVar.TestFixtureCheckBaseHeight - heightVal) < 0.7);
result.TestHeight2 = heightVal;
step = ELaserFlowStep.;
}
break;
case ELaserFlowStep.:
result.CalcResult(trayType);
logInfo= GetClassName()+ JsonConvert.SerializeObject(result);
LogHelper.Debug(logInfo);
MessageQueue.Instance.Insert(GetClassName() + " Test Height Finished!");
finished = true;
break;
}
}
return hasProduct;
return result;
}
private string GetClassName()
@ -144,4 +182,38 @@ namespace Rs.MotionPlat.Flow.SubFlow
return "LaserFlow-";
}
}
/// <summary>
/// 测高结果
/// </summary>
public class TestHeightResult
{
/// <summary>
/// 是否有产品
/// </summary>
public bool HasProduct { get; set; }
/// <summary>
/// 测量高度1
/// </summary>
public double TestHeight1 { get; set; }
/// <summary>
/// 测量高度2
/// </summary>
public double TestHeight2 { get; set;}
/// <summary>
/// 计算测高结果
/// </summary>
public void CalcResult(ETrayType trayType)
{
if (trayType == ETrayType.Test)
{
HasProduct = Math.Abs(TestHeight1 - TestHeight2) > GlobalVar.TestFixtureTrayOffsetHeight;
}
else if (trayType == ETrayType.Turnover)
{
HasProduct = Math.Abs(TestHeight1 - TestHeight2) > GlobalVar.TestFixtureTrayOffsetHeight;
}
}
}
}

@ -49,7 +49,9 @@
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.rsTray1 = new Rs.Controls.RsTray();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.txtTestFixtureCheckBaseHeight = new System.Windows.Forms.TextBox();
this.txtTestFixtureTrayOffsetHeight = new System.Windows.Forms.TextBox();
this.lblSubValue = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.lblTestValue = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
@ -73,8 +75,8 @@
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panelEx1 = new Rs.Controls.PanelEx();
this.label8 = new System.Windows.Forms.Label();
this.lblSubValue = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtTestFixtureTrayTestHeightOffsetX = new System.Windows.Forms.TextBox();
this.contextMenuStrip1.SuspendLayout();
this.panelEx2.SuspendLayout();
this.panelEx5.SuspendLayout();
@ -290,10 +292,12 @@
//
// groupBox4
//
this.groupBox4.Controls.Add(this.txtTestFixtureCheckBaseHeight);
this.groupBox4.Controls.Add(this.txtTestFixtureTrayTestHeightOffsetX);
this.groupBox4.Controls.Add(this.txtTestFixtureTrayOffsetHeight);
this.groupBox4.Controls.Add(this.lblSubValue);
this.groupBox4.Controls.Add(this.label8);
this.groupBox4.Controls.Add(this.lblTestValue);
this.groupBox4.Controls.Add(this.label6);
this.groupBox4.Controls.Add(this.label5);
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.btnTestHeight);
@ -306,21 +310,41 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "测高";
//
// txtTestFixtureCheckBaseHeight
//
this.txtTestFixtureCheckBaseHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTestFixtureCheckBaseHeight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTestFixtureCheckBaseHeight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTestFixtureCheckBaseHeight.Font = new System.Drawing.Font("宋体", 9F);
this.txtTestFixtureCheckBaseHeight.ForeColor = System.Drawing.Color.White;
this.txtTestFixtureCheckBaseHeight.Location = new System.Drawing.Point(85, 33);
this.txtTestFixtureCheckBaseHeight.Name = "txtTestFixtureCheckBaseHeight";
this.txtTestFixtureCheckBaseHeight.Size = new System.Drawing.Size(85, 21);
this.txtTestFixtureCheckBaseHeight.TabIndex = 53;
this.txtTestFixtureCheckBaseHeight.Tag = "SysParam";
this.txtTestFixtureCheckBaseHeight.Text = "0.01";
this.txtTestFixtureCheckBaseHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTestFixtureCheckBaseHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTestFixtureCheckBaseHeight_KeyUp);
// txtTestFixtureTrayOffsetHeight
//
this.txtTestFixtureTrayOffsetHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTestFixtureTrayOffsetHeight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTestFixtureTrayOffsetHeight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTestFixtureTrayOffsetHeight.Font = new System.Drawing.Font("宋体", 9F);
this.txtTestFixtureTrayOffsetHeight.ForeColor = System.Drawing.Color.White;
this.txtTestFixtureTrayOffsetHeight.Location = new System.Drawing.Point(85, 21);
this.txtTestFixtureTrayOffsetHeight.Name = "txtTestFixtureTrayOffsetHeight";
this.txtTestFixtureTrayOffsetHeight.Size = new System.Drawing.Size(85, 21);
this.txtTestFixtureTrayOffsetHeight.TabIndex = 53;
this.txtTestFixtureTrayOffsetHeight.Tag = "SysParam";
this.txtTestFixtureTrayOffsetHeight.Text = "0.01";
this.txtTestFixtureTrayOffsetHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTestFixtureTrayOffsetHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTestFixtureCheckBaseHeight_KeyUp);
//
// lblSubValue
//
this.lblSubValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblSubValue.AutoSize = true;
this.lblSubValue.Location = new System.Drawing.Point(124, 185);
this.lblSubValue.Name = "lblSubValue";
this.lblSubValue.Size = new System.Drawing.Size(23, 12);
this.lblSubValue.TabIndex = 47;
this.lblSubValue.Text = "0.0";
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(49, 185);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.TabIndex = 47;
this.label8.Text = "差值:";
//
// lblTestValue
//
@ -346,11 +370,11 @@
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(25, 35);
this.label1.Location = new System.Drawing.Point(25, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 12);
this.label1.Size = new System.Drawing.Size(47, 12);
this.label1.TabIndex = 47;
this.label1.Text = "基础高度:";
this.label1.Text = "高度:";
//
// btnTestHeight
//
@ -628,25 +652,31 @@
this.panelEx1.Size = new System.Drawing.Size(1030, 858);
this.panelEx1.TabIndex = 4;
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(49, 185);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.TabIndex = 47;
this.label8.Text = "差值:";
//
// lblSubValue
//
this.lblSubValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblSubValue.AutoSize = true;
this.lblSubValue.Location = new System.Drawing.Point(124, 185);
this.lblSubValue.Name = "lblSubValue";
this.lblSubValue.Size = new System.Drawing.Size(23, 12);
this.lblSubValue.TabIndex = 47;
this.lblSubValue.Text = "0.0";
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(13, 62);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 12);
this.label6.TabIndex = 47;
this.label6.Text = "测量偏移:";
//
// txtTestFixtureTrayTestHeightOffsetX
//
this.txtTestFixtureTrayTestHeightOffsetX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTestFixtureTrayTestHeightOffsetX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTestFixtureTrayTestHeightOffsetX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTestFixtureTrayTestHeightOffsetX.Font = new System.Drawing.Font("宋体", 9F);
this.txtTestFixtureTrayTestHeightOffsetX.ForeColor = System.Drawing.Color.White;
this.txtTestFixtureTrayTestHeightOffsetX.Location = new System.Drawing.Point(85, 60);
this.txtTestFixtureTrayTestHeightOffsetX.Name = "txtTestFixtureTrayTestHeightOffsetX";
this.txtTestFixtureTrayTestHeightOffsetX.Size = new System.Drawing.Size(85, 21);
this.txtTestFixtureTrayTestHeightOffsetX.TabIndex = 53;
this.txtTestFixtureTrayTestHeightOffsetX.Tag = "SysParam";
this.txtTestFixtureTrayTestHeightOffsetX.Text = "0.01";
this.txtTestFixtureTrayTestHeightOffsetX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTestFixtureTrayTestHeightOffsetX.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTestFixtureCheckBaseHeight_KeyUp);
//
// TestFixtureTrayCheckHeight
//
@ -688,7 +718,7 @@
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnCreateTrayStatus;
private System.Windows.Forms.Button btnCreateMatrix;
private System.Windows.Forms.TextBox txtTestFixtureCheckBaseHeight;
private System.Windows.Forms.TextBox txtTestFixtureTrayOffsetHeight;
private System.Windows.Forms.TextBox txtMarkY1;
private System.Windows.Forms.TextBox txtMarkX1;
private System.Windows.Forms.Label label1;
@ -718,5 +748,7 @@
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label lblSubValue;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtTestFixtureTrayTestHeightOffsetX;
private System.Windows.Forms.Label label6;
}
}

@ -78,7 +78,7 @@ namespace Rs.MotionPlat.Recipe
dgvRunPoints.AutoGenerateColumns = false;
BindPoints();
LoadSysParam(groupBox1);
PositionHelper.BindSinglePosition(txtTestFixtureCheckBaseHeight);
PositionHelper.BindSinglePosition(txtTestFixtureTrayOffsetHeight);
}
private void rsTray1_SlotClickEvent(Controls.TraySlot arg1, MouseEventArgs arg2)
@ -189,7 +189,7 @@ namespace Rs.MotionPlat.Recipe
private void txtTestFixtureCheckBaseHeight_KeyUp(object sender, KeyEventArgs e)
{
UpdateSysParam(txtTestFixtureCheckBaseHeight);
UpdateSysParam(txtTestFixtureTrayOffsetHeight);
}
private void btnTestHeight_Click(object sender, EventArgs e)
@ -199,7 +199,7 @@ namespace Rs.MotionPlat.Recipe
{
lblTestValue.Text = DeviceFactory.checkHeightDev.Read().ToString("0.000");
lblSubValue.Text = (double.Parse(lblTestValue.Text) - double.Parse(txtTestFixtureCheckBaseHeight.Text)).ToString("0.000");
lblSubValue.Text = (double.Parse(lblTestValue.Text) - double.Parse(txtTestFixtureTrayOffsetHeight.Text)).ToString("0.000");
}
else
{

@ -50,7 +50,11 @@
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.rsTray1 = new Rs.Controls.RsTray();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.txtTurnoverCheckBaseHeight = new System.Windows.Forms.TextBox();
this.lblSubValue = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.lblTestValue = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtTurnoverTrayOffsetHeight = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button6 = new System.Windows.Forms.Button();
this.panelEx3 = new Rs.Controls.PanelEx();
@ -66,10 +70,8 @@
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panelEx1 = new Rs.Controls.PanelEx();
this.lblSubValue = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.lblTestValue = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtTurnoverTrayTestHeightOffsetX = new System.Windows.Forms.TextBox();
this.contextMenuStrip1.SuspendLayout();
this.panelEx2.SuspendLayout();
this.panelEx5.SuspendLayout();
@ -302,7 +304,9 @@
this.groupBox4.Controls.Add(this.label8);
this.groupBox4.Controls.Add(this.lblTestValue);
this.groupBox4.Controls.Add(this.label5);
this.groupBox4.Controls.Add(this.txtTurnoverCheckBaseHeight);
this.groupBox4.Controls.Add(this.txtTurnoverTrayTestHeightOffsetX);
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.txtTurnoverTrayOffsetHeight);
this.groupBox4.Controls.Add(this.label2);
this.groupBox4.Controls.Add(this.button6);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Right;
@ -314,31 +318,71 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "测高";
//
// txtTurnoverCheckBaseHeight
//
this.txtTurnoverCheckBaseHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTurnoverCheckBaseHeight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTurnoverCheckBaseHeight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTurnoverCheckBaseHeight.Font = new System.Drawing.Font("宋体", 9F);
this.txtTurnoverCheckBaseHeight.ForeColor = System.Drawing.Color.White;
this.txtTurnoverCheckBaseHeight.Location = new System.Drawing.Point(87, 31);
this.txtTurnoverCheckBaseHeight.Name = "txtTurnoverCheckBaseHeight";
this.txtTurnoverCheckBaseHeight.Size = new System.Drawing.Size(85, 21);
this.txtTurnoverCheckBaseHeight.TabIndex = 53;
this.txtTurnoverCheckBaseHeight.Tag = "SysParam";
this.txtTurnoverCheckBaseHeight.Text = "0.01";
this.txtTurnoverCheckBaseHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTurnoverCheckBaseHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTurnoverCheckBaseHeight_KeyUp);
// lblSubValue
//
this.lblSubValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblSubValue.AutoSize = true;
this.lblSubValue.Location = new System.Drawing.Point(144, 174);
this.lblSubValue.Name = "lblSubValue";
this.lblSubValue.Size = new System.Drawing.Size(23, 12);
this.lblSubValue.TabIndex = 54;
this.lblSubValue.Text = "0.0";
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(69, 174);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.TabIndex = 55;
this.label8.Text = "差值:";
//
// lblTestValue
//
this.lblTestValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblTestValue.AutoSize = true;
this.lblTestValue.Location = new System.Drawing.Point(144, 151);
this.lblTestValue.Name = "lblTestValue";
this.lblTestValue.Size = new System.Drawing.Size(23, 12);
this.lblTestValue.TabIndex = 56;
this.lblTestValue.Text = "0.0";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(49, 151);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 12);
this.label5.TabIndex = 57;
this.label5.Text = "测高结果:";
//
// txtTurnoverTrayOffsetHeight
//
this.txtTurnoverTrayOffsetHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTurnoverTrayOffsetHeight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTurnoverTrayOffsetHeight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTurnoverTrayOffsetHeight.Font = new System.Drawing.Font("宋体", 9F);
this.txtTurnoverTrayOffsetHeight.ForeColor = System.Drawing.Color.White;
this.txtTurnoverTrayOffsetHeight.Location = new System.Drawing.Point(87, 20);
this.txtTurnoverTrayOffsetHeight.Name = "txtTurnoverTrayOffsetHeight";
this.txtTurnoverTrayOffsetHeight.Size = new System.Drawing.Size(85, 21);
this.txtTurnoverTrayOffsetHeight.TabIndex = 53;
this.txtTurnoverTrayOffsetHeight.Tag = "SysParam";
this.txtTurnoverTrayOffsetHeight.Text = "0.01";
this.txtTurnoverTrayOffsetHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTurnoverTrayOffsetHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTurnoverCheckBaseHeight_KeyUp);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 33);
this.label2.Location = new System.Drawing.Point(27, 22);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 12);
this.label2.Size = new System.Drawing.Size(47, 12);
this.label2.TabIndex = 47;
this.label2.Text = "基础高度:";
this.label2.Text = "高度:";
//
// button6
//
@ -347,7 +391,7 @@
this.button6.FlatAppearance.BorderColor = System.Drawing.Color.White;
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button6.ForeColor = System.Drawing.Color.White;
this.button6.Location = new System.Drawing.Point(39, 84);
this.button6.Location = new System.Drawing.Point(34, 94);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(133, 31);
this.button6.TabIndex = 49;
@ -530,45 +574,31 @@
this.panelEx1.Size = new System.Drawing.Size(1030, 843);
this.panelEx1.TabIndex = 3;
//
// lblSubValue
//
this.lblSubValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblSubValue.AutoSize = true;
this.lblSubValue.Location = new System.Drawing.Point(144, 174);
this.lblSubValue.Name = "lblSubValue";
this.lblSubValue.Size = new System.Drawing.Size(23, 12);
this.lblSubValue.TabIndex = 54;
this.lblSubValue.Text = "0.0";
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(69, 174);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.TabIndex = 55;
this.label8.Text = "差值:";
//
// lblTestValue
//
this.lblTestValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblTestValue.AutoSize = true;
this.lblTestValue.Location = new System.Drawing.Point(144, 151);
this.lblTestValue.Name = "lblTestValue";
this.lblTestValue.Size = new System.Drawing.Size(23, 12);
this.lblTestValue.TabIndex = 56;
this.lblTestValue.Text = "0.0";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(49, 151);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 12);
this.label5.TabIndex = 57;
this.label5.Text = "测高结果:";
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 59);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 12);
this.label1.TabIndex = 47;
this.label1.Text = "测高偏移:";
//
// txtTurnoverTrayTestHeightOffsetX
//
this.txtTurnoverTrayTestHeightOffsetX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtTurnoverTrayTestHeightOffsetX.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtTurnoverTrayTestHeightOffsetX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtTurnoverTrayTestHeightOffsetX.Font = new System.Drawing.Font("宋体", 9F);
this.txtTurnoverTrayTestHeightOffsetX.ForeColor = System.Drawing.Color.White;
this.txtTurnoverTrayTestHeightOffsetX.Location = new System.Drawing.Point(87, 57);
this.txtTurnoverTrayTestHeightOffsetX.Name = "txtTurnoverTrayTestHeightOffsetX";
this.txtTurnoverTrayTestHeightOffsetX.Size = new System.Drawing.Size(85, 21);
this.txtTurnoverTrayTestHeightOffsetX.TabIndex = 53;
this.txtTurnoverTrayTestHeightOffsetX.Tag = "SysParam";
this.txtTurnoverTrayTestHeightOffsetX.Text = "0.01";
this.txtTurnoverTrayTestHeightOffsetX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTurnoverTrayTestHeightOffsetX.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtTurnoverCheckBaseHeight_KeyUp);
//
// TurnoverTrayCheckHeight
//
@ -628,7 +658,7 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem moveToolStripMenuItem;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox txtTurnoverCheckBaseHeight;
private System.Windows.Forms.TextBox txtTurnoverTrayOffsetHeight;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button6;
private Controls.RsTray rsTray1;
@ -636,5 +666,7 @@
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label lblTestValue;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtTurnoverTrayTestHeightOffsetX;
private System.Windows.Forms.Label label1;
}
}

@ -149,7 +149,7 @@ namespace Rs.MotionPlat.Recipe
private void txtTurnoverCheckBaseHeight_KeyUp(object sender, KeyEventArgs e)
{
UpdateSysParam(txtTurnoverCheckBaseHeight);
UpdateSysParam(txtTurnoverTrayOffsetHeight);
}
private void button6_Click(object sender, EventArgs e)
@ -159,7 +159,7 @@ namespace Rs.MotionPlat.Recipe
{
lblTestValue.Text = DeviceFactory.checkHeightDev.Read().ToString("0.000");
lblSubValue.Text = (double.Parse(lblTestValue.Text) - double.Parse(txtTurnoverCheckBaseHeight.Text)).ToString("0.000");
lblSubValue.Text = (double.Parse(lblTestValue.Text) - double.Parse(txtTurnoverTrayOffsetHeight.Text)).ToString("0.000");
}
else
{

Loading…
Cancel
Save