Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Smooth analogue acquisition with DAQPad 6016?

Hi there, I am starting to use the DAQPad 6016 USB device for analogue data acquisition with my application using NIDAQmx. The problem I have is that the NIDAQmx driver doesn't supply data in a smooth fashion. I am capturing all 16 channels at 500Hz sampling rate, and I'm checking the capture progress every 50ms using the DAQmxGetReadAvailSampPerChan function. The idea is to grab data from the acquisition process every 100ms for display/analysis etc. This code works perfectly with a PCI6023E card.

However, with the DAQPad 6016, the DAQmxGetReadAvailSampPerChan function (and also DAQmxReadRaw) doesn't make data available in a smooth fashion - eg. there'll be no data available for 200ms, then some will be available in a short burst, then nothing again for a while etc. Data update is therefore not very smooth.

I suspect this has something to do with the onboard fifo buffer of the DAQPad, but using the m_pfDAQmxSetAIDataXferReqCond with either DAQmx_Val_OnBrdMemNotEmpty or DAQmx_Val_OnBrdMemMoreThanHalfFull options doesn't make any difference to the way in which data is provided to my app. The NI-DAQmx C reference documentation shows a DAQmx_Val_OnbrdMemCustomThreshold, but this value isn't defined in the nidaqmx.h file.

My question therefore is; How do I acquire and display data with a DAQPad 6016 in a smooth fashion? Is it possible to set a custom fifo transfer threshold value with the DAQPad 6016, and if so how?

Message Edited by saint on 06-23-2005 02:37 AM

0 Kudos
Message 1 of 2
(3,222 Views)

Hello.

I have the same sort of issue concerning this transfer between USB DAQPad 6016 and my app. I work in Labview 7.1, and acquire 16 channels using an external clock (with a variable rate from 10 to 1000 Hz). It seems that there is a "minimum block size" to initiate a transfer from the internal buffer (ie on the pPad) and the buffer allocated by NIDAQmx. Apparently, this size depends on the sample rate selected with the DAQmx_Timing (Sample Clock).VI 

For example:

  •  a sample rate of 1000 Hz gives a block size of 128 bytes
  • 100 Hz gives 32 bytes
  • and 10 Hz gives a byte by byte transfer
To sum up, when the external clock is near its maximum value (=sample rate), the smoothness is OK, but when it reaches a much slower frequency, this minimum block size prevents from getting data in a fluent way.
 
Thank you for your help.
0 Kudos
Message 2 of 2
(3,127 Views)