10-15-2015 03:17 PM
By the way, I just changed the mechanical action of the clear button, it is not in the version I uploaded recently.
10-15-2015 03:24 PM - edited 10-15-2015 03:26 PM
@TeamHalli wrote:
Can you please elaborate on your bulleted items:
Here is just a 2 minute rewrite, showing some of the point. Maybe it can give you some ideas. I haven't looked at the version with the subVIs.
(I don't handle the case where more than one boolean changes between polls, though. That would need a small FOR loop to find all, not just the first, changed element).
In principle, you can do all in one loop, using a feedback node to find the changed elements after each poll and update the highlighted cells array.
10-15-2015 03:38 PM - edited 10-15-2015 03:39 PM
@altenbach wrote:
In principle, you can do all in one loop, using a feedback node to find the changed elements after each poll and update the highlighted cells array.
And here is a version using a single loop for everything. (Not debugged, just a rough draft!)
10-15-2015 03:46 PM
Thanks Altenbach.
So if the alarm list can change order all the time based on state (which is True or False) and priority level (which alarm shows at the top), i can have an order on the alarm list of Alarm 2, 5, 8, 9,12 at one time and Alarms 1,6,8,10 the next time. Is there a way to track where those alarms are or were on the listbox at anytime? The highlighting is using the index of the alarm not the order on the listbox. Is using a listbox appropriate for this application?
Thanks,
TeamHalli
10-16-2015 07:30 AM
Do you all have any idea on how I can implent a display for alarms, where any new alarm would be flashing and after the alarm(s) are ackowledged they will no longer flash until the alarm(s) go false and back to true again (which will make it a new alarm again).
Thanks!
10-16-2015 10:03 AM
Yes, same thing. Just keep an additional array (e.g. boolean) in a shift regsiter, that contains information which alarms have already been acknowledged, for example. It could even be an enum with multiple states (no alarm, new alarm, acknowleged alarm, ignored alarm, important alarm, etc).
10-16-2015 10:10 AM
I have only one Clear or Acknowledge button for all alarms, so I don't know how to keep track of each alarm individually if I am using a listbox.
Thanks
10-16-2015 10:23 AM - edited 10-16-2015 10:24 AM
You can keep track using a shift register. Create your own array of data that pertains to your list and keep track of what has been highlighted and what hasn't, etc.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-16-2015 10:27 AM
You can keep as many arrays in shift registers as you want. No front panel object needed. Use it to maintain extra information for each alarm.
All your current logic code is trivial, so you would just add a few more checks and update the state details as needed. You could even keep information about when each alarm got triggered and then check if they are older than a certain time (e.g. when clear was pressed). There are many other ways to do these things, just decide on an architecture that is scalable and that makes it easy to keep track of additional information. You are not dealing with millions of alarms so memory is not of concern.
10-16-2015 10:32 AM
Follow what altenbach suggests for sure.
I think you would also benefit from looking at the Simple State Machine template that ships with LabVIEW. This will show you an example of how to store a cluster of data through shift registers and keep track of your application as the user performs actions.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'