Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the DAQmxBase Analog 2D DBL NChan NSamp VI work?

Stefano-

E Series cards use a convert rate calculated in a somewhat complicated manner by the DAQmx Base driver.  I devised the formula by looking through several levels of the DAQmx Base VIs (which remain completely open-source, so you're free to do the same).

The quickest way to determine the convert rate (and therefore any interchannel delay) is to open the VI "DAQmx Base Check AI Timing Parameters" located in the "\National Instruments\LabVIEW 7.1\vi.lib\_DAQmxBase\Internals\ESeries\TimingUtilities" folder of your drive and view its front panel during operation.  The parameters "Scan Rate (Hz)" and "Convert Rate (Hz)" indicate the rate of channel scan cycles and actual channel conversions during one cycle.  The inverse of Convert Rate is then the interchannel delay.

In order to remove interchannel delay you would need to use simultaneous sampling with an S Series card.  I assume this is what you meant by "fastest" DAQ card on the market.  All S Series cards operate only using a Scan Clock because no Convert Clock is necessary due to the fact that each channel has its own ADC.  This means there will be zero interchannel delay during scanning and all samples will be truly simultaneously sampled. 

I hope this helps!

Thanks-

Tom W
National Instruments
0 Kudos
Message 11 of 15
(1,490 Views)
So if my "DAQmx Base Check AI Timing Parameters" VI says that I have a scan rate of 180180 Hz and a convert rate of 363636, then there is a delay of 1/363636 seconds between each CH1 sample and the corresponding CH2 sample?

Thanks, just trying to make sure I'm clear on everything...
-Stefano
0 Kudos
Message 12 of 15
(1,483 Views)

Hi Stefano-

Yes, the reciprocal of the Convert Rate is the interchannel delay.  This delay is present between all samples in one cycle of scanning. 

So, to reiterate, the Scan Clock initiates one scan of a channel list (i.e. all of the channels in the task).  The Convert Clock then actually samples each channel.  The interchannel delay is the amount of time between Convert Clock pulses (i.e. the amount of time between samples of consecutive channels in the task). 

I hope this helps-

Tom W
National Instruments
0 Kudos
Message 13 of 15
(1,471 Views)
I am getting the same error using DAQmx base for Linux.

"DAQmxBase Error: RLP Invoke Node <err>The DMA <b>buffer overflowed</b> because data was not read from the buffer as fast as the DMA channel wrote to the buffer."

I am not using VI's, I am using the DAQmx base C API.

I get this error on my PCI-6143 cards when sampling all 8 analog inputs at full speed (250000 S/sec).
I do not get this error when sampling only 4 channels or when I reduce the sampling speed.

My code looks like this:
DAQmxBaseCreateTask
DAQmxBaseCreateAIVoltageChan
DAQmxBaseCfgSampClkTiming
loop for some predefined amount of time {
   DAQmxBaseReadAnalogF64
   process data
}
DAQmxBaseStopTask

Any suggestions?  I would really like to be able to sample at full speed.
-Mike

0 Kudos
Message 14 of 15
(1,452 Views)

Hi Mike-

My best suggestion is to call the DAQmxBaseStartTask before entering your read loop.  Without explicitly starting the task before the loop the DAQmxBase read commands are forced to start and stop the task each time.  This can decrease performance significantly.

For a good illustration of the structure needed for finite analog input operations I would suggest viewing the example "acquireNScans.c" that installs in /usr/local/natinst/examples/ai" with the NI-DAQmx Base driver.

Thanks-

Message Edited by Tom W. on 08-11-2005 11:09 AM

Tom W
National Instruments
0 Kudos
Message 15 of 15
(1,438 Views)