LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Top Level VI and SubVI Execution

Hello,

I've got a top level VI that sends a set of data to a subVI. This subVI
opens a new window and the user can change the subset of data they are
viewing. It runs in a continuous loop so that every time the user makes a
change to the data viewing parameters, the figure updates. However, the top
level VI is waiting for this subVI to finish before it continues.

My question is:
How can I make my top level VI continue to run while I have this subVI
running in a continuous loop?

Thanks in advance,

Peter
0 Kudos
Message 1 of 3
(2,700 Views)
To solve part of your problem I use one of the traditional tricks in LabVIEW.
Use a vi with multiple states that has un-initialised shift-registers as a global memory.
From the main VI (when data changes) write the data to this memory-VI.
In the subVI, running in parallel of your main VI, you poll the memory VI for changed data.
If changed, get the new data from the memory-VI.

Patrick de Boevere (pdb@serenity.nl)
Serenity systems design
0 Kudos
Message 2 of 3
(2,700 Views)
You could have two seperate While loops on the block diagram -- one contains the sub VI, the other contains the rest of the code. When coded this way the front panel of the sub VI will appear and the rest of the code in the main VI will continue executing. You will have to pass data between the two loops using local variables.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 3 of 3
(2,700 Views)