Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Enumerate NI devices and get device information C / C++

Solved!
Go to solution

Hi,

 

I'm using Using NI_DAQmx.  How do I find and enumerate NI devices and get information for each enumerated device in C / C++?

I'm trying to set up dynamic configuration for accessing the NI hardware on our system.

I need to get the logical device names, e.g. "Dev1", and then find out what NI device, e.g. NI 6008, is associated with each device name.

 

Thanks.

 

- Neil Shore

 

0 Kudos
Message 1 of 3
(4,617 Views)
Solution
Accepted by topic author LaserShore

If you just need to read back the device information then you can use DAQmx properties to achieve what you need:

 

To get the names of all devices in your system:

DAQmxGetSysDevNames

 

To get the product number of a given device (each product has a unique product number as per the DAQmx C Reference Help, e.g. the USB-6008 is 0x717A):

DAQmxGetDevProductNum

 

 

If you need to actually set the device names or whatnot, then you'd have to look into the System Configuration API.  I've never actually used this outside of LabVIEW, but the readme indicates it has CVI support so you might be able to get it to work.

 

 

Best Regards,

John Passiak
Message 2 of 3
(4,606 Views)

Hi John,

 

Thanks for your reply.  I found the functions you mentioned, which are very poorly documented in NI-DAQ™mx C Reference Help.  Tried them out and I'm using them.  I also found the function DAQmxGetDevProductType which gets a string name for the device.  I'm using that as well.

 

Thank you again

 

- Neil shore

0 Kudos
Message 3 of 3
(4,590 Views)