LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running sub-vi without waiting for results

Hi,

esentially I have a LabView program that has a single while loop in it. The loop first reads N samples from an input and then passes those samples to a sub-vi which writes them to a file. How can I make the while loop start again without waiting for the sub-vi to complete? Otherwise at high sample rates (>100kS/s) then after some amount of time, the data I am trying to read has been overwriten in the buffer. Enlarging the buffer will not solve my problem as this program needs to be designed to run indefinatly at high (~200kS/s) sampling rates and increasing the buffer will only delay the point at whcih the program breaks down. So how do I make the loop read data, execute the write vi and not wait for writing to complete?

Also, the manner in which I am writing data is stateless so that it is possible to have many write vis open and running at the same time without conflict.

Thanks,
Jon
0 Kudos
Message 1 of 4
(2,788 Views)

You can dynamically call the sub vi and select "wait until done=False"

or better use the "Producer/Consumer Design Pattern (Events)".

I strongly suggest the second. You can find it in Labview patterns at "create new"

0 Kudos
Message 2 of 4
(2,784 Views)
How do you dynamically call the vis? I'm not quite sure what you mean. I'm looking into the second option now, thanks for your advice.
0 Kudos
Message 3 of 4
(2,779 Views)
Hi jaraalmon…,
to run a vi dynamically, you have to open the vi reference. Use then an invoke node to run the vi. But because of you also have to send your data to this dynamically running vi, i also recommend to use the consumer/producer structure. Did you try it? Where do you have problems with it?

Mike
0 Kudos
Message 4 of 4
(2,772 Views)