Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxReadAnalogF64 function slow

Solved!
Go to solution

I am using the DAQmxReadAnalogF64() to read 4 channels from a cDAQ9219 module in a cDAQ9184 chassis but the call toDAQmxReadAnalogF64() takes approximately 1.7 seconds. I do not start the task beforehand and I understand that there are performance issues doing it this way but surely it should not take this long. I have tried calling DAQmxStartTask() but this did not appear to improve the situation. I have also tried the same code reading 16 thermocouples from a cDAQ9213 module and it takes even longer (about 3.5 seconds).

 

The same function appears to be much faster on my PCI6220 card.

 

I was hoping to take a reading every 0.25 seconds but am I being too optimistic?

0 Kudos
Message 1 of 3
(2,372 Views)
Solution
Accepted by topic author Tony_Dean

The NI 9219 defaults to "High Resolution" timing mode. See this KB: How Can I Sample at More Than 2 Hz with My NI 9219?

——
Brandon Streiff
ni.com/compactdaq · ni.com/daq
0 Kudos
Message 2 of 3
(2,348 Views)

Thanks for the reply - this was very nearly the answer to my problem. The speed settings referred to in the link you provided appear to be applicable to the global virtual channels and not when using NI-DAQmx 'C' library functions. I could not find any setting in MAX that could be applied direct to the module. However, armed with the knowledge that the timing mode was adjustable on these modules, I found the corresponding NI-DAQmx function: DAQmxSetAIADCTimingMode() which has solved the problem.

 

Thanks for your help.

 

 

0 Kudos
Message 3 of 3
(2,330 Views)