LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array or Cluster Implementation

  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.22815iDA3DC232E026CCEA

 

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.

0 Kudos
Message 1 of 5
(3,159 Views)

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).

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 2 of 5
(3,155 Views)

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

 

Message 3 of 5
(3,148 Views)

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

Message 4 of 5
(3,136 Views)

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

 

22817iDBB45F58D272E32D


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
Message 5 of 5
(3,130 Views)