LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on enabling and disabling multiple buttons

Solved!
Go to solution

Greetings 🙂

 

I‘m doing a measurement using multiple instruments. I’m stuck in one implementation where I need to keep multiple controls enabled while some controls remain disabled. When I press the start button (turned ON), then enable and disable process will occur. After the start button is released (turned OFF), all controls should go back to the default state (enable).   

 

For easy understanding, have a look at snippet, and the things that I’m trying to do are:

 

Demo.png

 

Firstly, when the start button is switched on (true case), all enabling and disabling will take place.

 

Secondly, input C will be disabled, and input A and B will remain enabled.

 

Thirdly, when the start button is switched off (false case), all controls will be again enabled.

 

Please need help on this, 

 

Thanks. J

0 Kudos
Message 1 of 8
(3,658 Views)

Use Disable Property nodes to enable/disable buttons.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 8
(3,646 Views)

Enabling/disabling controls is done via property nodes.

 

Sorry, I cannot see your entire code (posting by phone). Where is the top level loop?

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

,

 

I know about the property node, but when I use that, my goal is not being fulfilled those three steps altogether (that I wrote before), e.g., when I disable buttons, it remains disabled even though I exit the application.

 

I guess I am messing up something where I need some help.

 

 

0 Kudos
Message 4 of 8
(3,617 Views)

@REDUANUL wrote:

 

I know about the property node, but when I use that, my goal is not being fulfilled those three steps altogether (that I wrote before), e.g., when I disable buttons, it remains disabled even though I exit the application.

 

I guess I am messing up something where I need some help.


All you have attached is a useless code fragment which runs once and completes (I really hope you are not using continuous run mode!). Where are the "multiple buttons" you mention in the subject? There is only one! Once you exit the application, "disabled" is no longer relevant. Enable the correct terminal states first thing when the VI starts instead, independent of their state in edit mode.

 

Where is your attempt of using property nodes? How do you "exit the application"? Where are the three steps? Are you sure your Boolean has a useful mechanical action? Why are the terminals inside the case structure? Where is the toplevel loop?

0 Kudos
Message 5 of 8
(3,611 Views)

,

 

In this updated snippet I used property node but is there any good way to disable all controls (input B and C) except one button (input A)?

 

Actually, in my measurement project, I have more than 10 buttons where I need to use property nodes one by one which is pretty much a manual process.

 

Demo-updated.png 

0 Kudos
Message 6 of 8
(3,606 Views)
Solution
Accepted by topic author REDUANUL

Input A is not a button.  They are all numeric controls.

 

You can build an array of references, and wire those references to a For Loop and put the property node inside that.

 

Message 7 of 8
(3,603 Views)
Solution
Accepted by topic author REDUANUL

@REDUANUL wrote:

Firstly, when the start button is switched on (true case), all enabling and disabling will take place.

Secondly, input C will be disabled, and input A and B will remain enabled.

Thirdly, when the start button is switched off (false case), all controls will be again enabled.

 


So, in simpler words, A and B are always enabled and C should depend on the boolean. Here's a simple code fragment to do just that:

 

altenbach_0-1619806927640.png

 

 

Note that properties only need to be written when they change not with every iteration of the toplevel loop.

Message 8 of 8
(3,600 Views)