LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Button Functionality from Boolean Control Array


racahmd wrote:

 I have implemented the functionality using Push Button. When you turn on one Push button all other will be disabled and when you turn it off all others will be enabled.

 


Yes, this has nothing to do with a radiobuttons and is completely different functionality. I'll have a look what could be simplified. What is the reason that you need it to act this way?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 11 of 12
(220 Views)

OK, so apparently you need to force the users to turn off the currently TRUE button before allowing him to turn on a different button. There could be reasons for that, so let's have a look at your code example:

 

  1. The way you are building the array of references is pure Rube Goldberg. All you need are the four references and a "built array". (see picture)
  2. The array of references never changes, so it does not need to go into a shift register
  3. You don't need the timeout event
  4. You need an event for the stop button
  5.  No need to set anything false using references. The current switch just turned false and the others are already false.
  6. Setting the enabled property is the same in both cases, so you can combine that.
  7. Using search and delete from array to temporarily create a sub-array with one element missing seems like pumping a lot of hot air. Just use a switch.

I took the liberty to modify your VI a little bit to show what I mean. Modify as needed.

 

(Another option would be to turn this entire thing into an Xcontrol.)

 

Rube Goldberg array of referencesRube Goldberg array of references

 

 

Nonstandard Radio Button CodeNonstandard Radio Button Code


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 12 of 12
(214 Views)