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:
- Place a System Properties Node on the diagram, found in Hardware Interfaces » NI-DAQmx » Advanced » System Setup » System Properties.
- 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):
- Create a For Loop to iterate through each device.
- Inside of the For Loop, place a Device Properties Node, found in Hardware Interfaces » NI-DAQmx » Advanced»IO Constants.
- Wire the indexed NI-DAQmx Device array element into the Active Device (abbreviated ActiveDev) write terminal for the Device Properties Node.
- 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.