LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping the main-vi running when it has called a sub-vi

I need someone's help in this must-be-so-simple problem. I have a main-vi which has various indicators displaying values. From this main vi I call a sub-vi conditionally which displays a different set of values. But when the sub-vi runs, the main-vi stops updating as the code branches out to the sub-vi. How can I keep both running?
0 Kudos
Message 1 of 8
(5,674 Views)
I you search your Labview Online Reference Help files, and then search "VI setup Priority Setting", you may find some answers. Good Luck. Doug
0 Kudos
Message 2 of 8
(5,674 Views)
You could start the sub-VI via VI Server. First use an Open Application Reference, then an Open VI Reference. Use the Front Panel Window:Open property and then the Run VI method (making sure you specify false for Wait until done. If you need to, you can read from or write to the sub-VI's controls by using either Set or Get Control Value methods.
0 Kudos
Message 3 of 8
(5,674 Views)
Put the subVI out of the main loop, and it won't stop the main vi when running.
Hope this helps
0 Kudos
Message 4 of 8
(5,674 Views)
If I want to get the indicator result each time as the sub-VI is running, is there a way to do it? My sub-VI is a loop that outputs to a table, is there a way that you can get the result each time the table in the sub-VI updates itself? Thanks
0 Kudos
Message 5 of 8
(5,674 Views)
Use a queue to send data from the subVI back to the main VI.
0 Kudos
Message 6 of 8
(5,674 Views)
Global variables, references, queues, invoke nodes, are all possibilities. I've attached a very simple example that uses a reference in the subVI to an indicator in the main. It's in LabVIEW 6.1.
Download All
0 Kudos
Message 7 of 8
(5,674 Views)
Thanks, that seems to work well, but I also need to control the main VI while the sub-VI is running.
0 Kudos
Message 8 of 8
(5,674 Views)