08-31-2010 02:44 PM
Hi,
I have about 20 check box that the user can check or uncheck, and I am trying to see if using array or cluster will work. Below is a simple example of what is going on and what I would like to accomplish.
From the above example, will it be possible to use array or cluster, so that when the user checks or unchecks a box, the appropriate active plot number, and the boloean condition will be sent.
Because if I have 20 plots, it will be unwise to put down 20 property nodes on the block diagram.
Thanks.
08-31-2010 02:49 PM - edited 08-31-2010 02:50 PM
Try it and see. I would probably use a cluster, and extract the values by name, as it helps keep track of what it what. An array would obscure it a bit, "which one is element 0, etc." Getting really fancy would put the checkbox controls into a event structure (in a different loop than the graphing).
08-31-2010 02:58 PM
This question has come up many times before, so you should look at some of the numerous examples that have been posted. For example:
http://forums.ni.com/t5/LabVIEW/How-to-select-which-plots-are-visible/m-p/939772
08-31-2010 03:09 PM
How about using a for loop with a single property node within. You can loop through each active plot and set the visibility from a boolean array control.
See the attached image.
Dan
08-31-2010 03:13 PM
You are right, wiring 20 property nodes is not the best solution. One good solution to handle such an amount of data is to use references and property nodes (see image). Create a reference for every boolean value and create an array of reference. Do the same for all your data, then you can process everything in a for loop.
One other possibility is to place all your bools on a Tab Page and then access the controls by the property "Controls" of your Tab...
Good Luck!
Christian