Discover Hardware Devices

This example shows how to discover devices on your system.

Step 1. Discover hardware devices.

d  = daq.getDevices
d = 

Data acquisition devices:

index Vendor Device ID             Description             
----- ------ --------- ------------------------------------
1     ni     cDAQ1Mod1 National Instruments NI 9205
2     ni     cDAQ1Mod2 National Instruments NI 9263
3     ni     cDAQ1Mod3 National Instruments NI 9234
4     ni     cDAQ1Mod4 National Instruments NI 9201
5     ni     cDAQ1Mod5 National Instruments NI 9402
6     ni     cDAQ1Mod6 National Instruments NI 9213
7     ni     cDAQ1Mod7 National Instruments NI 9219
8     ni     cDAQ1Mod8 National Instruments NI 9265
9     ni     cDAQ2Mod1 National Instruments NI 9201
10    ni     Dev1      National Instruments USB-6211
11    ni     Dev2      National Instruments USB-6218
12    ni     Dev3      National Instruments USB-6255
13    ni     Dev4      National Instruments USB-6363
14    ni     Dev5      National Instruments PCIe-6363
15    ni     Dev6      National Instruments PCI-6023E
16    ni     Dev7      National Instruments PCI-MIO-16XE-10
17    ni     PXI1Slot2 National Instruments PXI-4461
18    ni     PXI1Slot3 National Instruments PXI-4461

Click the device ID for detailed device information.

Step 2. Get detailed device information.

d(12)
ans = 

ni: National Instruments USB-6255 (Device ID: 'Dev3')
   Analog input subsystem supports:
      7 ranges supported
      Rates from 0.1 to 1250000.0 scans/sec
      80 channels ('ai0' - 'ai79')
      'Voltage' measurement type
   
   Analog output subsystem supports:
      -5.0 to +5.0 Volts,-10 to +10 Volts ranges
      Rates from 0.1 to 2857142.9 scans/sec
      2 channels ('ao0','ao1')
      'Voltage' measurement type
   
   Digital subsystem supports:
      24 channels ('port0/line0' - 'port2/line7')
      'InputOnly','OutputOnly','Bidirectional' measurement types
   
   Counter input subsystem supports:
      Rates from 0.1 to 80000000.0 scans/sec
      2 channels ('ctr0','ctr1')
      'EdgeCount','PulseWidth','Frequency','Position' measurement types
   
   Counter output subsystem supports:
      Rates from 0.1 to 80000000.0 scans/sec
      2 channels ('ctr0','ctr1')
      'PulseGeneration' measurement type

Detailed device information includes:

  • Subsystem type

  • Rate

  • Number of available channels

  • Measurement type

Was this topic helpful?