Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog measurement with an external clock


Hi all,

I'm trying to use a digital signal as a trigger for voltage measurement.
I tried using voltage measurement with a digital signal as an external clock. When I generate the external clock from the NI card I can read just fine as long as the clock rate is below 1.25 MHz (I'm using the pci-6251). So far it all makes sense...
The actual signal I want to use as a trigger has a much lower intensity than 1.25MHz but there is always a possibility of quick bursts which might exceed that limit.  When I use that signal as the external clock I get the following error:

ADC conversion attempted before the prior conversion was completed.Increase the period between ADC conversions.I f you are using external clock check your signal for the presence of  noise or glitches.

The average signal intensity I used for testing was about 500Hz and I got the error typically every 5 seconds of measurement which puzzles me because the chances of a quick burst (quicker than 1.25MHz) are really really low for an such low frequency . If this method will work the average signal intensity I want to use as a clock will be at about 100KHz.
I don't mind missing some data above some frequency (in the order of 1MHz) but no matter what I do  there will always be a probability of a quick burst.

Is there a way to overcome this problem?

I'm looking for a new NI card anyway so if this can be resolved with a new card I don't mind buying one.
Thank you,
Eyal


0 Kudos
Message 1 of 7
(4,867 Views)
Eyal,
 
Judging from the error that you receive, "ADC conversion attempted before the prior conversion was completed.Increase the period between ADC conversions. If you are using external clock check your signal for the presence of  noise or glitches." it could be that the clock source that you are providing does not meet specifications.  From the 6251 specifications manual, pg. 7, "The digital subsystem does not have its own dedicated internal timing engine.  Therefore, a sample clock must be provided from another subsystem on the device or an external source."  I would recommend using another external clock to see if this behavior still continues.
0 Kudos
Message 2 of 7
(4,850 Views)
Why not using a filter to avoid the possible bursts on the trigger signal ?
0 Kudos
Message 3 of 7
(4,840 Views)
A filter is a good option. The problem is that each pulse has the same width (40 ns) so it is not so trivial to filter the bursts.
I can try using the signal with the bursts to trigger a digital pulse on a different counter and filter the bursts by choosing a longer pulse width. I remembered I did something like that before for period measurements. The problem was that I had limited success.
I'll give it a try tomorrow and see if that helps.
I also realized that I might have been using a high impedance signal which increases the settling time so I'll have to check tomorrow if the performance improves for a low impedance signal.



0 Kudos
Message 4 of 7
(4,838 Views)
You could also use an external monostable IC to filter the bursts.
0 Kudos
Message 5 of 7
(4,831 Views)

You *should* be able to do that kind of filtering with your other counter.  Not sure what problem you had previously...

Configure it for retriggerable single pulse generation with a total period of 1 microsec.  Then any adjacent incoming pulses at > 1 MHz will be ignored.   Use this counter's output as your AI sample clock.  Note that you may need to set the "initial delay" equal to your pulse's "low time" so the first cycle will behave like all the others.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 7
(4,827 Views)
Hi all,

So I used my external clock to trigger a digital pulse with a width of 1us which I then used as the external clock and I don't get any errors anymore. 

I think that theoretically the narrowest I can go is 800ns which would be equivalent to the max sampling rate of the card (1.25MHz).
Now I just have to check that the results make sense.

Thank you for all your help,
Eyal

0 Kudos
Message 7 of 7
(4,795 Views)