LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

different choice on menu

I have a menu with 3 different choices,

when the user choose one of the choices, a spesific button should appear, and when the user chooses another choise, the button should disapear and a led appear.

What is the best way to do this?

0 Kudos
Message 1 of 4
(2,078 Views)

Hi there,

 

You can use the Case Structure to determine which case the user selects.

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/case_structure/

 

And within each case, the property node can be used to change the visibility of the front panel objects like LEDs and buttons. You can create the property ndoe as shown below.

1.png

 

- Ee Lim -



See that button on the left side of this post...

If you feel my post is helpful, all you need is just (at most) 2 seconds to click that button, to show your appreciation. Thank you~~



Message 2 of 4
(2,066 Views)

The function should also stop, so if they forget to turn off the button, it should turn itself off

0 Kudos
Message 3 of 4
(2,033 Views)

Hi Eoiser,

 

As stated by ongeelim, property nodes are the right way to go. I have attached an example and a snippet for easier viewing.

 

When your application is growing larger I recommend reading this white paper on state machines for handling transitions between different states.

 

Application Design Patterns: State Machines

http://www.ni.com/white-paper/3024/en/

 

EDIT: my snipping tool does not seem to work correctly at the moment, so I to attach a picture instead.

 

Capture.PNG

 

Best regards,

Robert P-F
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(1,991 Views)