Run VI Method
Short Name: Run VI
Installed With: 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.
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.
Parameters
Name | Required | Description | ||
---|---|---|---|---|
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.
|
Remarks
The following table lists the characteristics of this method.
Available in Run-Time Engine and Real-Time Operating System | Yes (Read/Write) |
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 |
Example
Refer to the DateServerUsingReentrantRun VI in the labview\examples\viserver\runvi.llb for an example of using the Run VI method.