The System Management and Information (SMI) Library allows for programmatic retrieval of system configuration information for NI RIO hardware (CompactRIO, Single-Board RIO, myRIO, MXI-ExpressRIO, and EthernetRIO) and Real-Time CompactDAQ, as well as Real-Time PXI controller and chassis information. SMI is currently supported in LabVIEW 2014 and later versions.
The System Management and Information (SMI) library provides functions for the detection of network devices and the management of NI hardware on a network. Device detection and system configuration management is implemented by wrapping System Configuration (SysConfig) API calls, supplemented with NI RIO target-specific module detection code. For example, SMI network detection encapsulates the SysConfig "Find Hardware" to retrieve information about detected devices. By comparison, C series module detection in RIO chassis is done by deploying a target specific FPGA bitfile and performing an EEPROM memory query for stored module information.
C Series Module Detection
C Series module detection for RIO targets (example: cRIO) can be done either remotely over the network, or as part of a Real-Time application, if the target is in FPGA mode. In the case of remote module detection, NI-RIO, NI System Configuration, and NI-RIO IO Scan components must be installed on the RT target. Local module detection on an RT target requires that the components, as well as target specific FPGA bitfiles (for the RT target and expansion IO chassis) are installed on the target. The most convenient way to place necessary SMI dependencies (components and FPGA bitfiles) on an RT target is to install the "C Series Module Detection" user component (CDF file) on the target.
The C Series Module Detection component may be installed by using the "Custom software installation" option in NI MAX, or through programmatic use of the SysConfig API (Functions>>Measurement>>System Configuration>>Software Management>>Install.vi). Installing the C Series Module Detection component installs components (drivers) necessary to use SMI in either remote or local running RT applications.
In order for the C Series Module Detection component to appear in the LabVIEW Real-Time Software Wizard (NI MAX >> Target >> Software [right-click] >> Add/Remove Software) "Custom software installation" features list, the SMI installation will copy a folder containing the component to the User Components directory (C:\Program Files (x86)\National Instruments\RT Images\User Components). If a hardware target is not yet supported by SMI, developers can generate FPGA bitfiles by using an included module detection project, installed alongside SMI (<LabVIEW>\vi.lib\SMI\source\C Series module detection). No matter their source, any FPGA bitfiles or components required by SMI can be copied to the RT target filesystem as an alternative to installing the CDF. If copied manually, FPGA bitfiles should be copied into the following directories on the RT target (by OS):
Possible Additional Installation Steps
The User Components directory is a read-only directory, and some versions of the Windows OS will prevent VI Package Manager from copying files to this location during installation. If a user dialog message is displayed during installation of the SMI package stating that the component could not be copied to the intended system directory, the following (manual) steps will need to be taken to complete installation of SMI:
1. Navigate to the temporary CDF component installation location (<LabVIEW>\vi.lib\NI\SMI\cdf\C Series Module Detection).
2. Copy the C Series Module Detection folder(Ctrl-C).
3. Navigate to the User Components directory (C:\Program Files (x86)\National Instruments\RT Images\User Components)
4. Paste the C Series Module Detection folder inside of the User Components directory.
The NI-RIO device driver version will determine which NI hardware is supported for certain SMI features.
SMI palette examples demonstrate possible uses of the SMI library. SMI runs on both host PC (remote detection) or NI Linux Real-Time targets (target address = "localhost").
Note: Remote detection of C Series modules on NI RIO hardware will deploy an NI FPGA bitfile to the target, which can potentially interrupt a running system. It is recommended to verify the safe, non-operating state of any remote target before triggering any remote module detection.
SMI system information is retrieved by initializing a System Session for the intended target with valid NI Auth login credentials. Subsequent calls to SMI palette member VIs use the authenticated "controller" reference in order to interact with the device. After initialization, SMI library VIs can be used to retrieve device information, or as in the advanced example, use System Session or Hardware References to modify system parameter settings. Once an SMI library VI is executed, information gathered by that VI updates the "controller" object, and it can be read using property nodes without the need to re-run the library VI. Some SMI classes which include such accessor methods are: Controller, Chassis, Modules, etc. The "controller" object (containing the System Session and Hardware Reference) is closed at such time as the connection is no longer necessary.
Figure 1: system detection.vi (example) - get controller information VI must come before the get chassis information VI.
Figure 2: advanced system information.vi (example)
*note - required only for detection of RT application implementation of C series module detection on NI RIO hardware.
SMI is an open source project, and the source code is available in the SMI GitHub project (https://github.com/NISystemsEngineering/SystemManagementAndInformation). We encourage contributions to the SMI library from the LabVIEW user community by branching the code and submitting pull request to the trunk in GitHub.
Download and Installation
The SMI library is available for installation directly from VI Package Manager.