System Configuration API
- Updated2025-10-10
- 3 minute(s) read
NI-XNET supports the NI System Configuration API, which provides programmatic access to many operations in NI MAX. This enables you to perform these operations within your application. The NI System Configuration API uses product experts to gather information about devices on local and remote systems. You can create a filter to gather information for a single type of product, such as filtering for NI-XNET devices only. The NI-XNET expert programmatic name is xnet.
Although XNET System API property nodes (XNET System Node, XNET Device Node, and XNET Interface Node) are provided for compatibility with previous versions of NI-XNET, the NI System Configuration API is recommended for its several advantages:
- Discovery and configuration of all NI hardware products, not just XNET hardware
- Consistency with features available in NI MAX
- Ability to save configuration changes for use in multiple LabVIEW applications
- Remote discovery and configuration for LabVIEW Real-Time (RT) targets
When you physically connect an NI-XNET interface to your network, some properties must be configured to enable communication. Some of these properties, such as an Ethernet PHY state or CAN termination, are specific to your interface but are not necessarily maintained in or provided by a database. These properties can be written using the NI System Configuration API rather than an NI-XNET session.
When you write a property using the NI System Configuration API, you must invoke the Save Changes VI in order for the change to take effect. (See Save Changes (VI) in the NI System Configuration API Help.)
The NI-XNET expert returns a flat list of "hardware resources" to System Configuration API for each NI-XNET device (i.e., hardware model) and NI-XNET interface (e.g., port) that is connected to the system. Use the following properties in System Configuration API to convert the resource list into the typical hierarchy displayed in NI MAX.
- Device: IsDevice=T, Devices&Chassis:ProvidesLinkName=<unique-device-name>
- Interface: IsDevice=F, Device&Chassis:ConnectsToLinkName=<unique-device-name>, ExpertInfo:UserAlias=<XNET Interface>
For example, a single, 2-port USB-8506 on Windows returns three hardware resources:
- Device: ProvidesLinkName="NI USB-8506(SerialNumber01BE2C4C)"
- Interface (Port 1): ConnectsToLinkName="NI USB-8506(SerialNumber01BE2C4C)" and UserAlias="LIN1"
- Interface (Port 2): ConnectsToLinkName="NI USB-8506(SerialNumber01BE2C4C)" and UserAlias="LIN2"
In the NI System Configuration API, for an interface (IsDevice=F), the NI-XNET expert returns the UserAlias using the value of the XNET interface name. Therefore, you can use the UserAlias for the interface input to XNET Create Session.
The System Configuration API includes the following hardware properties under the category "XNET":
- Device > Number of Ports
- Interface > Blink
- Interface > Port Number
- Interface > Protocol
- Interface > CAN > Transceiver Capability
- Interface > CAN > Termination Capability
- Interface > Dongle > Dongle ID
- Interface > Dongle > Dongle State
- Interface > Ethernet > PHY State Configured
- Interface > Ethernet > Port Mode
- Interface > Ethernet > Link Speed
- Interface > Ethernet > Link Speed Configured
- Interface > Ethernet > Interrupt Moderation
- Interface > Ethernet > Jumbo Frames
- Interface > Ethernet > Sleep Capability Configured
- Interface > Ethernet > Sleep Capability
- Interface > Ethernet > PHY Power Mode
- Interface > Ethernet > MAC Address
- Interface > Ethernet > IP4Address
- Interface > Ethernet > OS Network Adapter Name
- Interface > Ethernet > OS Network Adapter Description