Short Name: Run VI
Requires: Base Package
Class: VI Methods
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.
|Wait Until Done||No||Specifies whether to wait until the VI completes execution before the Invoke Node continues executing. The default is TRUE.|
|Auto Dispose Ref||No||Allows 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.
The following table lists the characteristics of this method.
|Data type||No return value|
|Available in Run-Time Engine||Yes (Read/Write)|
|Available in Real-Time Operating System||Yes|
|Settable when the VI is running||Yes|
|Loads the front panel into memory||No|
|Need to authenticate before use||No|
|Loads the block diagram into memory||No|
|Remote access disallowed||No|
|Must wait until user interface is idle||Yes|
|Available with control VIs||No|
|Available with global VIs||No|
|Available with strict type definitions||No|
|Available with polymorphic VIs||No|
Refer to the DateServerUsingReentrantRun VI in the labview\examples\viserver\runvi.llb for an example of using the Run VI method.