(0)| 1/16/2026 7:38 PM | |
|
Joined: 8/27/2025 Last visit: 1/17/2026 Posts: 1 Rating:
|
Hello, please tell me, how I can find out the number of unacknowledged messages of a certain class? |
| 1/17/2026 12:00 PM | |
|
Joined: 1/21/2013 Last visit: 1/17/2026 Posts: 4405 Rating:
|
Hi Aleks_GutMann, The main task here is to set the correct filter. In your case, it should look like this: This filter restricts alarms to those within the specified class that are in an unacknowledged state. This filter can be used with the GetActiveAlarm method or an alarm subscription. However, it is important to avoid repeatedly calling the GetActiveAlarm method to prevent overloading the system. The advantage, however, is that you only need to count the elements in the returned HMIAlarmResult list. If you have an alarm subscription, it is your responsibility to keep track of how many alarms appear or disappear. You can do so by evaluating the "NotificationReason" property. To find the right balance between system load and programming complexity, consider using an alarm subscription to trigger an event whenever the number of alarms changes. In the "OnAlarm" callback function, use the GetActiveAlarm method to count the number of active alarms. Kind regards |
Follow us on