Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any function in NI-DAQ to know the number of channels my card has, and the configuration they support?

I'm working on a data acquisition software that supports several devices from different vendors, so the type of national devices that should be all of them without writing code for every device. The NI-DAQ driver looks very generic, but I cannot find how I can know the number of channels my device has in run-time, and of course the possible configuration they can have. Is there anyway to do this? I can only find how to know the device that is connected, and don't think it will be the only info I can get about it.
0 Kudos
Message 1 of 6
(3,163 Views)
Ignacio,

When calling Get_DAQ_Device_Info we get most of the information for our board. For example: the base address, calibration status, counter type, serial number, device type code, DMA and Interrupt levels, etc.

At this moment we do not have any function that will let us know the number of channels of a certain device and the configuration mode supported by the board. So, this is the main reason why these features would have to be implemented by the programmer depending on the device code returned from the tables that this function calls (for more information see NI-DAQ help Init_DA_Boards).

Good luck with the project.
Message 2 of 6
(3,163 Views)

Has this situation changed at all since 2001? I couldn't see any relevant functions in the NIDAQmx C function documentation (cdaqmx.chm) - but then DAQmxGetDevProductType isn't listed there either (at least, it's not in the index or search).

It would also be useful to query other device capabilities, such as available voltage range (gain) settings.

I would like my software to know whether a device has at least n channels of analog input. I could construct my own table mapping device names to device characteristics, but this seems like a tedious exercise. The alternative is to attempt to create a task with n channels and catch the error. However, I'm not sure that technique would work with voltage ranges.

Any suggestions?

0 Kudos
Message 3 of 6
(2,869 Views)

You posted your question to an old thread about NI-DAQ and you want to know about DAQmx. They are completely different drivers and all of the information you want is in DAQmx and listed in the NI-DAQmx C Reference Help.

 

To get a list of devices, you use DAQmxGetSysDevNames. There are numerous device properties such as DAQmxGetDevAIVoltageRngs and DAQmxGetDevAIPhysicalChannels.

0 Kudos
Message 4 of 6
(2,858 Views)
That would explain it! Thank you, Dennis.
0 Kudos
Message 5 of 6
(2,852 Views)
Minor correction: it's DAQmxGetDevAIPhysicalChans (not DAQmxGetDevAIPhysicalChannels).
0 Kudos
Message 6 of 6
(2,834 Views)