diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs
index 9af9d43..b14ba91 100644
--- a/Rs.SkyLine/Commom/GlobalVar.cs
+++ b/Rs.SkyLine/Commom/GlobalVar.cs
@@ -915,5 +915,16 @@ namespace Rs.Framework
return true;
}
}
+
+ ///
+ /// 是否使用虚拟码
+ ///
+ public static bool EnableVirtuleBarCode
+ {
+ get
+ {
+ return SysConfigParam.GetValue(nameof(EnableVirtuleBarCode));
+ }
+ }
}
}
diff --git a/Rs.SkyLine/Commom/Ops.cs b/Rs.SkyLine/Commom/Ops.cs
index 0092ed0..b2025f1 100644
--- a/Rs.SkyLine/Commom/Ops.cs
+++ b/Rs.SkyLine/Commom/Ops.cs
@@ -15,6 +15,7 @@ using Rs.Controls;
using System.Threading;
using System.Diagnostics;
using Rs.MotionPlat.AuxiliaryEquipment;
+using System.Windows.Forms;
namespace Rs.MotionPlat.Commom
{
@@ -140,33 +141,46 @@ namespace Rs.MotionPlat.Commom
LightManger.Instance.SetStatus(ELightStatus.YellowBlink);
Off("启动灯");
Off("停止灯");
+ SysConfigParam.Update("EnableVirtuleBarCode", "False");
}
public static void Start()
{
- Task.Run(() => {
- if(MachineManage.Instance.MachineStatus== EMachineStatus.Homed || MachineManage.Instance.MachineStatus== EMachineStatus.Stop)
+ bool run = true;
+ if(GlobalVar.EnableVirtuleBarCode)
+ {
+ DialogResult dr = Msg.ShowQuestion("device run use virtual bar code?");
+ if(dr== DialogResult.Cancel)
{
- MachineManage.Instance.SetLocalMachineStatus(EMachineStatus.Working);
- On("启动灯");
- Off("停止灯");
- LightManger.Instance.SetStatus(ELightStatus.Green);
- if (!WorkEnvironment.Instance.IsRunning())
- {
- WorkEnvironment.Instance.Ready();
- }
- WorkEnvironment.Instance.EnvReadyOkEvent.WaitOne();
- DischargeFlow.Instance.Start();
- TurnoverFlow.Instance.Start();
- MachineManage.Instance.SetCenterMachineStatus(ERunStatus.Started);
- //if (DischargeFlow.Instance.GetCurStep() == "等待任务" && TurnoverFlow.Instance.GetStep() == "等待任务")
- if(MachineManage.Instance.GetLoadUnloadStatus() != ERunState.Busying)
+ run = false;
+ }
+ }
+ if(run)
+ {
+ Task.Run(() => {
+ if (MachineManage.Instance.MachineStatus == EMachineStatus.Homed || MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
{
- MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
+ MachineManage.Instance.SetLocalMachineStatus(EMachineStatus.Working);
+ On("启动灯");
+ Off("停止灯");
+ LightManger.Instance.SetStatus(ELightStatus.Green);
+ if (!WorkEnvironment.Instance.IsRunning())
+ {
+ WorkEnvironment.Instance.Ready();
+ }
+ WorkEnvironment.Instance.EnvReadyOkEvent.WaitOne();
+ DischargeFlow.Instance.Start();
+ TurnoverFlow.Instance.Start();
+ MachineManage.Instance.SetCenterMachineStatus(ERunStatus.Started);
+ //if (DischargeFlow.Instance.GetCurStep() == "等待任务" && TurnoverFlow.Instance.GetStep() == "等待任务")
+ if (MachineManage.Instance.GetLoadUnloadStatus() != ERunState.Busying)
+ {
+ MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
+ }
}
- }
- });
+ });
+ }
}
public static void Stop()
diff --git a/Rs.SkyLine/Commom/VirtualBarCode.cs b/Rs.SkyLine/Commom/VirtualBarCode.cs
index e3b00e8..2bd0c94 100644
--- a/Rs.SkyLine/Commom/VirtualBarCode.cs
+++ b/Rs.SkyLine/Commom/VirtualBarCode.cs
@@ -11,7 +11,7 @@ namespace Rs.MotionPlat.Commom
///
public static class VirtualBarCode
{
- private static int barCode = 1;
+ private static int barCode = 0;
public static string Code
{
diff --git a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
index 3a746e7..9f9c526 100644
--- a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
+++ b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs
@@ -30,6 +30,10 @@
{
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox8 = new System.Windows.Forms.GroupBox();
+ this.txtTurnoverRetakeNum = new System.Windows.Forms.TextBox();
+ this.label10 = new System.Windows.Forms.Label();
+ this.txtDischargeRetakeNum = new System.Windows.Forms.TextBox();
+ this.label29 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.txtUpCameraExposureTime = new System.Windows.Forms.TextBox();
@@ -88,10 +92,7 @@
this.label27 = new System.Windows.Forms.Label();
this.txtControlCenterIP = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
- this.txtDischargeRetakeNum = new System.Windows.Forms.TextBox();
- this.label29 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.txtTurnoverRetakeNum = new System.Windows.Forms.TextBox();
+ this.cboxEnableVirtuleBarCode = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -140,6 +141,54 @@
this.groupBox8.TabStop = false;
this.groupBox8.Text = "设备参数";
//
+ // txtTurnoverRetakeNum
+ //
+ this.txtTurnoverRetakeNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
+ this.txtTurnoverRetakeNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.txtTurnoverRetakeNum.Font = new System.Drawing.Font("宋体", 9F);
+ this.txtTurnoverRetakeNum.ForeColor = System.Drawing.Color.White;
+ this.txtTurnoverRetakeNum.Location = new System.Drawing.Point(285, 27);
+ this.txtTurnoverRetakeNum.Name = "txtTurnoverRetakeNum";
+ this.txtTurnoverRetakeNum.Size = new System.Drawing.Size(60, 21);
+ this.txtTurnoverRetakeNum.TabIndex = 48;
+ this.txtTurnoverRetakeNum.Tag = "";
+ this.txtTurnoverRetakeNum.Text = "1";
+ this.txtTurnoverRetakeNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.txtTurnoverRetakeNum.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(197, 32);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(83, 12);
+ this.label10.TabIndex = 47;
+ this.label10.Text = "周转重取次数:";
+ //
+ // txtDischargeRetakeNum
+ //
+ this.txtDischargeRetakeNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
+ this.txtDischargeRetakeNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.txtDischargeRetakeNum.Font = new System.Drawing.Font("宋体", 9F);
+ this.txtDischargeRetakeNum.ForeColor = System.Drawing.Color.White;
+ this.txtDischargeRetakeNum.Location = new System.Drawing.Point(112, 28);
+ this.txtDischargeRetakeNum.Name = "txtDischargeRetakeNum";
+ this.txtDischargeRetakeNum.Size = new System.Drawing.Size(60, 21);
+ this.txtDischargeRetakeNum.TabIndex = 48;
+ this.txtDischargeRetakeNum.Tag = "";
+ this.txtDischargeRetakeNum.Text = "1";
+ this.txtDischargeRetakeNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.txtDischargeRetakeNum.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
+ //
+ // label29
+ //
+ this.label29.AutoSize = true;
+ this.label29.Location = new System.Drawing.Point(24, 33);
+ this.label29.Name = "label29";
+ this.label29.Size = new System.Drawing.Size(83, 12);
+ this.label29.TabIndex = 47;
+ this.label29.Text = "排料重取次数:";
+ //
// groupBox3
//
this.groupBox3.Controls.Add(this.groupBox10);
@@ -347,6 +396,7 @@
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.cboxVirtualAxis);
this.groupBox1.Controls.Add(this.cboxCheckSafeEnable);
+ this.groupBox1.Controls.Add(this.cboxEnableVirtuleBarCode);
this.groupBox1.Controls.Add(this.cboxGRR);
this.groupBox1.Controls.Add(this.cboxEnableTestFixtureFiberCheck);
this.groupBox1.Controls.Add(this.cboxEnableTwoSpeed);
@@ -808,53 +858,15 @@
this.label26.TabIndex = 0;
this.label26.Text = "中控IP:";
//
- // txtDischargeRetakeNum
- //
- this.txtDischargeRetakeNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
- this.txtDischargeRetakeNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.txtDischargeRetakeNum.Font = new System.Drawing.Font("宋体", 9F);
- this.txtDischargeRetakeNum.ForeColor = System.Drawing.Color.White;
- this.txtDischargeRetakeNum.Location = new System.Drawing.Point(112, 28);
- this.txtDischargeRetakeNum.Name = "txtDischargeRetakeNum";
- this.txtDischargeRetakeNum.Size = new System.Drawing.Size(60, 21);
- this.txtDischargeRetakeNum.TabIndex = 48;
- this.txtDischargeRetakeNum.Tag = "";
- this.txtDischargeRetakeNum.Text = "1";
- this.txtDischargeRetakeNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.txtDischargeRetakeNum.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
- //
- // label29
+ // cboxEnableVirtuleBarCode
//
- this.label29.AutoSize = true;
- this.label29.Location = new System.Drawing.Point(24, 33);
- this.label29.Name = "label29";
- this.label29.Size = new System.Drawing.Size(83, 12);
- this.label29.TabIndex = 47;
- this.label29.Text = "排料重取次数:";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(197, 32);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(83, 12);
- this.label10.TabIndex = 47;
- this.label10.Text = "周转重取次数:";
- //
- // txtTurnoverRetakeNum
- //
- this.txtTurnoverRetakeNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
- this.txtTurnoverRetakeNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.txtTurnoverRetakeNum.Font = new System.Drawing.Font("宋体", 9F);
- this.txtTurnoverRetakeNum.ForeColor = System.Drawing.Color.White;
- this.txtTurnoverRetakeNum.Location = new System.Drawing.Point(285, 27);
- this.txtTurnoverRetakeNum.Name = "txtTurnoverRetakeNum";
- this.txtTurnoverRetakeNum.Size = new System.Drawing.Size(60, 21);
- this.txtTurnoverRetakeNum.TabIndex = 48;
- this.txtTurnoverRetakeNum.Tag = "";
- this.txtTurnoverRetakeNum.Text = "1";
- this.txtTurnoverRetakeNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.txtTurnoverRetakeNum.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
+ this.cboxEnableVirtuleBarCode.AutoSize = true;
+ this.cboxEnableVirtuleBarCode.Location = new System.Drawing.Point(439, 277);
+ this.cboxEnableVirtuleBarCode.Name = "cboxEnableVirtuleBarCode";
+ this.cboxEnableVirtuleBarCode.Size = new System.Drawing.Size(60, 16);
+ this.cboxEnableVirtuleBarCode.TabIndex = 8;
+ this.cboxEnableVirtuleBarCode.Text = "虚拟码";
+ this.cboxEnableVirtuleBarCode.UseVisualStyleBackColor = true;
//
// CommonConfig
//
@@ -955,5 +967,6 @@
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtDischargeRetakeNum;
private System.Windows.Forms.Label label29;
+ private System.Windows.Forms.CheckBox cboxEnableVirtuleBarCode;
}
}
\ No newline at end of file