From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to list devices available ?

Hello all,
 
I am new on the NI forum and I recently followed Labview training (Basic 1 & 2).
I would like to know how to get the list of available devices and the type of them.
Ideally I would like to have an array of that form :
 
Device Name          Device Type
Dev1                       NI PCI 4472
Dev2                       NI PCI 6731
.....                          ....
 
Is there a way to do that with Labview ?
Thank you for your help.
 
Regards,
Olivier Schevin
0 Kudos
Message 1 of 6
(2,719 Views)
Look at the following simple Vi.  It took less than a minute to make but uses DaqMx to return an array of clusters with the info you should need.
 
Paul
 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 6
(2,703 Views)
The example uses Labview 7.0 and DaqMx version 7.3
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 6
(2,702 Views)
In Classic NI-DAQ, you simply use NI MEASUREMENTS | DATA ACQ | CAL & CONFIGURATION | GET DAQ DEVICE INFORMATION.vi.

In a loop, feed it a 1-6, and get the DEVICE NAME and DEVICE TYPE CODE and whatever else you want out of it.


For DAQ-MX, use a NI MEASUREMENTS | DAQmx DATA ACQ | DAQmx ADVANCED | DAQmx SYSTEM SETUP | DAQmx DEVICE PROPERTY NODE

In a loop, feed it a "Dev1" - "Dev6" string as the ACTIVE DEVICE, then read out the PRODUCT TYPE, SERIAL NUM and IS SIMULATED.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 6
(2,701 Views)
I use the node:

Device Names Property

Short Name: DevNames

Property of DAQmx System

Indicates an array that contains the names of all devices installed in the system.

This returns all device names without making an assumption about naming conventions such as Dev1 to Dev6. daqMx allows for naming the device with meaningful names through MAX.  I would encourage using daqMx, I found it a large learning curve over traditional DAQ but was well worth the time.  I would also assume with DaqMx there will be a phase out of coding using traditional drivers over the next several years (I could be wrong about this) .

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 6
(2,692 Views)

Thanks for your help everybody !

Regards,

Olivier

0 Kudos
Message 6 of 6
(2,671 Views)