LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a simple launcher VI that will end when the new VI is started?

I've just recently upgraded to Labview 7 and I'm writing a complex set of programs that are related, but do not need to be running simultaneously. I would like to write a simple launcher program that will load the appropriate VI and close itself after doing so. I understand how to call a subVI and have its front panel open upon execution, but I'd rather keep the VI's seperate.

Thanks for any help in advance.

-Warren
0 Kudos
Message 1 of 3
(3,660 Views)
In order to implement this you will need to use VI Server to open a reference to the VI ("Open VI Reference" function), set any of its control values ("Set Control Value" method), run the VI ("Run" method), and then open its front panel ("Front Panel Window.Open" property), and usually in that order. There are some subtleties that involve VI refnum garbage handling and lifetime -- Take a look at the documentation on the Auto Dispose Refnum argument of the VI.Run method.
Message 2 of 3
(3,660 Views)
Try the attached example. Be careful though - if you make changes to this VI, make sure you save it before you run it, as it closes itself, and you will loose any unsaved changes...




Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Message 3 of 3
(3,660 Views)