fix: 修正Reset和BuzzerOff不起作用的问题。

BuzzerOff按钮注册的操作由System.AckAllAlarms改为System.BuzzerOff。
EquipmentManager对象中新增System.BuzzerOff操作。
修正EquipmentManager对象的Instance_OnAlarmEvent()方法中,如果BuzzerOff,再次产生Warning时,蜂鸣器不响的问题。
JobDone蜂鸣器时长更改为约300秒。
This commit is contained in:
SL 2024-09-24 12:10:34 +08:00
parent e883c8c16b
commit dafcab7e86
3 changed files with 25 additions and 24 deletions

View File

@ -3,7 +3,7 @@
<STPatterns>
<!--注意:"JobDone"为系统保留模式,请仅更改"pattern",其余属性请勿修改 -->
<STPattern name="JobDone" pattern="--.........." cycles="3" priority="-1" part="Buzzer" />
<STPattern name="JobDone" pattern="--.........." cycles="300" priority="-1" part="Buzzer" />
<STPattern name="AlarmWithoutAck" pattern="-----....." cycles="-1" priority="0"/>
<STPattern name="AlarmAcked" pattern="----------" cycles="-1" priority="1"/>

View File

@ -636,6 +636,14 @@ namespace SicRT.Equipments.Systems
return true;
});
OP.Subscribe("System.BuzzerOff", (s, objects) =>
{
EV.AckAlarmEvents();
_mainSignalTower.SwitchOffBuzzer(true);
return true;
});
#region Recipe Editor Lock Password Management
const string SC_PATH_REQ_RESET_PASS = "System.Recipe.ResetEditorPassword";
@ -690,30 +698,23 @@ namespace SicRT.Equipments.Systems
private void Instance_OnAlarmEvent(EventItem ev)
{
FSM_MSG msg;
if (ev.Level == EventLevel.Warning)
msg = FSM_MSG.WARNING;
else if (ev.Level == EventLevel.Alarm)
if (ev.Level is EventLevel.Alarm or EventLevel.Warning)
{
msg = FSM_MSG.ALARM;
// 如果设备产生报警则向设备所在的Module发送状态机信号切换到Error状态。
switch (ev.Source)
{
case "PM1":
case "PM2":
case "EFEM":
case "TM":
default:
if (Modules.ContainsKey(ModuleHelper.Converter(ev.Source)))
{
Modules[ModuleHelper.Converter(ev.Source)]?.PostMsg(msg, ev.Id, ev.Description);
}
break;
}
// 产生新的报警时重新启用Buzzer
// 产生新的警告或报警时取消Buzzer静音
_mainSignalTower?.SwitchOffBuzzer(false);
// 如果是Warning
if (ev.Level == EventLevel.Warning)
return;
if (ev.Source == null)
return;
// 产生报警后立即将报警设备所在的Module强制切换到Error状态。
if (Modules.ContainsKey(ModuleHelper.Converter(ev.Source)))
{
Modules[ModuleHelper.Converter(ev.Source)]?.PostMsg(FSM_MSG.ALARM, ev.Id, ev.Description);
}
}
}

View File

@ -495,7 +495,7 @@ namespace SicUI.Client
public void BuzzerOff()
{
InvokeClient.Instance.Service.DoOperation($"System.AckAllAlarms");
InvokeClient.Instance.Service.DoOperation($"System.BuzzerOff");
}
#region Login/Logout Operations