diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs index ce77508..7ce8d03 100644 --- a/Rs.SkyLine/Commom/GlobalVar.cs +++ b/Rs.SkyLine/Commom/GlobalVar.cs @@ -908,13 +908,7 @@ namespace Rs.Framework } } - public static bool DisableDoor - { - get - { - return true; - } - } + /// /// 是否使用虚拟码 @@ -936,5 +930,16 @@ namespace Rs.Framework return SysConfigParam.GetValue(nameof(InputTrayLoop)); } } + + /// + /// 是否禁用门禁 + /// + public static bool DisableDoor + { + get + { + return SysConfigParam.GetValue(nameof(DisableDoor)); + } + } } } diff --git a/Rs.SkyLine/Flow/MonitorSystemButton.cs b/Rs.SkyLine/Flow/MonitorSystemButton.cs index 3e11029..6a66007 100644 --- a/Rs.SkyLine/Flow/MonitorSystemButton.cs +++ b/Rs.SkyLine/Flow/MonitorSystemButton.cs @@ -22,6 +22,7 @@ namespace Rs.MotionPlat.Flow StopButtonPressed,//停止按钮按下 StopButtonUp,//停止按钮抬起, DoorOpend,//门被打开, + DoorClosed,//门已关闭 LightButtonPressed,//照明被按下 LightButtonUp,//照明被抬起 SkipButtonPressed,//跳过被按下 @@ -258,7 +259,15 @@ namespace Rs.MotionPlat.Flow case EMonitorButtonStep.DoorOpend: Ops.Stop(); MessageQueue.Instance.Warn("门禁被触发"); - step = EMonitorButtonStep.Monitoring; + step = EMonitorButtonStep.DoorClosed; + break; + case EMonitorButtonStep.DoorClosed: + signalValue = IoManager.Instance.ReadIn("门禁"); + if (signalValue == 1) + { + step = EMonitorButtonStep.Monitoring; + break; + } break; case EMonitorButtonStep.LightButtonPressed: if(Ops.IsOutOn("照明灯")) diff --git a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs index 9f9c526..963921d 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.cboxEnableVirtuleBarCode = new System.Windows.Forms.CheckBox(); this.cboxGRR = new System.Windows.Forms.CheckBox(); this.cboxEnableTestFixtureFiberCheck = new System.Windows.Forms.CheckBox(); this.cboxEnableTwoSpeed = new System.Windows.Forms.CheckBox(); @@ -92,7 +93,7 @@ this.label27 = new System.Windows.Forms.Label(); this.txtControlCenterIP = new System.Windows.Forms.TextBox(); this.label26 = new System.Windows.Forms.Label(); - this.cboxEnableVirtuleBarCode = new System.Windows.Forms.CheckBox(); + this.cboxDisableDoor = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.groupBox8.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -396,6 +397,7 @@ this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.cboxVirtualAxis); this.groupBox1.Controls.Add(this.cboxCheckSafeEnable); + this.groupBox1.Controls.Add(this.cboxDisableDoor); this.groupBox1.Controls.Add(this.cboxEnableVirtuleBarCode); this.groupBox1.Controls.Add(this.cboxGRR); this.groupBox1.Controls.Add(this.cboxEnableTestFixtureFiberCheck); @@ -583,6 +585,16 @@ this.cboxCheckSafeEnable.Text = "安全检查"; this.cboxCheckSafeEnable.UseVisualStyleBackColor = true; // + // cboxEnableVirtuleBarCode + // + 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; + // // cboxGRR // this.cboxGRR.AutoSize = true; @@ -858,15 +870,15 @@ this.label26.TabIndex = 0; this.label26.Text = "中控IP:"; // - // cboxEnableVirtuleBarCode + // cboxDisableDoor // - 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; + 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; // // CommonConfig // @@ -968,5 +980,6 @@ private System.Windows.Forms.TextBox txtDischargeRetakeNum; private System.Windows.Forms.Label label29; private System.Windows.Forms.CheckBox cboxEnableVirtuleBarCode; + private System.Windows.Forms.CheckBox cboxDisableDoor; } } \ No newline at end of file diff --git a/Rs.SkyLine/TestFrm.cs b/Rs.SkyLine/TestFrm.cs index 0947718..6f99dcc 100644 --- a/Rs.SkyLine/TestFrm.cs +++ b/Rs.SkyLine/TestFrm.cs @@ -254,7 +254,10 @@ namespace Rs.MotionPlat private void button26_Click(object sender, EventArgs e) { - AlarmMsg.Show(1001, AlarmCollection.Get(1001).Transform("3", "4"), ETipButton.Yes,null); + Task.Run(() => { + ETipButton button = AlarmMsg.Show(1001, AlarmCollection.Get(1001).Transform("3", "4"), ETipButton.Yes| ETipButton.No, null); + Msg.ShowInfo(button.ToString()); + }); } } }