diff --git a/Modules/SicModules/Config/PM/PM2/DeviceModelPM2.xml b/Modules/SicModules/Config/PM/PM2/DeviceModelPM2.xml index dd1fe29..a8e5493 100644 --- a/Modules/SicModules/Config/PM/PM2/DeviceModelPM2.xml +++ b/Modules/SicModules/Config/PM/PM2/DeviceModelPM2.xml @@ -494,14 +494,7 @@ - - - + diff --git a/Modules/SicModules/PMs/PMModuleDevice.cs b/Modules/SicModules/PMs/PMModuleDevice.cs index 72ae92b..84ad192 100644 --- a/Modules/SicModules/PMs/PMModuleDevice.cs +++ b/Modules/SicModules/PMs/PMModuleDevice.cs @@ -94,8 +94,6 @@ namespace SicModules.PMs #region Servo & SignalTower && TV - [Tag("SignalTower")] public IoSignalTower _signalTower { get; set; } - [Tag("PMServo")] public SicServo _sicServo { get; set; } //[Tag("PMAETemp")] diff --git a/SicRT/Config/PM1_STEvents.xml b/SicRT/Config/PM1_STEvents.xml index dc9d0bb..80a53f5 100644 --- a/SicRT/Config/PM1_STEvents.xml +++ b/SicRT/Config/PM1_STEvents.xml @@ -11,6 +11,7 @@ + @@ -20,6 +21,7 @@ + @@ -29,8 +31,10 @@ + + diff --git a/SicRT/Config/PM2_STEvents.xml b/SicRT/Config/PM2_STEvents.xml deleted file mode 100644 index 6fd9e90..0000000 --- a/SicRT/Config/PM2_STEvents.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SicRT/Equipments/Systems/EquipmentManager.cs b/SicRT/Equipments/Systems/EquipmentManager.cs index 19faf9b..968deb5 100644 --- a/SicRT/Equipments/Systems/EquipmentManager.cs +++ b/SicRT/Equipments/Systems/EquipmentManager.cs @@ -170,8 +170,6 @@ namespace SicRT.Equipments.Systems private IoSlitValve _pm2SlitValve = null; private PeriodicJob _thread; // - private IoSignalTower _st = null; - // private IoTC _tc = null; private List ioPTOffsetAndKs = new List(); @@ -294,8 +292,6 @@ namespace SicRT.Equipments.Systems //_pmAETemp1 = DEVICE.GetDevice("PM1.PMAETemp"); //_pmAETemp2 = DEVICE.GetDevice("PM2.PMAETemp"); - // - _st = DEVICE.GetDevice("PM1.SignalTower"); _tc = DEVICE.GetDevice("PM1.TC1"); IniioPTOffsetAndKs(); @@ -597,34 +593,38 @@ namespace SicRT.Equipments.Systems #endregion } - private void Instance_OnAlarmEvent(EventItem obj) + private void Instance_OnAlarmEvent(EventItem ev) { - FSM_MSG msg = FSM_MSG.NONE; - if (obj.Level == EventLevel.Warning) + FSM_MSG msg; + if (ev.Level == EventLevel.Warning) msg = FSM_MSG.WARNING; - else if (obj.Level == EventLevel.Alarm) + else if (ev.Level == EventLevel.Alarm) { msg = FSM_MSG.ALARM; - switch (obj.Source) + // 如果设备产生报警,则向设备所在的Module发送状态机信号,切换到Error状态。 + switch (ev.Source) { case "PM1": case "PM2": case "EFEM": case "TM": default: - if (Modules.ContainsKey(ModuleHelper.Converter(obj.Source))) + if (Modules.ContainsKey(ModuleHelper.Converter(ev.Source))) { - Modules[ModuleHelper.Converter(obj.Source)]?.PostMsg(msg, obj.Id, obj.Description); + Modules[ModuleHelper.Converter(ev.Source)]?.PostMsg(msg, ev.Id, ev.Description); } break; } - /* - if (_st != null) + // 产生新的报警时,重新启用Buzzer + foreach (var dev in DEVICE.GetAllDevice().Where(x=>x is IoSignalTower).ToList()) { - _st.SwitchOffBuzzer(false); - }*/ + if(dev is IoSignalTower st) + st?.SwitchOffBuzzer(false); + } + + } } diff --git a/SicRT/SicRT.csproj b/SicRT/SicRT.csproj index d792b2c..8f74252 100644 --- a/SicRT/SicRT.csproj +++ b/SicRT/SicRT.csproj @@ -228,11 +228,6 @@ Always - - - Always - -