Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Alarm State Icon

phoward131
2024-04-23
2024-04-24
  • phoward131 - 2024-04-23

    I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?

     
  • dkugler - 2024-04-24

    thank you for pointing me to this "bug"!! I haven't recognized, the bit is reset after the first alarm is gone.
    I use this only for warnings, so it's not a drama, but was not correct in the past.

    I solved it now simply stupid by counting up a variable every time an alarm appears and decreasing it if an alarm is gone.

    The "warning lamp" is activated by checking the counter is > 0

    The nice side effect, i'm able to show the number of active alarms in the state line now.

     

    Last edit: dkugler 2024-04-24

Log in to post a comment.