LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQmx 8.3 and CPU usage

I have similar problem as described on page http://forums.ni.com/ni/board/message?board.id=250&message.id=23831
but have solution and some reflections.
first of all, about system
system use 2x PCI-6143 and take data from 16 channels with maximum rate (250 kS/s)
program was created about year ago (with LV 7.1.1, DAQmx 7.4) and on PC with PIV (3.2 GHz) processor and 1 Gb of RAM work properly (CPU usage less 30%).
Now I've recompile program with LV8.2 and update drivers to DAQmx 8.3. now program can't work properly because CPU usage 100%

I create test VI for research this problem.
First version (daq_test1) - simple code - configure daqtask and get data.
I found:
if sample rate less or equal 90 kS/s (on PCI-6143) CPU usage less 5%, but when rate more 95 kS/s CPU usage jump to 60% (for one or more channels on one or two devises).
Then I create simulated devise PCI-6143 in MAX and the same vi (daq_test1) require not more than 5-10% of CPU.
also I have examine devise 16E-4 and find the same problem: if samle rate more than "boundary" rate, CPU usage is too much (50-70%).

Then I add configure parameters (daq_test2) - add manualy DMA "on". There are no effects (CPU usage jump to 60% on "fast" rates)

Then I  "play" with WaitMode (daq_test3). There are no effects (even if WaitMode=Sleep and SleepTime>1s CPU usage about 60%)

Finally I create vi (daq_test4), where "manually" check AvailableSamplesPerChannel and call DAQmx Read only when bufer has more samples, that I need.

So I'd wound solution, but think driver MUST check available samples carefully (also, why DAQmx 7.4 can fast scan, but  DAQmx 8.3 can't do it at least the same way as previous version).

0 Kudos
Message 1 of 3
(2,305 Views)
sorry.
I've transmit this message to Multifunction DAQ board
0 Kudos
Message 2 of 3
(2,299 Views)
Artem,

Thank you for contacting National Instruments support.  This is expected behavior. When the wait mode is set to Sleep, DAQmx will only sleep if and only if there is no data available to process. So, for example,  at 200 kS/s, data is filling up the buffer fairly quickly and should always be available to read, which means that the process will not sleep at all. When data is always available, the CPU is going to handle it as quickly as possible and thus the CPU will appear to be running at near 100%.

Specifying a wait mode of Sleep is really only beneficial when the acquisition is running slowly enough that a lot of time is spent in DAQmx Read waiting for the data to arrive. In the past, the CPu was maxed out even at extremely slow sampling rates.  Sleep mode alleviates this problem by putting the process to sleep when no data is ready for processing; however, if data is available, it will be handled immediately and no sleeping will occur. If data is constantly available for processing, the CPU is expected to deal with it right away and the usage will appear to be high.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 3 of 3
(2,272 Views)