下相机飞拍增加重拍次数,数据库中增加DownCameraFlyRegrabNum这个字段,默认位5次

master
lhiven 2 years ago
parent a849973a36
commit 93839d6ded

@ -355,5 +355,16 @@ namespace Rs.Framework
return SysConfigParam.GetValue<int>(nameof(FlyGrabGain));
}
}
/// <summary>
/// 下相机飞拍重拍次数
/// </summary>
public static int DownCameraFlyRegrabNum
{
get
{
return SysConfigParam.GetValue<int>(nameof(DownCameraFlyRegrabNum));
}
}
}
}

@ -112,6 +112,7 @@ namespace Rs.MotionPlat.Flow
TraySlot downSlot = new TraySlot();
OffsetPoint turnoverOffsetPoint = new OffsetPoint();
int needGrabNum = 0;//需要拍照的吸嘴数量
int reGrabCount = 0;//重拍次数
ErrorCode errCode = ErrorCode.Ok;
public override void Run()
{
@ -513,15 +514,25 @@ namespace Rs.MotionPlat.Flow
ni++;
}
OnMatchResult?.Invoke(mrs);
DialogResult dr = Msg.ShowQuestion($"吸嘴{string.Join(",",errCodeList)}扫描失败,点击取消则不再扫码", System.Windows.Forms.MessageBoxButtons.RetryCancel);
if(dr== DialogResult.Cancel)
if(reGrabCount<GlobalVar.DownCameraFlyRegrabNum)
{
flowStep = EWorkFlowStep.;
reGrabCount++;
flowStep = EWorkFlowStep.;
}
else if(dr== DialogResult.Retry)
else
{
flowStep = EWorkFlowStep.;
reGrabCount = 0;
DialogResult dr = Msg.ShowQuestion($"吸嘴{string.Join(",", errCodeList)}扫描失败,点击取消则不再扫码", System.Windows.Forms.MessageBoxButtons.RetryCancel);
if (dr == DialogResult.Cancel)
{
flowStep = EWorkFlowStep.;
}
else if (dr == DialogResult.Retry)
{
flowStep = EWorkFlowStep.;
}
}
}
break;
case EWorkFlowStep.:

@ -30,6 +30,10 @@
{
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.txtFlyGrabGain = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtFlyGrabExposureTime = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox6 = new System.Windows.Forms.GroupBox();
@ -78,10 +82,8 @@
this.label27 = new System.Windows.Forms.Label();
this.txtControlCenterIP = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.txtFlyGrabExposureTime = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtFlyGrabGain = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.txtDownCameraFlyRegrabNum = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
@ -117,6 +119,8 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.txtDownCameraFlyRegrabNum);
this.groupBox3.Controls.Add(this.label14);
this.groupBox3.Controls.Add(this.txtFlyGrabGain);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.txtFlyGrabExposureTime);
@ -130,6 +134,52 @@
this.groupBox3.TabStop = false;
this.groupBox3.Text = "参数设定";
//
// txtFlyGrabGain
//
this.txtFlyGrabGain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtFlyGrabGain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFlyGrabGain.Font = new System.Drawing.Font("宋体", 9F);
this.txtFlyGrabGain.ForeColor = System.Drawing.Color.White;
this.txtFlyGrabGain.Location = new System.Drawing.Point(325, 36);
this.txtFlyGrabGain.Name = "txtFlyGrabGain";
this.txtFlyGrabGain.Size = new System.Drawing.Size(83, 21);
this.txtFlyGrabGain.TabIndex = 42;
this.txtFlyGrabGain.Text = "60";
this.txtFlyGrabGain.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtFlyGrabGain.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(224, 38);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(95, 12);
this.label13.TabIndex = 0;
this.label13.Text = "下相机飞拍增益:";
//
// txtFlyGrabExposureTime
//
this.txtFlyGrabExposureTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtFlyGrabExposureTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFlyGrabExposureTime.Font = new System.Drawing.Font("宋体", 9F);
this.txtFlyGrabExposureTime.ForeColor = System.Drawing.Color.White;
this.txtFlyGrabExposureTime.Location = new System.Drawing.Point(124, 34);
this.txtFlyGrabExposureTime.Name = "txtFlyGrabExposureTime";
this.txtFlyGrabExposureTime.Size = new System.Drawing.Size(83, 21);
this.txtFlyGrabExposureTime.TabIndex = 42;
this.txtFlyGrabExposureTime.Text = "60";
this.txtFlyGrabExposureTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtFlyGrabExposureTime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(23, 36);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(95, 12);
this.label12.TabIndex = 0;
this.label12.Text = "下相机飞拍曝光:";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.tableLayoutPanel2);
@ -694,51 +744,28 @@
this.label26.TabIndex = 0;
this.label26.Text = "中控IP:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(23, 36);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(95, 12);
this.label12.TabIndex = 0;
this.label12.Text = "下相机飞拍曝光:";
//
// txtFlyGrabExposureTime
//
this.txtFlyGrabExposureTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtFlyGrabExposureTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFlyGrabExposureTime.Font = new System.Drawing.Font("宋体", 9F);
this.txtFlyGrabExposureTime.ForeColor = System.Drawing.Color.White;
this.txtFlyGrabExposureTime.Location = new System.Drawing.Point(124, 34);
this.txtFlyGrabExposureTime.Name = "txtFlyGrabExposureTime";
this.txtFlyGrabExposureTime.Size = new System.Drawing.Size(83, 21);
this.txtFlyGrabExposureTime.TabIndex = 42;
this.txtFlyGrabExposureTime.Text = "60";
this.txtFlyGrabExposureTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtFlyGrabExposureTime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(224, 38);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(95, 12);
this.label13.TabIndex = 0;
this.label13.Text = "下相机飞拍增益:";
//
// txtFlyGrabGain
//
this.txtFlyGrabGain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtFlyGrabGain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtFlyGrabGain.Font = new System.Drawing.Font("宋体", 9F);
this.txtFlyGrabGain.ForeColor = System.Drawing.Color.White;
this.txtFlyGrabGain.Location = new System.Drawing.Point(325, 36);
this.txtFlyGrabGain.Name = "txtFlyGrabGain";
this.txtFlyGrabGain.Size = new System.Drawing.Size(83, 21);
this.txtFlyGrabGain.TabIndex = 42;
this.txtFlyGrabGain.Text = "60";
this.txtFlyGrabGain.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtFlyGrabGain.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(465, 40);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(95, 12);
this.label14.TabIndex = 0;
this.label14.Text = "下相机重拍次数:";
//
// txtDownCameraFlyRegrabNum
//
this.txtDownCameraFlyRegrabNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtDownCameraFlyRegrabNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtDownCameraFlyRegrabNum.Font = new System.Drawing.Font("宋体", 9F);
this.txtDownCameraFlyRegrabNum.ForeColor = System.Drawing.Color.White;
this.txtDownCameraFlyRegrabNum.Location = new System.Drawing.Point(566, 38);
this.txtDownCameraFlyRegrabNum.Name = "txtDownCameraFlyRegrabNum";
this.txtDownCameraFlyRegrabNum.Size = new System.Drawing.Size(83, 21);
this.txtDownCameraFlyRegrabNum.TabIndex = 42;
this.txtDownCameraFlyRegrabNum.Text = "5";
this.txtDownCameraFlyRegrabNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtDownCameraFlyRegrabNum.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// CommonConfig
//
@ -828,5 +855,7 @@
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtFlyGrabExposureTime;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtDownCameraFlyRegrabNum;
private System.Windows.Forms.Label label14;
}
}
Loading…
Cancel
Save