Hi Sven,

That's interesting.  You might have to do a little more investigating
to determine why the counters seem to start prematurely (or why the
analog in is not reporting the scan backlog correctly).  Are you using
the startscan (scan clock) signal as the source of your counters?
This signal will pulse as many times as you sample.

One test you can perform is a finite acquisition with a specific
number of samples.  Your counter should count that exact number of
samples.  If the counter does in fact count the exact number of
samples then we know your problem will be in monitoring the scan
backlog of the analog input.

Another thing that could contribute to the difference between the two
backlog numbers is the fact that the analog input will store a certain
number of samples in the onboard memory and then transfer them once
the DMA FIFO is full.  For the 16E-4 card, this FIFO size is 512
samples.  This means that the card can accumulate up to 512 samples
and then scan backlog would read 0.  This is because the scan backlog
monitors the samples on the PC buffer that you configured.  The FIFO
doesn't count in that scan backlog number.  Only after samples have
been transferred from the FIFO (MIO card memory) to the PC buffer
(memory you declared in your program) will you see a correlation.

Another way to easily monitor this is to use Interrupts as your
transfer method instead of DMA.  Interrupts will transfer each sample
as it is acquired so your PC buffer will always be current (or off by
no more than 1 sample).  You can change this by using the Set DAQ
Device Info function.

Anyway, hope that clears things up.  Have a good day.

Ron

Reply via email to