|Download Help (Windows Only)|
To communicate with hardware products on the external CAN/FlexRay/LIN network, NI-XNET applications must understand how that hardware communicates in the actual embedded system, such as the vehicle. This embedded communication is described within a standardized file, such as CANdb (.dbc) or NI-CAN (.ncd) for CAN, FIBEX (.xml), or AUTOSAR (.arxml). Within NI-XNET, this file is referred to as a database. The database contains many object classes, each of which describes a distinct entity in the embedded system.
Use the XNET Database I/O name to select a database, access properties, and invoke methods (for example, save). For general information about I/O names, such as when to use them, refer to NI-XNET I/O names.
When using a database file with NI-XNET, you can specify the file path or specify an alias to the file. The alias provides a shorter, easier-to-read name for use within your application. For example, for the file path C:\Documents and Settings\All Users\Documents\Vehicle5\MyDatabase.dbc, you can add an alias named MyDatabase. In addition to improving readability, the alias concept isolates your LabVIEW application from the specific filepath. For example, if your application uses the alias MyDatabase, and you change its file path to C:\Embedded\Vehicle5\MyDatabase.dbc, your LabVIEW application continues to run without change. The alias concept is used in most NI-XNET features, including deployment of database files to LabVIEW Real-Time targets. For more information about aliases, refer to What Is an Alias?.
When you select the drop-down arrow on the right side of the I/O name, you see a list of all database aliases known to NI-XNET, followed by a separator (line), then a list of menu items. If you have not added an alias, the first list is empty.
You can select an alias 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 Database I/O name provides the following menu items in right-click and drop-down menus:
Use one of two syntax conventions for the XNET Database I/O name string:
The <alias> is the database file short name, used as an alias to the complete filepath. This syntax is the only option available when you select a database from the drop-down list or use the menu items.
Lowercase letters (a–z), uppercase letters (A–Z), numbers, underscore (_), and space ( ) are valid characters for <alias>. Period (.) and other special characters are not supported within the <alias> name. Because the <alias> is used as the filename portion of an internal filepath (that is, absolute path and file extension removed), it must use the minimum file conventions for all operating systems. The alias name is not case sensitive.
The <filepath> is the absolute path to the text database file, using the operating system file conventions (such as C:\Embedded\Vehicle5\MyDatabase.dbc). You can use the <filepath> syntax to open the database directly, without adding an alias to NI-XNET.
Valid characters for <filepath> include any characters your operating system supports for an absolute file path. Relative file paths are not supported. Because special characters typically are required in an absolute filepath (such as \ or :), NI-XNET uses these characters to distinguish the <alias> syntax from <filepath> syntax.
You can use the XNET Database I/O name string as follows:
You can use the XNET Database I/O name refnum as follows: