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

master
lhiven 1 year ago
parent 7e00404956
commit 74e243003a

@ -977,5 +977,17 @@ namespace Rs.Framework
get;
set;
} = 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 System.Windows.Forms;
using Rs.MotionPlat.Flow.SubFlow;
using Rs.DataAccess;
using System.Data;
namespace Rs.MotionPlat.Commom
{
@ -25,6 +27,7 @@ namespace Rs.MotionPlat.Commom
public static bool Pause { get; set; } = false;
public static void Init()
{
InitDb();
SysConfigParam.Init();
int errNum = 0;
//Task.Run(() => {
@ -150,6 +153,20 @@ namespace Rs.MotionPlat.Commom
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);
}
}

@ -926,6 +926,13 @@ namespace Rs.MotionPlat.Flow
flowStep = EDischargeFlowStep.;
}
else
{
if(GlobalVar.LocationFailAutoSkip)
{
reGrabCount = 0;
flowStep = EDischargeFlowStep.;
}
else
{
reGrabCount = 0;
alarmInfo = $"{string.Join(",", errCodeList)}号排料吸嘴拍照失败";
@ -943,6 +950,7 @@ namespace Rs.MotionPlat.Flow
}
}
}
}
break;
case EDischargeFlowStep.:
{

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