增加门禁功能

master
lhiven 1 year ago
parent d88b2defca
commit 39de06a2b3

@ -908,13 +908,7 @@ namespace Rs.Framework
}
}
public static bool DisableDoor
{
get
{
return true;
}
}
/// <summary>
/// 是否使用虚拟码
@ -936,5 +930,16 @@ namespace Rs.Framework
return SysConfigParam.GetValue<bool>(nameof(InputTrayLoop));
}
}
/// <summary>
/// 是否禁用门禁
/// </summary>
public static bool DisableDoor
{
get
{
return SysConfigParam.GetValue<bool>(nameof(DisableDoor));
}
}
}
}

@ -22,6 +22,7 @@ namespace Rs.MotionPlat.Flow
StopButtonPressed,//停止按钮按下
StopButtonUp,//停止按钮抬起,
DoorOpend,//门被打开,
DoorClosed,//门已关闭
LightButtonPressed,//照明被按下
LightButtonUp,//照明被抬起
SkipButtonPressed,//跳过被按下
@ -258,8 +259,16 @@ namespace Rs.MotionPlat.Flow
case EMonitorButtonStep.DoorOpend:
Ops.Stop();
MessageQueue.Instance.Warn("门禁被触发");
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("照明灯"))
{

@ -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;
}
}

@ -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());
});
}
}
}

Loading…
Cancel
Save