Hi,
Is it possible to disable a group in the alarm server in runtime/via a tag?
Regards
Hans
diable alarmserver group
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: diable alarmserver group
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;
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 26
- Joined: Fri Jan 20, 2012 12:55 pm
Re: diable alarmserver group
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?
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?
-
- Posts: 26
- Joined: Fri Jan 20, 2012 12:55 pm
Re: diable alarmserver group
The "AlarmGroups[0].IsEnabled = false" causes a syntax error.
Do I have to include a library?
Do I have to include a library?
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: diable alarmserver group
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.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: diable alarmserver group
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.
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.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer