LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using call by reference node to run a vi

i am using the call by reference node to run another vi. Is there any way to stop call node waiting for the other vi to finish?
0 Kudos
Message 1 of 5
(2,631 Views)
Matthew,

Be careful using this technique to run subVIs. It is usually only used for very specific needs, such as recursion and dynamic VIs (Sub VIs in a large project that are updated or changed.)

To answer your question: no. The reference node requires the output of the subVI to be passed, which means any code conneted to it must wait for the output.

My suggestion is to reconsider this method and instead use either a direct subVI call, or the VI server.
0 Kudos
Message 2 of 5
(2,631 Views)
> i am using the call by reference node to run another vi. Is there any
> way to stop call node waiting for the other vi to finish?
>

As the other post mentioned, this node always waits for completion,
almost exactly like calling a subVI. If you want the node to execute
asynchronously, use the Run method on the VI Reference. To get the
parameters in, use the Set Value or Control References.

Greg McKaskle
0 Kudos
Message 3 of 5
(2,631 Views)
First of all, set all control values, and then use Run method.
0 Kudos
Message 4 of 5
(2,631 Views)
Matthew,
In this case I would suggest using VI Reference to keep the rest of your program from waiting on the other VI you are running. If you open a VI using "Open VI Reference" and wire in an Invoke Node and choose the method "Run VI", you will see the option to "Wait until done" which you can set to false to allow your code to continue. Hope this helps!

Jim Cahow
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,630 Views)