Sum the AlarmState property value from multiple objects by the use of a Simple Scripting Aspect
I want to make a simple calculation of the "AlarmState" property value from multiple objects. The calculation is simply to sum the values and give the result as an integer value. To make it easy to add and remove tag objects from the calculation, I am thinking of using a simple scripting aspect.
Attached are a highly simplified script, just showing how I would like the script to work.
I would like some help on how to get the values from multiple objects, and create the calculation.
Jan Helge Sture
I guess you need the sum for some special purpose?
Another, simpler solution could be:
1) Insert member objects below some container object in some structure
2) Read Alarm Global Properties:AlarmConditionState_Descendants off container
I believe you can also count/filter by creating an alarm list on the container and read data off the alarm list's properties.
One should know though, that alarm list properties (due to their filtering possibility) come at a much higher price than Alarm Global Properties. If possible, use the non-filtered AGP to preserve performance in the Alarm Manager.