Interface I/O Name

The interface represents a single communication connector (port) on the device. The interface I/O name is used to select an interface to pass to Create Session and to read hardware information properties.

User Interface

To display a list of all interfaces available in your system, select the drop-down arrow on the right side of the I/O name . You can select an interface from the drop-down list or by typing the name. As you type a name, LabVIEW selects the closest match from the list.

You can type the name of an interface that does not exist in your system. For example, you can type 4 even if only 1 and 2 exist in your system. The check for an actual 4 interface does not occur until it is used at run time (for example, within a session).

If you are using LabVIEW Real-Time (RT), you can right-click the RT target within LabVIEW project and select Connect. This connects to the RT target over TCP/IP, which in turn enables the user interface of NI-XNET I/O names to operate remotely. The interface drop down list shows (target disconnected) until you connect the RT target. When the RT target is connected, the drop-down list shows all interfaces on that RT target (for example, a PXI chassis).

When you right-click the I/O name, the menu contains LabVIEW items including I/O Name Filtering. Use this menu item to filter the interface names shown in the I/O name. You can show all interfaces or filter to a specific protocol. The selected filtering is saved along with the VI that uses the I/O name.

I/O Name Filtering is available at edit-time only, before you run your VI. This is done under the assumption that if you filter for a specific protocol, the code in the VI block diagram works with that protocol only. Therefore, you do not want to allow the VI end users to select a different protocol at runtime.

String Use

Use the following syntax for the string in the Interface I/O name:

protocoln

  • For devices, protocol is . The protocol name is not case-sensitive.
  • n is a one-indexed number that identifies the specific interface within the scope of the protocol. For example, if you have a two-port device in your system, the interface names are protocol1 and protocol2.

Although you can change the interface number n within NI configuration software, NI recommends allowing to select the number automatically. always starts at one and increments for each new interface found. If you do not change the number, you can write applications that are always based around those numbers as long as the system includes those ports.

You can use the Interface I/O name string in Create Session. All instances of Create Session use Interface I/O name to specify the interface for the I/O of the session. Within Create Session, opens the interface and configures the hardware for the session's I/O communication.

Refnum Use

The Interface refnum is always opened and closed automatically. When you wire the I/O name to one of the following nodes, LabVIEW opens a refnum for the interface. The refnum is closed automatically when it is no longer used. The Interface refnum features are meant for hardware information and identification prior to using the interface within a session. You can use the Interface I/O name refnum as follows:

  • XNET Interface property node: Provides information for the hardware, such as the port number next to the connector.
  • Blink: If no session is in use for the interface, you can use this VI to identify a specific interface within a large system (for example, a chassis with multiple devices).

Interface I/O Names and Databases

Note Not all protocols support databases.

Within , the interface is the object used to communicate with external hardware described in the database. When you create an session, you specify a physical and logical connection between the NI interface and a cluster. Because the cluster represents a single physical cable harness, it does not make sense to have the NI interface connected to multiple clusters simultaneously.