LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing menu items to subvi

Hi,
I am having trouble in passing my menu ( drop down) entries to subvi. actually I don't know how to do that? is it just one step proecss or have to create some global variable or sth.

w/e is the answer please let me know asap.

I apologize if I sound dumb but then that I am 😛

cheers
-p
0 Kudos
Message 1 of 5
(2,863 Views)
You can pass the reference to the menubar in your main VI or in the main VI get the item tag of the selected menu item and pass that. For an easy exercise on passing a menu reference, open the shipping example called Menu Selection Demo, select everything inside the while loop except for the stop control and go to Edit>Create SubVI. The subVI created will have a single front panel control that is the reference. The modified program will run just like the original except the menu handling is done in the subVI. A menu refnum is also one of the controls on the Refnum palette so you can also create a subVI from scratch.
0 Kudos
Message 2 of 5
(2,863 Views)
how to get the menubar???

man I feel like dumb I am sorry but I don't see the demo example anywhere u r talking about ..

cheers
-P
0 Kudos
Message 3 of 5
(2,863 Views)
oh ok ok..

now I wanna know how to pass a string to subvi.??

sounds simpler ... any help??

cheers
-P
0 Kudos
Message 4 of 5
(2,863 Views)
You create a string control in the subVI and wire it to the connector pane. In the main you can now wire a string to the subVI. This is pretty basic stuff. Most if not all of this information is in the shipping documentation - help and pdf files. You might want to check The LabVIEW Learning Center for all of your options including official courses, books, and on-line tutorials.
0 Kudos
Message 5 of 5
(2,863 Views)