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