Page 1 of 1
diable alarmserver group
Posted: Mon Apr 15, 2013 3:20 am
by hans gerritsen
Hi,
Is it possible to disable a group in the alarm server in runtime/via a tag?
Regards
Hans
Re: diable alarmserver group
Posted: Mon Apr 15, 2013 8:53 am
by mark.monroe
What do you mean by disable? Do you not want the alarm to show up when the alarm condition is met?
Code: Select all
//This will disable the alarms in this group. i.e. the alarms will not trigger
//when the alarm condition is met.
//AlarmGroups[0] references the alarm groups in order. So [0] means the first alarm group, [1], the second, etc.
Globals.AlarmServer.AlarmGroups[0].IsEnabled = false;
//To re-enable alarms
Globals.AlarmServer.AlarmGroups[0].IsEnabled = true;
Re: diable alarmserver group
Posted: Mon Apr 15, 2013 2:11 pm
by hans gerritsen
Thanks for the answer,
The thought behind the question is this: I want to use one standard panel program for several diffent plants. Some plants have 2 connected plc's to one panel. In such case the panel uses one alarm server group for plc 1 and one group for plc2.
For those plants with only one plc, I want to be able to disable the unnecessary time consuming polling of alarms from plc 2.
Does this "AlarmGroups[0].IsEnabled = false" disable this unecessary polling?
Re: diable alarmserver group
Posted: Tue Apr 16, 2013 3:49 am
by hans gerritsen
The "AlarmGroups[0].IsEnabled = false" causes a syntax error.
Do I have to include a library?
Re: diable alarmserver group
Posted: Tue Apr 16, 2013 8:02 am
by mark.monroe
Best to consult with a C# programmer to parse your errors. You need to write the code like I showed you. "AlarmGroups[0].IsEnabled = false" will not work.
Re: diable alarmserver group
Posted: Tue Apr 16, 2013 8:37 am
by mark.monroe
Here is some more information regarding disabling the alarm group from one of the developers:
All alarm tags are active independent if the group is enabled or not. There is also one additional limitation that might be useful to know about. When the alarm group is enabled it will not detect alarms conditions until the tags changes value the next time.
Example:
- Group1 is disabled. Group1 includes one alarm with condition >90. The tag value is 95.
- Group1 is enabled. The alarm server does not react and present the alarm.
- The tag's value changes to 96, this ValueChange is detected and the alarm is triggered.