LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access menu via buttons as well

Probably missing something really silly, but here goes.

I am trying to sort out a virtual product for our company. I have set an event structure with a custom menu. So it can be controlled like a windows system.

But I also want to have buttons which are on the real product. So i can control it with the buttons or the menu.
I.e. I have a start button and have a start menu i want them both to call the same code!!

Is there a nice way to achieve this.

Please help.

Any advice or example code would be excellent. I am using LABview 7.

Thank you

Adam
0 Kudos
Message 1 of 3
(2,520 Views)
Yes, there are a many ways to do this...

(1) User Events (LV70 feature) can be sent to the same event case as the menu events.

(2) Send Menu Events from the event loop into a queued message handler loop. Also send button events from the event loop to the same queued message handler loop.

Take a look at some design patterns presentations on the LabVIEW Zone.

-Jim
0 Kudos
Message 2 of 3
(2,520 Views)
Hi,
you can use "state machine" technique to solve your problem. In this case you have to "change" the state of your programm if menu item selected OR button pressed.

Good luck.

Oleg Chutko.
0 Kudos
Message 3 of 3
(2,520 Views)