LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to close a sub-vi when running the main

i have two running vi (main and sub), the main is sending one data at a time to the sub, and i need the front panel of both to be open, till the main finish and close the front of the sub. the close option will not work for me because the sub finish after each time the main send data to it. i need the front panel to be always open, even when it is not running until the main finish and close it??????
0 Kudos
Message 1 of 2
(2,927 Views)
I've read your Question 3 times, this is what I get...
1. You want to keep the Main Vi open until you tell it to close.
2. You need to keep the subvi open and running until the main closes.

These 2 modes will happen if your subvi VI Node Setup (rt-click on subvi to set) is set to "Open front panel when loaded" and "Show front panel when called"; leave the "Close afterwards..." unchecked.
Also, when you close the main, all its subvis will close automaticllay. But, on your subvi, if it contains its own while loop (which is good), make sure it won't close after just 1 run. In fact, you could create a node input that will set your subvi loop run/stop node based on a condition from your main VI.
Good luck with it, Doug
0 Kudos
Message 2 of 2
(2,927 Views)