Programmatically Determining the Serial Number of an NI Power Supply or SMU

Updated Sep 27, 2023

Reported In

Hardware

  • PXIe-4139
  • PXIe-4141
  • PXIe-4144
  • PXIe-4145
  • PXIe-4140
  • PXIe-4142
  • PXIe-4138
  • PXIe-4112
  • PXIe-4113
  • Power Supply

Software

  • LabVIEW

Issue Details

I have a National Instruments Power Supply and would like to programmatically determine its serial number. I don't see anything in the NI-DCPower palette that would allow me to do this.

Solution

You can use NI System Configuration API to find the device name and then query its serial number.
The example code for this can be found by navigating to NI Example Finder >> Hardware Input and Output >> System Configuration >> Show All Hardware.vi 
This method can be used for any NI hardware that can be located using NI MAX.

Additional Information

The NI System Configuration API provides a common programmatic interface for users to find and configure devices/remote systems. The API serves as a programmatic mechanism to do most of the things are done in NI MAX.

If you are distinguishing between more than one of the same device, you can use a hardware property node to compare the device's serial number to select the correct device. If only one device is present but several are listed in NI MAX, you can use the "Is Present" method from a hardware property node or error validation.