LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

non-mutually exclusive radio button

Is there any built-in LabVIEW function that would allow me to have a non-mutually exclusive radio button?  I want to be able to select either 0, 1, or 2 options, but not more than that.  I could use a simple cluster, but then I would have to have some code that unselects options when more are selected.
 
Thanks for helping me think about this!
Regards,
Michelle
0 Kudos
Message 1 of 8
(3,689 Views)
A listbox can do that. Maybe with symbols on.
Message 2 of 8
(3,678 Views)
I don't know much about listboxes...  I'll investigate them!
 
Thanks for the advice,
Michelle
0 Kudos
Message 3 of 8
(3,663 Views)

Hi Michelle,

There is no built-in way to do this.  You'll have to use individual booleans (there are some dialog boolean controls that look like radio buttons) with supporting code...but I'm curious...how are you going to decide which of the two currently selected items will be deselected when a third button is clicked?

-D

P.S. - You can "construct" your own control in LabVIEW 8.0 called an XControl that has code behind it that dictates its behavior in the UI.  This is probably the most elegant solution, but also the most difficult.
Message 4 of 8
(3,662 Views)

Darren,

Thanks for the heads up on LabVIEW 8...  I'm still on LabVIEW 7.1, but that sounds like a feature I could use!

You bring up an interesting point about which button will get deselected.  I was hoping to use the "old value" in an event case, but I really need 2 previous values to tell which one is the oldest value, so this would require a shift register.

I really don't want to put a lot of processing effort into this one control, so I might just use regular radio buttons and eliminate my requirement to select 2 options.  Otherwise, I guess I could always have 2 sets of radio buttons with the same options for each one.  Perhaps this is slightly redundant, but at least it's a simple solution.
 
Regards,
Michelle  Smiley Tongue
0 Kudos
Message 5 of 8
(3,648 Views)

Hi Michelle

I was curious about Darren point so I built a vi to check it out. The button I have chosen to be reset was the last one set to true.

Sounds like you had it covered but here is my take on it anyway.

David

Message 6 of 8
(3,638 Views)
Hi, everyone.
 
I made something like that in a project that I'm working since few weeks ago, but I had to use an "event case structure" and local variables or property nodes  inside each case (for a new selection of radio buttons) in the project.
 
I've been using LabView 7.1 student edition. Please, if someone know a better way to do that, send me a message too.
 
 
Sorry for my english Smiley Tongue
 
Thank you
 a
Message 7 of 8
(3,629 Views)

David,

I tried your VI and it does what you said it would.  It's not really all that much code...  perhaps I shouldn't give up just yet on the idea of a non-mutually exclusive radio button!

Thanks for your help.  I'll keep thinking about it...

 

Regards,

Michelle  Smiley Happy

0 Kudos
Message 8 of 8
(3,613 Views)