Many FlexRay networks use the concept of a Protocol Data Unit (PDU) to implement configurations similar to CAN. The PDU is a container of signals. You can use a single PDU within multiple frames for faster timing. A single frame can contain multiple PDUs, each updated independently. For more information, refer to Protocol Data Units (PDUs) in NI-XNET.

Use the XNET PDU I/O name to select a PDU, access properties, and invoke methods. For general information about I/O names, such as when to use them, refer to XNET I/O Names.

User Interface

Before using the PDU I/O name, you must use Select Database to select a cluster within a known database. Because the NI-XNET hardware interface physically connects to a single cluster in your embedded system, it makes sense to limit the list to PDUs contained in a single cluster.

When you select the drop-down arrow on the right side of the I/O name, you see a list of all PDUs within the selected cluster, followed by a separator (line), then a list of menu items.

Each PDU in the drop-down list uses the syntax specified in String Use.

You can select a PDU from the drop-down list or by typing the name. As you type a name, LabVIEW selects the closest match from the list.

Right-clicking the I/O name displays a menu of LabVIEW items and items specific to NI-XNET.

The XNET PDU I/O name includes the following menu items in right-click and drop-down menus:

  • Select Database: In the drop-down list, this menu item opens a dialog to select a cluster. In the right-click menu, this item provides a pull-right menu to select the cluster.You must select a cluster to specify the PDU selection scope. The list of clusters uses the same list as the XNET Cluster I/O name. Each cluster name typically is just the database <alias> only, but when a FIBEX file is used, each <alias>.<cluster> name is listed.
  • Browse For Database File: If you have an existing CANdb ( .dbc ), FIBEX ( .xml ), AUTOSAR ( .arxml ), LIN Description File ( .ldf ), or NI-CAN ( .ncd ) database file, select this item to add an alias to NI-XNET. Use the file dialog to browse to the database file on your system. When you select OK, NI-XNET adds an alias to the file. The alias uses the filename, such as MyDatabase for a file path of C:\Embedded\Vehicle5\MyDatabase.dbc. If the alias is not unique, NI-XNET appends a number per LabVIEW conventions (for example, MyDatabase 2 ). After adding the alias, you can select the objects in that database from any NI-XNET I/O name.After adding the alias, it appears in the Select Database list, and the first cluster in the database is selected automatically.
  • New XNET Database: If you do not have an existing database file, select this item to launch the NI-XNET Database Editor. You can use the NI-XNET Database Editor to create objects for the database and then save to a file. When you save the file, the NI-XNET Database Editor also adds an alias. Therefore, after you save from the editor, the clusters in the database become available in the Select Database list. You must select the desired cluster when you finish using the NI-XNET Database Editor.
  • Edit XNET Database: If you have selected a cluster using Select Database, select this item to launch the NI-XNET Database Editor with that cluster's database file. You can use the editor to make changes to the database file, including the signals.
  • Manage Database Aliases: Select this menu item to open a dialog to manage aliases. You can review your list of aliases and associated file paths, remove an alias (without deleting the file), and add new aliases.If you are using LabVIEW Real-Time (RT), you can right-click the RT target within a LabVIEW Project and select the Connect menu item. 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. If you open the Manage dialog while connected to an RT target, the dialog provides features to review the list of databases on the RT target, deploy a new database from Windows to the RT target, and undeploy a database (remove the alias and file from the RT target).

String Use

Use the following syntax convention for the XNET PDU I/O name string:

<pdu>\n<dbSelection>

The string contains the PDU name, followed by a new line ( \n ) as a separator, followed by the selected cluster name.

When you drop the I/O name onto your front panel, the control displays only one line by default. This enables the VI end user to focus on selecting the <pdu>, rather than the more complex syntax that includes <dbSelection>.

Lowercase letters (a–z), uppercase letters (A–Z), numbers, and the underscore (_) are valid characters for <pdu>. The space ( ), period (.), and other special characters are not supported within the <pdu> name. The <pdu> name must begin with a letter (uppercase or lowercase) or underscore, and not a number. The <pdu> name is limited to 128 characters. The PDU name is case sensitive.

For all supported database formats, the database file stores the <pdu> name.

The <dbSelection> is appended to the PDU name to ensure that the XNET PDU I/O name is unique. LabVIEW requires each I/O name to use a unique name, because each instance is located using its name. By appending the cluster name, NI-XNET ensures that the entire name is unique in large applications that use multiple NI-XNET interfaces (multiple clusters). The characters for <dbSelection> are the same as the name you selected using Select Database, which uses the same syntax convention as the XNET Cluster I/O name. To view the <dbSelection> when the I/O name is displayed, resize its constant/control to show multiple lines.

You can use the XNET PDU I/O name string as follows:

  • XNET Create Session (Frame In PDU Queued, Frame In PDU Single-Point, Frame Out PDU Queued, Frame Out PDU Single-Point, Generic) VI: These modes operate on PDUs in a manner equivalent to frames. The queued I/O sessions transfer a sequence of values for a single PDU in the cluster. The single-point I/O sessions transfer the recent value for a list of PDUs. The Generic instance provides advanced features to pass in database object names as strings, including one or more PDUs. For all instances, the XNET PDU I/O name is passed in as input, but is used as a string. Within Create Session, NI-XNET opens the database file, reads information for the PDUs, and closes the database.
  • Open Refnum: LabVIEW can open the XNET PDU I/O name automatically. Wire the I/O name to a property node or VI, and the refnum is opened prior to the first use.

Refnum Use

You can use the XNET PDU I/O name refnum as follows:

  • XNET PDU Property Node: The PDU property node provides information such as the PDU position and size in the frame, contained signals, and so on.