Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I missing the first sample with an E-series DAQ?

I am continuously acquiring a repetitive waveform. I generate an external, gated channel clock, which acquires about 50% of the waveform. I initially trigger the acquisition to be sure the first sample of the first waveform is always in the same location. About 50% of the time I miss the first sample. It acts like there needs to be a convert clock before the trigger, and if there isn't, it eats my first convert clock (sample). Any suggestions?
0 Kudos
Message 1 of 4
(2,927 Views)
Hi Barryb,

This is probably due to the phase difference between the external
trigger, production of new data and the external clock. If all of
these are phase-locked then you will get predictable results 100% of
the time. Since you are sometimes missing the first data point and
sometimes getting the first data point, it is morelikely due to the
fact that your trigger is not synchronized with the production of
data. What I mean by this is that it could be that data is produced
and then right before new data is produced you receive your trigger.
This could cause you to miss that data point.

A similar case to this one is how the DAQ circuitry handles the
trigger. There are usually small propagation delays within the
circuitry that reference the trigger to the
channel clock. This delay
will be consistent though.

One solution to phase-lock the trigger to the channel clock is to use
a counter configured in retriggerable pulse train generation. The
source of the counter will be your channel clock and the gate of the
counter will be your trigger signal. The output of the counter will
be routed as the analog input trigger. This output is always in phase
with the source (channel clock) which means you will have locked the
channel clock and the trigger. This implies that you should always
get the first datapoint (or always miss the first data point).
However, it should be consistent at this point.

Anyway, I hope that helps. Have a good day.

Ron
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(2,927 Views)
Ron,

Thanks for your response. Actually, the trigger and convert clock is
generated externally by a 40 MHZ FPGA and are very accurately phase
locked. I have verified on an oscilloscope that they are not jumping
around.

I'm acquiring a repetitive waveform so I have a trigger and then,
after about 10us, a train of ~ 1000 convert clocks to acquire the
waveform. After a delay the sequence starts again. I'm acquiring
continuously because I can't afford to miss waveforms so, after the
initial trigger, the trigger is ignored. I then rely on the fact that
I know how many samples are in each waveform to display and save the
data to a file.

I believe the problem happens when the Labview software initially
enables the DAQ. If the DAQ is enabled during the dead
time, it won't
see a convert pulse prior to the first trigger. If it is enabled right
after the trigger, I will see a convert pulse before the trigger.

I acquire in two different modes. On acquires 50% of the waveform and
has convert pulses present 50% of the time. The second mode acquires
almost 100% of the time with only a 100us deadtime at the end of each
waveform. In the 50% mode I miss the first pulse about 50% of the
time. In the ~100% mode I haven't yet missed a pulse. When I miss the
first pulse, all the subsequent data gets shifted by one sample, and
the last sample becomes what should be the 1st sample of the next
waveform.

So my theory is that the DAQ needs to see at least one convert pulse
after it is initialized by the software prior to being triggered.
Otherwise it eats my first sample.

Thanks for your help,
Barry
0 Kudos
Message 3 of 4
(2,927 Views)
Hi Barry,

I'm not sure how the internal circuitry works but that sounds like a
reasonable theory. I will be away for the next week but I can try and
verify your theory when I return.

Ron
0 Kudos
Message 4 of 4
(2,927 Views)