From 74e243003a394b79c9f754cb7e5566604a3a526b Mon Sep 17 00:00:00 2001
From: lhiven <236881222@qq.com>
Date: Thu, 29 Feb 2024 11:50:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=8D=E7=85=A7=E5=AE=9A?=
=?UTF-8?q?=E4=BD=8D=E5=A4=B1=E8=B4=A5=E6=97=B6=EF=BC=8C=E5=BD=93=E9=87=8D?=
=?UTF-8?q?=E6=89=AB=E6=AC=A1=E6=95=B0=E8=BE=BE=E5=88=B0=E4=B8=8A=E9=99=90?=
=?UTF-8?q?=E6=97=B6=E5=8F=AF=E4=BB=A5=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BF=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Rs.SkyLine/Commom/GlobalVar.cs | 12 +++++++
Rs.SkyLine/Commom/Ops.cs | 17 ++++++++++
Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs | 26 +++++++++-----
Rs.SkyLine/SysConfig/CommonConfig.Designer.cs | 34 +++++++++++++------
4 files changed, 70 insertions(+), 19 deletions(-)
diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs
index 8c1403f..c8cff9b 100644
--- a/Rs.SkyLine/Commom/GlobalVar.cs
+++ b/Rs.SkyLine/Commom/GlobalVar.cs
@@ -977,5 +977,17 @@ namespace Rs.Framework
get;
set;
} = false;
+
+
+ ///
+ /// 拍照定位失败自动跳过
+ ///
+ public static bool LocationFailAutoSkip
+ {
+ get
+ {
+ return SysConfigParam.GetValue(nameof(LocationFailAutoSkip));
+ }
+ }
}
}
diff --git a/Rs.SkyLine/Commom/Ops.cs b/Rs.SkyLine/Commom/Ops.cs
index 5bf8369..f72327b 100644
--- a/Rs.SkyLine/Commom/Ops.cs
+++ b/Rs.SkyLine/Commom/Ops.cs
@@ -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);
+ }
}
diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
index 1b17598..2a93809 100644
--- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
+++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
@@ -927,19 +927,27 @@ namespace Rs.MotionPlat.Flow
}
else
{
- reGrabCount = 0;
- 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)
+ if(GlobalVar.LocationFailAutoSkip)
{
+ reGrabCount = 0;
flowStep = EDischargeFlowStep.到放料位上方;
}
- else if (box.Button == ETipButton.Retry)
+ else
{
- Thread.Sleep(500);
- flowStep = EDischargeFlowStep.到下相机拍照起始位;
+ reGrabCount = 0;
+ 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.到下相机拍照起始位;
+ }
}
}
}
diff --git a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
index 963921d..6c928e6 100644
--- a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
+++ b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
@@ -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;
}
}
\ No newline at end of file