06-06-2013 08:21 AM
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
Solved! Go to Solution.
06-07-2013 05:12 PM - edited 06-07-2013 05:13 PM
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,
06-10-2013 06:56 AM
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