Table Of Contents

VI Interop (G Dataflow)

Version:
    Last Modified: January 12, 2018

    Calls a VI sourced in the version of LabVIEW you specify and returns the output of the VI. To call the desired VI, specify the path to the VI on the Item tab. After you specify the path to the VI you want to call, the inputs and outputs of the source VI appear on this node.

    This node requires you to have LabVIEW 8.0 or later installed on the same computer as the VI you want to run.

    This node also supports calling VIs within stand-alone applications. If you configure this node to run a VI within a stand-alone application, you must enable VI Server access in the application. Also, you must run the application before using this node.

    When this node executes for the first time, it launches the specified version of LabVIEW and runs the specified VI in that version of LabVIEW. The launched LabVIEW application remains open even after this node finishes executing.

    spd-note-note
    Note  

    If the specified version of LabVIEW is open when the VI Interop node executes for the first time, the node fails to execute. Make sure the specified version of LabVIEW is closed before executing the node for the first time.

    connector_pane_image
    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    This node can return the following error codes.

    1650 LabVIEW.exe not found. Make sure the configured LabVIEW is present under Program Files/Program Files(x86)->National Instruments-><Specific LabVIEW version>->LabVIEW.exe.
    1651 Other instances of LabVIEW might be open and holding the network resources. Close all instances of the configured LabVIEW and try again.
    1652 The network connection was closed. This can happen if the LabVIEW process is killed manually or the firewall restricted/closed the network connection.
    1653 The configured VI is not found. Reconfigure the VI Interop node to point to proper location.
    1656 Connector pane of the configured VI has changed since VI Interop node was configured. Try reloading the caller VI.
    1673 The VI is not loaded in memory. To load the VI into memory on the server, manually open the VI or use Open VI Reference.
    1674 The peer closed the network connection. To configure access on the server side for the machine, navigate to Tools>>Options>>VI Server.
    spd-note-note
    Note  

    This is not a comprehensive list of errors this node can return.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Node Behavior When the Connector Pane of the Source VI Changes

    If you make changes to the connector pane of the source VI after setting the path for the VI Interop node, you must clear the VI Path and reconfigure the VI Interop node to call the updated VI. Otherwise, the VI Interop node does not register the changes to the specified VI.

    Automatic LabVIEW Version Selection

    When you specify a path to a VI, this node automatically sets the LabVIEW version to the version in which the VI is saved if that version is available. Otherwise, the node automatically sets the LabVIEW version to the nearest LabVIEW version available on the local computer.

    You can manually select a different available version of LabVIEW if you do not want to use the version that this node selects. However, this node may be unable to call the VI if you select a version that is older than the version in which the VI is saved.

    Calling a VI in a Stand-Alone Application

    To call a VI that is part of a stand-alone application, select VI Server application on the Item tab. You can connect to an application located on the same machine as LabVIEW NXG or on any machine whose name or IP address is known.

    The stand-alone application must meet the following requirements:

    • It must be an executable file.
    • It must be built in LabVIEW 8.0 or later.
    • It must include the VI you want to run.
    • It must have a VI Server connection enabled.

    Security Considerations Associated with VI Server

    The VI Interop node uses VI server capabilities in the background to connect to a stand-alone application residing on the local machine or a remote machine. Opening a VI Server connection opens TCP/IP ports, which makes the system on which LabVIEW is installed vulnerable to local or network processes. For stand-alone applications, consider limiting the list of IP addresses which can interact with your application and restricting VI Server to invoking only the VIs which you want to make available to LabVIEW NXG.

    Node Behavior When Calling a VI That Contains Type Definitions

    If the VI you call contains instances of a type definition, this node neither recognizes the type definition nor converts the type definition to a G Type. If the VI uses a type definition as an input or output, this node uses the same data type as the type definition. However, this node does not connect type-defined inputs or outputs to G Types. You can use the Code Conversion Utility to create a G Type document that replicates type definitions in your project.

    Unsupported LabVIEW Features and Behaviors

    The VI Interop node fails to execute and generates an error when attempting to call a VI under the following conditions:

    • The VI contains a channel input or output.
    • The VI contains a reference input or output.
    • The VI contains a class input or output.
    • The VI contains a variant input or output and you wire a variant containing unsupported data to that input or output.
    • The VI is an FPGA VI.
    • The VI is part of an LLB or packed library.
    • The LabVIEW version set on the VI Interop node is open when this node executes for the first time.

    Calling Code from Previous Versions of LabVIEW

    With the VI Interop node, you can use functionalities from previous versions of LabVIEW that do not currently exist in LabVIEW NXG.

    If you cannot replicate the functionality using LabVIEW NXG features, consider moving the functionality into a subVI in the original version of LabVIEW and use the VI Interop node to call the subVI from your LabVIEW NXG application.
    spd-note-note
    Note  

    Opening more than one version of LabVIEW using multiple VI Interop nodes in one project can slow down the run-time performance in the development environment.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported

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


    Recently Viewed Topics