Run VI Method

FlexRIO Help

Edition Date: November 2015

Part Number: 372614J-01

»View Product Info

»Download the Help in ZIP Format

Short Name: Run VI

Requires: Base Development System

Class: VI Methods

To Use: Create a method.

Starts the VI execution, similar to the Run button. This method is different than calling a VI because it uses the current values of all front panel controls for execution rather than using data passed in through parameters. This method also ignores the Execution:Show Front Panel On Call property of a VI and the Execution:Close After Call property.

Note  This method requires the VI to have a front panel. If you are using the Application Builder, make sure you do not remove the front panel.

You cannot use this method to run a VI that is already reserved for execution by another VI.

If you use the Open VI Reference function and wire the type specifier VI Refnum input, you cannot use the reference returned by the function with this method. Instead, you must use the Call By Reference node.

If you want to use this method with a reentrant VI, set the options parameter to 0x08 in the Open VI Reference function to prepare the VI for reentrant run.


Data typeNameRequiredDescription
Wait Until DoneNoSpecifies whether to wait until the VI completes execution before the Invoke Node continues executing. The default is TRUE.
Tip  Use the Start Asynchronous Call node instead of the Run VI method to run target VIs asynchronously. In addition to providing a simpler interface, the Start Asynchronous Call node allows you to collect the outputs of the target VI with a corresponding Wait On Asynchronous Call node.
Auto Dispose RefNoAllows you to run a VI independently of the caller without opening its front panel immediately or opening another reference inside the target VI. If TRUE, the referenced VI transfers ownership of the reference from the calling VI to the VI that is running. This means LabVIEW disposes of the reference, along with the parallel data space, when the target VI goes idle, not when the VI that opened the reference goes idle. The reference can still be used by the calling VI until the target VI closes the reference. The calling VI does not need to close the reference unless the Run VI method returns an error. If the calling VI does close the reference, the target VI can abort and leave memory. If FALSE, LabVIEW automatically disposes of the VI reference when the VI that opened it goes idle. The default is FALSE.
Note  If Auto Dispose Ref is TRUE and the method returns an error, LabVIEW does not transfer ownership of the reference to the target VI. LabVIEW will not automatically dispose of the reference when the target VI goes idle.


The following table lists the characteristics of this method.

Data typeNo return value
Available in Run-Time EngineYes (Read/Write)
Available in Real-Time Operating SystemYes
Settable when the VI is runningYes
Loads the front panel into memoryNo
Need to authenticate before useNo
Loads the block diagram into memoryNo
Remote access allowedYes
Must wait until user interface is idleYes
Available with control VIsNo
Available with global VIsNo
Available with strict type definitionsNo
Available with polymorphic VIsNo


Not Helpful