LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Cluster of booleans

How do I make the Boolean buttons act like a radio button in this Cluster array.

If the user clicks on one of the buttons I want all other buttons to be false.

Is this the right control to use of is there something better.

I am trying to make a list of tests and the user will click on the Boolean to run the desired test.

 

 

0 Kudos
Message 1 of 9
(5,127 Views)

it is not good idea to use array of cluster just to select tests to be run. I am not saying it is impossible but first it will not look good and you will need to manage update/create array each time user select different test.

how about using table or list, with proper marking(tick and uptick) ? 

-
Amit
CLAD
0 Kudos
Message 2 of 9
(5,112 Views)

I cannot open your code to see what you have done but all you need to do is place down a radio button group, right click each control inside it and replace with the type of boolean you want to use.  No code necessary.

aputman
0 Kudos
Message 3 of 9
(5,092 Views)

Radio buttons are static always the same number of tests. 

This is not what I want I want the user to be able to define how many tests they need.

Thus use an array.

0 Kudos
Message 4 of 9
(5,083 Views)

The easy answer: Use a radio button.

What you're probably after: Use a Value change event on the array and set all but the current button to false.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 9
(5,065 Views)

s2.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 9
(5,047 Views)

@rcard53762 wrote:

How do I make the Boolean buttons act like a radio button in this Cluster array.

If the user clicks on one of the buttons I want all other buttons to be false.

Is this the right control to use of is there something better.

I am trying to make a list of tests and the user will click on the Boolean to run the desired test.


Unless you have additional cluster elements, a plain Boolean array is all you need. I guess you have other cluster elements, such as a string to give the test a name, for example.

 

Is the number of tests known from the beginning or can the number of available test change during the run?

 

Personally, I would use a simple listbox (selection mode = 1 item), filled with the various tests. You can sense e.g. double-clicking an entry to run that test. 

0 Kudos
Message 7 of 9
(5,032 Views)

This example you gave me works great. 1 more question. How can I make the event structure ignore anything but the Boolean (test button). See attached file.

 

Thanks

0 Kudos
Message 8 of 9
(4,877 Views)

@RickDTS wrote:

How can I make the event structure ignore anything but the Boolean (test button).


Unfortunately, you cannot do that with an array of clusters.

 

As an aside, you can greatly simplify that while loop in your event case by using a FOR loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(4,869 Views)