增加拍照定位失败时,当重扫次数达到上限时可以自动跳过

master
lhiven 1 year ago
parent 7e00404956
commit 74e243003a

@ -977,5 +977,17 @@ namespace Rs.Framework
get; get;
set; set;
} = false; } = false;
/// <summary>
/// 拍照定位失败自动跳过
/// </summary>
public static bool LocationFailAutoSkip
{
get
{
return SysConfigParam.GetValue<bool>(nameof(LocationFailAutoSkip));
}
}
} }
} }

@ -17,6 +17,8 @@ using System.Diagnostics;
using Rs.MotionPlat.AuxiliaryEquipment; using Rs.MotionPlat.AuxiliaryEquipment;
using System.Windows.Forms; using System.Windows.Forms;
using Rs.MotionPlat.Flow.SubFlow; using Rs.MotionPlat.Flow.SubFlow;
using Rs.DataAccess;
using System.Data;
namespace Rs.MotionPlat.Commom namespace Rs.MotionPlat.Commom
{ {
@ -25,6 +27,7 @@ namespace Rs.MotionPlat.Commom
public static bool Pause { get; set; } = false; public static bool Pause { get; set; } = false;
public static void Init() public static void Init()
{ {
InitDb();
SysConfigParam.Init(); SysConfigParam.Init();
int errNum = 0; int errNum = 0;
//Task.Run(() => { //Task.Run(() => {
@ -150,6 +153,20 @@ namespace Rs.MotionPlat.Commom
SysConfigParam.Update("EnableVirtuleBarCode", "False"); SysConfigParam.Update("EnableVirtuleBarCode", "False");
}
static void InitDb()
{
SqliteHelper db = new SqliteHelper();
string querySql = "select * from SysParameter where fieldname='LocationFailAutoSkip'";
string insertSql = string.Empty;
DataTable dt = db.GetDataTable(querySql);
if(dt==null || dt.Rows.Count==0)
{
insertSql = $"insert into SysParameter(fieldname,fieldtype,fieldvalue,Desc,category,enable) values('LocationFailAutoSkip','bool','True','拍照定位失败自动跳过','system',1)";
db.ExecuteNonQuery(insertSql);
}
} }

@ -927,19 +927,27 @@ namespace Rs.MotionPlat.Flow
} }
else else
{ {
reGrabCount = 0; if(GlobalVar.LocationFailAutoSkip)
alarmInfo = $"{string.Join(",", errCodeList)}号排料吸嘴拍照失败";
//DialogResult dr = Msg.ShowQuestion(, System.Windows.Forms.MessageBoxButtons.RetryCancel);
//TestCenterMessageBox.Show(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);
box = MsgBox.ShowDialog(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);// TestCenterMessageBox.WaitResult(AlarmConstID.DownCameraFlyFailAlarm);
if (box.Button== ETipButton.Cancel)
{ {
reGrabCount = 0;
flowStep = EDischargeFlowStep.; flowStep = EDischargeFlowStep.;
} }
else if (box.Button == ETipButton.Retry) else
{ {
Thread.Sleep(500); reGrabCount = 0;
flowStep = EDischargeFlowStep.; alarmInfo = $"{string.Join(",", errCodeList)}号排料吸嘴拍照失败";
//DialogResult dr = Msg.ShowQuestion(, System.Windows.Forms.MessageBoxButtons.RetryCancel);
//TestCenterMessageBox.Show(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);
box = MsgBox.ShowDialog(AlarmConstID.DownCameraFlyFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Cancel);// TestCenterMessageBox.WaitResult(AlarmConstID.DownCameraFlyFailAlarm);
if (box.Button == ETipButton.Cancel)
{
flowStep = EDischargeFlowStep.;
}
else if (box.Button == ETipButton.Retry)
{
Thread.Sleep(500);
flowStep = EDischargeFlowStep.;
}
} }
} }
} }

@ -66,6 +66,7 @@
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.cboxVirtualAxis = new System.Windows.Forms.CheckBox(); this.cboxVirtualAxis = new System.Windows.Forms.CheckBox();
this.cboxCheckSafeEnable = new System.Windows.Forms.CheckBox(); this.cboxCheckSafeEnable = new System.Windows.Forms.CheckBox();
this.cboxDisableDoor = new System.Windows.Forms.CheckBox();
this.cboxEnableVirtuleBarCode = new System.Windows.Forms.CheckBox(); this.cboxEnableVirtuleBarCode = new System.Windows.Forms.CheckBox();
this.cboxGRR = new System.Windows.Forms.CheckBox(); this.cboxGRR = new System.Windows.Forms.CheckBox();
this.cboxEnableTestFixtureFiberCheck = new System.Windows.Forms.CheckBox(); this.cboxEnableTestFixtureFiberCheck = new System.Windows.Forms.CheckBox();
@ -93,7 +94,7 @@
this.label27 = new System.Windows.Forms.Label(); this.label27 = new System.Windows.Forms.Label();
this.txtControlCenterIP = new System.Windows.Forms.TextBox(); this.txtControlCenterIP = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label(); this.label26 = new System.Windows.Forms.Label();
this.cboxDisableDoor = new System.Windows.Forms.CheckBox(); this.cboxLocationFailAutoSkip = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.groupBox8.SuspendLayout(); this.groupBox8.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
@ -388,6 +389,7 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.cboxLocationFailAutoSkip);
this.groupBox1.Controls.Add(this.groupBox2); this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.txtQifuValue); this.groupBox1.Controls.Add(this.txtQifuValue);
this.groupBox1.Controls.Add(this.label9); this.groupBox1.Controls.Add(this.label9);
@ -585,6 +587,16 @@
this.cboxCheckSafeEnable.Text = "安全检查"; this.cboxCheckSafeEnable.Text = "安全检查";
this.cboxCheckSafeEnable.UseVisualStyleBackColor = true; this.cboxCheckSafeEnable.UseVisualStyleBackColor = true;
// //
// cboxDisableDoor
//
this.cboxDisableDoor.AutoSize = true;
this.cboxDisableDoor.Location = new System.Drawing.Point(507, 126);
this.cboxDisableDoor.Name = "cboxDisableDoor";
this.cboxDisableDoor.Size = new System.Drawing.Size(72, 16);
this.cboxDisableDoor.TabIndex = 8;
this.cboxDisableDoor.Text = "禁用门禁";
this.cboxDisableDoor.UseVisualStyleBackColor = true;
//
// cboxEnableVirtuleBarCode // cboxEnableVirtuleBarCode
// //
this.cboxEnableVirtuleBarCode.AutoSize = true; this.cboxEnableVirtuleBarCode.AutoSize = true;
@ -638,12 +650,13 @@
// cboxEnableExceptionHandlingNozzle // cboxEnableExceptionHandlingNozzle
// //
this.cboxEnableExceptionHandlingNozzle.AutoSize = true; this.cboxEnableExceptionHandlingNozzle.AutoSize = true;
this.cboxEnableExceptionHandlingNozzle.Location = new System.Drawing.Point(391, 240); this.cboxEnableExceptionHandlingNozzle.Location = new System.Drawing.Point(644, 206);
this.cboxEnableExceptionHandlingNozzle.Name = "cboxEnableExceptionHandlingNozzle"; this.cboxEnableExceptionHandlingNozzle.Name = "cboxEnableExceptionHandlingNozzle";
this.cboxEnableExceptionHandlingNozzle.Size = new System.Drawing.Size(96, 16); this.cboxEnableExceptionHandlingNozzle.Size = new System.Drawing.Size(96, 16);
this.cboxEnableExceptionHandlingNozzle.TabIndex = 8; this.cboxEnableExceptionHandlingNozzle.TabIndex = 8;
this.cboxEnableExceptionHandlingNozzle.Text = "启用强力吸嘴"; this.cboxEnableExceptionHandlingNozzle.Text = "启用强力吸嘴";
this.cboxEnableExceptionHandlingNozzle.UseVisualStyleBackColor = true; this.cboxEnableExceptionHandlingNozzle.UseVisualStyleBackColor = true;
this.cboxEnableExceptionHandlingNozzle.Visible = false;
// //
// cboxRunSpace // cboxRunSpace
// //
@ -870,15 +883,15 @@
this.label26.TabIndex = 0; this.label26.TabIndex = 0;
this.label26.Text = "中控IP:"; this.label26.Text = "中控IP:";
// //
// cboxDisableDoor // cboxLocationFailAutoSkip
// //
this.cboxDisableDoor.AutoSize = true; this.cboxLocationFailAutoSkip.AutoSize = true;
this.cboxDisableDoor.Location = new System.Drawing.Point(507, 126); this.cboxLocationFailAutoSkip.Location = new System.Drawing.Point(361, 240);
this.cboxDisableDoor.Name = "cboxDisableDoor"; this.cboxLocationFailAutoSkip.Name = "cboxLocationFailAutoSkip";
this.cboxDisableDoor.Size = new System.Drawing.Size(72, 16); this.cboxLocationFailAutoSkip.Size = new System.Drawing.Size(144, 16);
this.cboxDisableDoor.TabIndex = 8; this.cboxLocationFailAutoSkip.TabIndex = 53;
this.cboxDisableDoor.Text = "禁用门禁"; this.cboxLocationFailAutoSkip.Text = "拍照定位失败自动跳过";
this.cboxDisableDoor.UseVisualStyleBackColor = true; this.cboxLocationFailAutoSkip.UseVisualStyleBackColor = true;
// //
// CommonConfig // CommonConfig
// //
@ -981,5 +994,6 @@
private System.Windows.Forms.Label label29; private System.Windows.Forms.Label label29;
private System.Windows.Forms.CheckBox cboxEnableVirtuleBarCode; private System.Windows.Forms.CheckBox cboxEnableVirtuleBarCode;
private System.Windows.Forms.CheckBox cboxDisableDoor; private System.Windows.Forms.CheckBox cboxDisableDoor;
private System.Windows.Forms.CheckBox cboxLocationFailAutoSkip;
} }
} }
Loading…
Cancel
Save