Hi,
Yes you are correct, the digitizer stores samples at a constant rate
until you kill the process with an abort or close. So long as you pull
data off as fast as it is going onto the card, then you can continue
indefinitely.
If you pull data off slower your memory will begin to fill up. You can
imagine holding a funnel under a tap. If you run the tap faster than
the water can escape out the bottom of the funnel, the water will fill
the funnel and overflow over the top. In this case your sample rate is
the tap, and the fetch size is the size of hole in the funnel. If the
digitzer fills up and overflows, an error will occur.
By keeping up I mean that the data must be pulled out as fast as it
goes in. So the read and write pointer will grow from 0 to the number
of samples you wish to fetch and jump back to zero when you fetch the
data and repeat.
Let's imagine the time period 0 - 2ms. We start the digitizer and it
will begin sampling at t=0s. We immediately call fetch with a fetch
block size of 5000 samples=500us of data. This is not yet available on
the card so we sit and wait. At t=500us the data is available for
fetch and retrieve it back to the PC. So now we have the samples for
now, the current time t=500us as the final point in the array, as well
as all the samples back to t=0. Then we loop back for another fetch.
By this point several microseconds have passed and the next 5000 points
will be ready for us by t=1ms. The data is not really lagging as you
have data for the current time, but you will not have seen the previous
500us of info until now.
It sounds like what you would like to see is a circular buffer so that
you see 0-499us, then 1-500us, 2-501us etc. It would be wasteful to
pull the data again if we already have it so you would basically throw
out sample 0 and grab sample 500, throw out sample 1 and grab sample
501 etc.
Unfortunately you cannot keep up with a sample rate of 10Ms/s while
pulling a single sample off the board at a time. You would be limited
by two factors. The first is that the fetch of a single sample might
take on the order of a couple hundred microseconds. So at the rate
that data is flowing in you will be filling up your digitizer. This
means the sample you pull in is no longer from the current time. It
also means the board will fill up and overflow.
It sounds like the overhead for your system is in fact around 400us minimum. I tried a PXIe-8130 for comparison. I see around 250us with this setup. I plotted fetch times on my system for your comparison:

The x-axis is actually samples, and the y axis is time in ms. Note the mutliple points for a fetch size of 5000. The top point of 0.5ms is when the data is not yet available and the fetch is waiting. The smaller fetchtime shows a backlog in data, where the data had already been available when the fetch was called, or soon after. This backlog occurred when I was fetching only 100 samples from the board
Perhaps you could provide more background details on the requirements of your system (Signal bandwidth, signal processing, is this for some type of PID control loop etc)? The forum community might have some more ideas on how you can achieve your goals. If not, try
Sales or Technical Support.
- Jennifer O.
Message Edited by Jennifer O on
06-17-2008 12:19 PM