ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable property function

Solved!
Go to solution

Good afternoon,

 

I am using LabVIEW 8.6.1 and I used three booleans in a vi. What I want is: when one of them is on the other two to be disabled, and of course when all are off all to be enabled.

Can someboby help me with  this.

 

Thank you in advance 

0 Kudos
Message 1 of 10
(4,415 Views)
Solution
Accepted by topic author LW42

Hi thorfano,

where do you have problems?

Use an event structure to react on the value change event. Get the references of all your controls and build an array with the enabled/disabled states. Change the states with the value change event. You can store the states in an array and run through a loop after every event.

 

Mike

0 Kudos
Message 2 of 10
(4,409 Views)
Thanks a lot for the help.
0 Kudos
Message 3 of 10
(4,405 Views)

This code should do the trick!  It's simple enough not to have to attach the actual code for it.  At the moment, when the controls are disabled, they're grayed out but still visible.  If you want them to disappear completely when disabled, just remove the three 'multiply by 2' sections and wire the numbers straight to the property nodes.

 

 

Message Edited by James Mamakos on 05-11-2009 01:57 PM


Never say "Oops." Always say "Ah, interesting!"

Message 4 of 10
(4,404 Views)

Are you tring to impliment a "Radio Button" style input where only one can be selected at a time?

 

Try a Radio Button 

https://www.ni.com/docs/en-US/bundle/labview/page/creating-a-radio-buttons-control.html

 

 

Omar
0 Kudos
Message 5 of 10
(4,402 Views)
I may be wrong, but is my simple method not easier than having an array of references within an event structure?


Never say "Oops." Always say "Ah, interesting!"

Message 6 of 10
(4,391 Views)

Thanks a lot. It's nice to have alternatives, and Omar thanks for the suggestion, however in this case I would prefer to avoid radio selection style.

 

Have a nice evening 

0 Kudos
Message 7 of 10
(4,384 Views)

James Mamakos wrote:
I may be wrong, but is my simple method not easier than having an array of references within an event structure?

 

Hi James,

how flexible is it, if you need 10 or 100 instead of 3 buttons. Smiley Wink

 

Mike

Message Edited by MikeS81 on 05-11-2009 03:21 PM
0 Kudos
Message 8 of 10
(4,380 Views)

What's wrong with having huge radio-button style coding?! 😉

 

Fair point - i submit to your superiority, Mike! 😛



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 9 of 10
(4,369 Views)

James Mamakos wrote:

...

 

Fair point - i submit to your superiority, Mike! 😛


it's not necessary. For my sake he could mark your post as solution. I only tried to help.

 

Mike

0 Kudos
Message 10 of 10
(4,367 Views)