Archived:Programmatically Determine NI DAQ Devices In My System with LabVIEW NXG

Updated Oct 20, 2022

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Environment

Software

  • LabVIEW NXG 1.0

Driver

  • NI-DAQmx

I want to use LabVIEW NXG to programmatically detect the NI DAQ devices and modules that are connected, present or installed in my system.

A list of all of the NI-DAQmx Devices in your system exists as a property under the NI-DAQmx System class. Specific information about these devices, such as device alias, product type, device serial number, etc. can be found within the properties of each individual NI-DAQmx device. Follow the instructions below to programmatically access information about the NI-DAQmx devices in your system:
 

To access the list of NI-DAQmx Devices listed under the NI-DAQmx System:
  1. Place a System Properties Node on the diagram, found in Hardware Interfaces » NI-DAQmx » Advanced » System Setup » System Properties.
  2. Select the Device Names property from the dropdown for the System Properties Node. This will provide you with an array containing all of the devices in the system.
To access a specific property on individual NI-DAQmx Devices (such as the Product Type):
  1. Create a For Loop to iterate through each device.
  2. Inside of the For Loop, place a Device Properties Node, found in Hardware Interfaces » NI-DAQmx » Advanced»IO Constants.
  3. Wire the indexed NI-DAQmx Device array element into the Active Device (abbreviated ActiveDev) write terminal for the Device Properties Node.
  4. Pull down on the bottom edge of the property node to add properties to the node, and select the property of interest (e.g. Product Type, Device Serial Number, Is Device Simulated) to be read for each device.

Additional Information

NI-DAQmx Device properties such as the Is Device Simulated property can be used to filter out undesired devices from the list, as shown in the example code above.