Owning Palette: Application Control VIs and Functions
Requires: Base Package
Maintains a static reference to a VI. You can configure the Static VI Reference function to output a generic or strictly typed VI reference. After you place the Static VI Reference function on a block diagram, double-click the function to display a file dialog box where you can select a VI.
|vi reference is the refnum associated with the configured VI. If the VI is not valid, vi reference contains Not A Refnum.|
The Static VI Reference function acts as a subVI and appears in the VI hierarchy of the top-level VI. By default, the output is a generic VI reference.
You can change the output of this function to a strictly typed VI reference. Right-click the function and select Strictly Typed VI Reference from the shortcut menu to change the output. A red star in the upper left corner of the function icon indicates the reference is strictly typed. The strictly typed VI reference identifies the connector pane of the VI you are calling. You can create a strictly typed VI reference only from a VI or VI template, not from a polymorphic VI or other non-VI file such as a global variable or control.
Use a strictly typed VI reference if you want to call the referenced VI with the Call By Reference Node. When you create a strictly typed VI reference, you cannot wire vi reference to the Run VI method. You cannot use the Run VI method to run a VI that is already reserved for execution by another VI. A strictly typed static VI reference also reserves any subVIs when a top-level VI is reserved, thus making it ineligible for the Run VI method. Refer to the Run VI method for more information.
LabVIEW loads the referenced VI into memory when you load the top-level VI. When the Static VI Reference function outputs a strictly typed VI reference, LabVIEW reserves the referenced VI as long as the top-level VI is running. LabVIEW closes this reference when the top-level VI is no longer in memory.