06-03-2015 01:57 PM
I am working on a project in which I want to create an alarm for any number of inputs. Any time that there is a input that is out of range, an alarm will be indicated. I would like the indicated alarm to persist until the user pushes a reset button, even if the out of range condition is removed. In addition, new alarm indication may occur and should also persist.
In the VI below, the Alarm Dummy Control is used to generate alarm(s). I want the Alarm Indicated array to maintain any element that had or currently has a true (alarm element). Every alarm will persist until the manual reset is pushed.
I am sure there is a simple solution, but I am drawing a blank right now.
Solved! Go to Solution.
06-03-2015 02:05 PM
Keep the Alarm Indicated values in a shift register and OR them with the current alarm. Just set the array back to all FALSE when you want to clear the alarms.
06-03-2015 02:19 PM
I partially understand what you are saying. Any value that is True (goes into the shift register) and then when "OR" with the new value will still result in True, even if that element has become false. I had not thought of this approach. I am still stuck with the fact that it is an array. Can I use the For Loop to auto index through the array? How do I properly set up the shift register such that each element is compared with the same element from the previous iteration and not from the previous element?
06-03-2015 02:47 PM - edited 06-03-2015 02:48 PM
You can operate on the array directly, no FOR loop needed.
Here's a very quick draft. See if it can give you some ideas.
06-04-2015 02:03 PM
Note that the small case structure is NOT necessary because indexing into an array with -1 will give you an empty string anyway. I put the case structure in there for easier feature additions. For example if it should say "No Alarms", "Everything OK" or similar, you could just add that string to the -1 case.