Table Of Contents

Static VI Reference (G Dataflow)

Version:
    Last Modified: September 18, 2017

    Maintains a static reference to a VI. Configure this node to return a generic or strictly typed VI reference. After you place this node on a diagram, drag a VI onto the node.

    connector_pane_image
    datatype_icon

    VI reference

    The reference to the configured VI.

    Configuring a Static VI Reference

    Configure a Static VI Reference one of the following ways:
    • Drag a VI from the Project Files tab onto Static VI Reference.
    • Drag a subVI from the diagram onto Static VI Reference.
    • Drag a VI from the palette onto Static VI Reference.
    spd-note-note
    Note  

    The VI you use to configure Static VI Reference should be accessible and under the same target; in other words, if the VI belongs to a component different from that of the owning component of the Static VI Reference node's parent VI, it should be an exported VI. If not, the reference produces a compile-time error.

    Specify whether the Static VI Reference is strictly typed on the Item tab.

    Static VI Reference Output

    Placing Static VI Reference does not cause the diagram to call the VI, but ensures that the referenced VI is loaded into memory with the referer, in the same way a subVI is loaded with its caller. By default, the output is a generic VI reference.

    To change the output of this node to a strictly typed VI reference, select Strictly Typed Reference on the Item tab. The strictly typed VI reference identifies the VI you are calling. You can create a strictly typed VI reference only from a VI, not from a non-VI file such as a control.

    Strictly Typed VI References

    Use a strictly typed VI reference if you want to call the referenced VI with Call by Reference or Start Asynchronous Call. When you create a strictly typed VI reference, you can wire VI reference to the Run VI node.

    The application loads the referenced VI into memory when you load the top-level VI. When Static VI Reference outputs a strictly typed VI reference, the application reserves the referenced VI as long as the top-level VI is running. The application closes this reference when the top-level VI is no longer in memory. You do not have to explicitly close the reference this node returns.

    spd-note-note
    Note  

    The compiler does not check whether the referenced VI can compile. If the referenced VI is broken, the VI containing the Static VI Reference breaks due to an error in dependency. If you execute the Open VI Reference node that references the broken VI, you receive an error.

    If you want the compiler to check for a broken referenced VI before you run the top-level VI, use the referenced VI directly in the top-level VI instead of using Static VI Reference.

    Using Strictly Typed VI References with Run VI

    A strictly typed static VI reference also reserves any subVIs when a top-level VI is reserved, thus making it ineligible for Run VI if the reserved VI does not have a caller that is already running.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices

    Web Server: Not supported in VIs that run in a web application


    Recently Viewed Topics