Simple Alarm Module
Did you find this code helpful?
5 members have voted
Unitronics has provided us with a powerful and comprehensive alarm system built into the OS. It provides grouping, status conditions, and pre-made screens to interact with. It's a terrific piece of work, and I do not wish to detract from it one bit.
That said, it's also complex and can be tricky to set up. The vast majority of my projects don't need anything that sophisticated. So after several years of working on my own technique, I finally came up with a module that matches just my needs, keeping it simple and sweet.
The attached program is a simple alarm system. It uses the legacy Events FB, a string library to store text for alarms, and UTC date and time stamps. There are 12 entries on the screen, active alarms are highlighted in red, and go white when cleared, leaving a 12-point history behind. The Event Rise FB ensures that all alarms are captured, even if they occur simultaneously.
This module in particular seems ripe for expansion. You could modify it to scroll and add more alarms to the history, and /or use Log to SD for long-term history. But as I said, those just aren't something I generally need.
One limitation that comes to mind is that if more than 12 alarms occur at once, some will be knocked off the list and not visible. To which I say, if you have more than 12 alarms occurring simultaneously, you may have bigger problems than the length of the list
Enjoy!
TM
2 Comments
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now