Hi,
I would like to know what the best way is to get a summary of the alarms on a UDT. What I need is the highest priority active alarm (for a colour around the UDT symbol) and if there are any unacknowledged alarms (to blink). I need to do this for about 50 UDTs on a page with about 100 clients active.
I see the following options:
- Use an expression tag on the UDT that monitors all configured alarms and presents a summary integer (priority code and negative if unacked). Similar to below:
if(max({[.]Alarm1/Active/Alarms.HighestActivePriority}
,{[.]Alarm1/Active/Alarms.HighestUnackedPriority}
,{[.]Alarm2/Active/Alarms.HighestActivePriority}
,{[.]Alarm2/Active/Alarms.HighestUnackedPriority}) = null,
null,
if ({[.]Alarm1/Active/Alarms.HasUnacknowledged}
|| {[.]Alarm2/Active/Alarms.HasUnacknowledged}, -1, 1)
*
max({[.]Alarm1/Active/Alarms.HighestActivePriority}
,{[.]Alarm1/Active/Alarms.HighestUnackedPriority}
,{[.]Alarm2/Active/Alarms.HighestActivePriority}
,{[.]Alarm2/Active/Alarms.HighestUnackedPriority}))
The disadvantage of this is that if a new alarm is added to the UDT, one must remember to add it here. It also occasionally (very infrequently) shows an alarm when none are present, as if the expression didn’t evaluate.
-
Use 5 custom properties bound to
isAlarmActiveFiltered()
expressions, one for each priority and one to see if anything is unacked.
I do not know the performance impact of this across potentially 50 UDTs per page and 100 clients. -
Use
system.alarm.queryStatus()
and analyse the results to the summary. There is a warning in the documentation about performance, so I am hesitant to use it for my use case.
If we had this structure aggregated to a UDT or folder level, it would all be automatic:
What would you recommend?
Regards,
Deon