Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

DSA data acquisition maxing out processor

Solved!
Go to solution

I am developing an application on a PXI-8196 controller (running Windows XP) that uses a PXI-4472 DSA card to read a single microphone input and perform FFT analysis of the signal. I need to resolve frequencies of 36kHz (and possibly higher), so I planned on sampling at 96 kS/s. I wrote a simple DAQ loop, using the NI44xx DAQ configuration/read VIs to read the single channel at that rate, but when I run it, it immediately pegs my processor usage to 100%. So far, I haven't had any issues with missing samples or system crashes, but I am somewhat concerned that the DAQ alone is utilizing all my processor time. Are there any tricks that I can implement to reduce the CPU overhead?

 

I have tried varying the samples per channel setting--with buffer sizes ranging from 1000 to 48000 samples--but I don't seem to have any luck reducing CPU usage. Changing the sampling rate does affect the processor usage (down to ~40% at 48 kS/s; ~75% at 72 kS/s), though. According to this KB: http://digital.ni.com/public.nsf/allkb/D9DDF9FA02D1C18A86256EBC0016C93D

 

"A PXI-8176 embedded controller can continuously compute FFT power spectra on 8 PXI-4472 channels running at 102.4 kS/s,"

 

so I would think with my 8196 I should have no problems at all reading just one channel at 96 kS/s.

 

Does anyone have any suggestions to reduce my CPU overhead? Thanks!

0 Kudos
Message 1 of 4
(7,289 Views)
Solution
Accepted by topic author TurboPhil

Here's a link to some good information about how NI-DAQmx 7.4 and later behaves with respect to CPU usage:  Default CPU Usage With NI-DAQmx Version 7.4

 

 

Message 2 of 4
(7,287 Views)

Thanks for the tip, Alan!

 

Switching to Read All Available Samples mode (with the DAQmx AI Read call inside a Timed Loop), I was able to drop down to ~30% CPU usage will acquiring at 96 kS/s. There is still a slight dither in the number of samples it reads from one iteration to the next, so I'll try playing around with the different DAQmx wait and sleep modes to determine which is most deterministic for my application.

0 Kudos
Message 3 of 4
(7,282 Views)
No problem, glad I could help.  Good luck with your app!
0 Kudos
Message 4 of 4
(7,280 Views)