From 4442a7856a19433419ef2c8da2d8bc50455a9665 Mon Sep 17 00:00:00 2001
From: SL <123@123.com>
Date: Mon, 3 Jul 2023 11:34:51 +0800
Subject: [PATCH] =?UTF-8?q?[RT.EquipmentLibrary]=20PMModuleBase=E4=B8=AD?=
=?UTF-8?q?=E6=96=B0=E5=A2=9EDoIfInterlockEnabled()=E6=96=B9=E6=B3=95?=
=?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=89=A7=E8=A1=8C=E6=9F=90=E5=8A=A8?=
=?UTF-8?q?=E4=BD=9C=E5=89=8D=E5=85=88=E6=A3=80=E6=9F=A5Interlock=E6=98=AF?=
=?UTF-8?q?=E5=90=A6bypass=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LogicUnits/PMs/PMModuleBase.cs | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/MECF.Framework.RT.EquipmentLibrary/LogicUnits/PMs/PMModuleBase.cs b/MECF.Framework.RT.EquipmentLibrary/LogicUnits/PMs/PMModuleBase.cs
index 78866d8..2a174e4 100644
--- a/MECF.Framework.RT.EquipmentLibrary/LogicUnits/PMs/PMModuleBase.cs
+++ b/MECF.Framework.RT.EquipmentLibrary/LogicUnits/PMs/PMModuleBase.cs
@@ -1,10 +1,13 @@
using Aitex.Core.RT.Device;
+using Aitex.Core.RT.Event;
+using Aitex.Core.RT.SCCore;
using Aitex.Sorter.Common;
using MECF.Framework.Common.Equipment;
using MECF.Framework.Common.Fsm;
using MECF.Framework.Common.Schedulers;
using MECF.Framework.Common.SubstrateTrackings;
using MECF.Framework.RT.EquipmentLibrary.LogicUnits;
+using System;
using System.Collections.Generic;
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs
@@ -53,6 +56,26 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs
return base.Initialize();
}
+ ///
+ /// 检查是否Bypass了Interlock。
+ ///
+ ///
+ protected void DoIfInterlockEnabled(Action action)
+ {
+ // 读取系统配置
+ var byPassInterlock = SC.GetValue("System.BypassInterlock");
+ var byPassEnableTable = SC.GetValue("System.BypassEnableTable");
+
+ if (byPassInterlock)
+ EV.PostWarningLog(Module, "System.BypassInterlock is True");
+ else if (byPassEnableTable)
+ EV.PostWarningLog(Module, "System.BypassEnableTable is True");
+ else
+ {
+ action.Invoke();
+ }
+ }
+
#endregion