XNET ECU I/O Name
- Updated2023-09-14
- 5 minute(s) read
XNET ECU I/O Name
Each Electronic Control Unit (ECU) represents a single hardware product in the embedded system. The cluster contains one or more ECUs, all connected by a CAN, FlexRay, or LIN cable.
Use the XNET ECU I/O name to select an ECU, 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 ECU 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 ECUs 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 ECUs within the selected cluster, followed by a separator (line), then a list of menu items.
Each ECU in the drop-down list uses the syntax specified in String Use.
You can select an ECU 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 ECU I/O name provides 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 frame 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 ECUs.
- 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 an RT target).
String Use
Use the following syntax convention for the XNET ECU I/O name string:
<ecu>\n<dbSelection>
The string contains the ECU 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 <ecu> , 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 <ecu>. The space ( ), period (.), and other special characters are not supported within the ECU name. The <ecu> name must begin with a letter (uppercase or lowercase) or underscore, and not a number. The <ecu> name is limited to 128 characters. The ECU name is case sensitive.
For FIBEX ( .xml ), AUTOSAR ( .arxml ), LIN Description File ( .ldf ), and CANdb ( .dbc ) files, the database file stores the <ecu> name. ECU specifications are not provided within NI-CAN ( .ncd ) files.
The <dbSelection> is appended to the ECU name to ensure that the XNET ECU 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 ECU I/O name string as follows:
- Open Refnum : LabVIEW can open the XNET ECU 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 ECU I/O name refnum as follows:
- XNET ECU Property Node : The XNET ECU property node provides the list of all frames the ECU transmits and receives. When you are creating an application to test a single ECU product, these frame lists help you create sessions for input/output of all frames (or signals) to fully test the ECU behavior.