04-04-2014 01:28 AM - edited 04-04-2014 01:45 AM
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?
04-04-2014 01:47 AM - edited 04-04-2014 01:49 AM
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.
- Ee Lim -
04-04-2014 08:00 AM
The function should also stop, so if they forget to turn off the button, it should turn itself off
04-10-2014 09:05 AM
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.
Best regards,