03-22-2011 04:05 AM
Hi,
I want to program a timed loop that spawns new parallel processes (e. g. while loops) at specific points in time. It's kind of a C++ loop that dynamically creates thread objects at certain interation points and calls the thread member function start() immediately. The loop can continue iteration after spawning a thread, regardless of the threads runtime.
At the moment placing a number of LabView while loops that are waiting for a start signal (via notifier or queue) from a main loop is the best way I can think of. But this approach is fixed in number.
Is there something I can do via VI references?
03-22-2011 04:52 AM
03-22-2011 09:00 AM
I found a forum thread that discusses a similar topic: Link
They open a VI reference (which I want to do anyway) and they call the VI via a method node "Run VI", where a "wait until done" flag is available.
But how do I specify input values for the VI?
03-22-2011 09:51 AM
You might be able to leverage these techniques.
03-22-2011 09:58 AM
@pgraebel wrote:
But how do I specify input values for the VI?
Use the Set Control Value method.
03-22-2011 11:26 AM
I managed it to open and call two instances of the same VI (CallMe.vi). These two instances get different input values (Wait Time). The CallMe.vi block diagram shows a double run arrow instead of a simple white arrow and both CallMe.vi instances terminate at different times according to their different Wait Time input values. I had to check "invariant execution" in the CallMe.vi VI settings.
Is this a or the correct way to dynamically call different instances of the same VI or various VIs without having to wait for their termination?