Page 1 of 1
Clearing Alarms
Posted: Thu Jan 11, 2018 1:17 pm
by kkwon2
Hi,
Would like to use a tag to indicate clear all acknowledged inactive alarms.
When that tag is set, all acknowledged inactive alarms are removed from the alarm window; would like this to be automatic without the operator having to press a Clear button.
Is there a way to programmatically clear individual alarms when they are acknowledged and inactive?
Re: Clearing Alarms
Posted: Tue Feb 13, 2018 6:33 pm
by Chris T.
kkwon2,
This can definitely be done. I am attaching a zip file of a project that will show you how to accomplish this. But here is the scripting that makes it tick.
********NOTE********
This script must
Acknowledge_1 and Acknowledge_All are tags i generated and can be renamed to tags that suits you.
Default_AlarmItem0 is a combination of Alarm server and the specific Alarm item so (Alarmserver)_(AlarmItem) this name may need to be modified to suit your needs.
Make sure that the Globals.AlarmServer.Default.Acknowledge(); is modified to change the alarm server name (if necessary from default)
*******End Note********
void Acknowledge_1_ValueChange(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.ValueChangedEventArgs e)
{
if (Globals.Tags.Acknowledge_1.Value==1)
{
Globals.AlarmServer.Default_AlarmItem0.Acknowledge();
}
}
void Acknowledge_All_ValueChange(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.ValueChangedEventArgs e)
{
if (Globals.Tags.Acknowledge_All.Value==1)
{
Globals.AlarmServer.Default.Acknowledge();
}
}