LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster of Boolean Controls Problem

Solved!
Go to solution

Hello All,

 

I was wondering what would be the best way to go about implementing a radio-button type architecture for a cluster of boolean controls.

 

My current problem: I have a cluster of boolean controls (12 of them) all sorted in rows of 3. For each control on each row, I would like to disable and gray out the two other controls that are not pressed. This would be similar to radio buttons; however, I would also like to be able to leave all the buttons unpressed (all false). 

 

I'm not exactly sure if the radio buttons could apply in this situation, but I have tried to tinker around using a case structure with property nodes without much luck. I was able to get to a point where I could pull out the labels of the booleans into a case structure. I'm not sure if this would be the best way to go about it, so I'd really appreciate any help. I've attached a picture of the VI down below 

 

Thank you very much  

0 Kudos
Message 1 of 6
(3,169 Views)

Use an event structure.  Whenever something in the cluster changes, iterate though all the other controls to disable and grey them, and set them to false when a button is set to true.

 

When a button is set to false, enable all controls.

0 Kudos
Message 2 of 6
(3,152 Views)

RavensFan -- Thank you for the speedy reply.

 

So from my understanding you are suggesting making an event structure for the entire cluster and triggering an event based off a value change inside of the cluster, correct? So essentially it will have one event, and I would have to find the changed element so that I could disable and gray the other two controls on the row. 

 

I wonder if I could create an event structure and add event cases for each boolean in the cluster separately. That way, I could immediately set the condition of the other two controls easily by wiring the new value to a case structure and subsequently using property nodes. May be a bit tedious, but I wouldn't have to go through the extra logic or loops... 

0 Kudos
Message 3 of 6
(3,137 Views)

Is this what you are trying to do?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 6
(3,127 Views)
Solution
Accepted by topic author Garord

@Garord wrote:

RavensFan -- Thank you for the speedy reply.

 

So from my understanding you are suggesting making an event structure for the entire cluster and triggering an event based off a value change inside of the cluster, correct? So essentially it will have one event, and I would have to find the changed element so that I could disable and gray the other two controls on the row. 

 

I wonder if I could create an event structure and add event cases for each boolean in the cluster separately. That way, I could immediately set the condition of the other two controls easily by wiring the new value to a case structure and subsequently using property nodes. May be a bit tedious, but I wouldn't have to go through the extra logic or loops... 


Exactly.

 

You create multiple events.  But once you get beyond a couple, it is worth the effort of doing loops and would be more easily expandable to X number of controls.  I, myself, would go straight to a loop method and a single event.

0 Kudos
Message 5 of 6
(3,115 Views)

RavensFan -- Thank you for your help, I was able to implement one with the functionality I wanted.

 

paul_cardinale -- I am unfortunately not able to open your control as I am using LabVIEW 2017 and I believe yours has been saved in LabVIEW 2018. If you don't mind saving for a previous version, I would be more than happy to take a look. Thanks for sending that over.

 

0 Kudos
Message 6 of 6
(3,098 Views)