LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Knob after click a button

Solved!
Go to solution

Hi,

Im beginner and still learn how to use LabView to program. Would any know how to disable the knob after click a button? And also enable back knob after re-click?

image.png

0 Kudos
Message 1 of 12
(4,214 Views)

Hi bsang,

 

you should mark your thread as "LabVIEW NXG" as has been said in those pinned messages in the header of the LabVIEW board!

 

how to disable the knob after click a button?

You need to OBEY the DATAFLOW also in LabVIEW NXG: right now you disable the knob in parallel to your loop polling the button - but not "afterwards"…

 

And also enable back knob after re-click?

Set the button to enabled instead of disabled: use a shift register to store the current condition (like a boolean flag) and switch/invert that condition with each click…

(I guess NXG also allows to use an event structure!?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(4,212 Views)

Hi GerdW,

Thank you for reply my question. I still get no idea the meaning. Would you might to show me the step?

0 Kudos
Message 3 of 12
(4,203 Views)

Hi bsang,

 

I don't have NXG installed, so I cannot open your GVI.

 

You find an explanation of DATAFLOW in the LabVIEW help!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(4,199 Views)

Hi GerdW,

Oh i see. Thank You for the reference.

As you given DataFlow link, I might not clear understand about Data Flow. Would you might provide example to show how to disable knob after click a button?

 

Thanks.

 

0 Kudos
Message 5 of 12
(4,172 Views)
Solution
Accepted by topic author KnightBS

Hi bsang,

 

something like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 12
(4,169 Views)

Hi GerdW,

Thank you for the solution. I get the idea how to do. Btw the loop might a bit slow response after click Stop button. How can speed up the process time?

image.png

Thanks

0 Kudos
Message 7 of 12
(4,164 Views)

Hi bsang,

 

there is no wait function in your loops visible, so that VI will run as fast as possible.

No need to "speed up" anything here!

(You should think about using event structures to slow down that VI!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(4,157 Views)
Solution
Accepted by topic author KnightBS

@KnightBS wrote:

Hi GerdW,

Thank you for the solution. I get the idea how to do. Btw the loop might a bit slow response after click Stop button. How can speed up the process time?

 


You only need one while loop and no case structure.

 

Oneloop.png

Message 9 of 12
(4,138 Views)

Hi GerdW,

Thank you for advice and solution. I am glad to learn from you.

Thank You. Have a nice day.

0 Kudos
Message 10 of 12
(4,118 Views)