LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Noisy freq measurement with E series counters.

Having the devil of a time trying to get stable freq measurements.
Running LabVIEW 7, Measure Frequency (DAQ-STC).VI, PCI-MIO-E16-1
Attempting to do sequential frequency measurement on 2 channels of ~5MHz
TTL signals.
Have tried different sources of TTL pulse gen, both battery and line
operated.
Have tried freqs as low as 1MHz and as high as 5MHz.
Have tried cleaning up output with low pass filter - schmitt trigger etc.
Have tried lead dress...all to no avail.
The frequency counted seems somewhat reasonable and stable if I only
connect 1 channel, and it seems better if I earth the common (DGND)
rather than let it float.
But when I try to connect the second TTL signal to the second counters
source (or ANY PFI line) it ob
literates the measurement on the first
channel (reads higher and unstable).
Any hints?
ps: where, how does x@no.email address come from?
thanks
paul
0 Kudos
Message 1 of 4
(2,711 Views)
Hello Paul,

The problem may be due to the inaccuracies resulting from measuring such a high frequency signal with only one counter using the inverse of period measurment. For more information on what this, please take a look at: <>
To measure signals around 1 to 5 MHz, you will probably want to go with method 2, meaning you will need to use 2 counters to measure the frequency of one signal. The VI you were using, Measure Frequency (DAQ-STC).VI is configured to use both counters to measure the frequency of one signal.

One alternative is to use method 2, but use the signal from the freq_out pin to be the gate for both of the counters. Then you could measure the frequ
ency of 2 signals. The following example demonstrates this:
<>

Please let me know if you have further questions.

Kristi Hummel
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,711 Views)
Kristi H wrote:

>Hello Paul,
>
thanks for the response.
I guess I should state what I think is my problem more clearly.
I think the DAQ card is technically functioning OK, it's more a matter
of getting a 5MHz TTL signal through 2 meters of SH6868 cable so that
the DAQ card can accurately measure it. It seems that ~half the
degredation of my signal is due to the cable and the other half is due
to the DAQ card itself.
I'm getting the idea that although the DAQ card might be good to 10MHz
or so, it is not practical to pass anything above a few hundred KHz
through even a modest length of cable to get to the DAQ card in the
first place.
Any other hints appreciated.
~paul
0 Kudos
Message 3 of 4
(2,711 Views)
Paul,

The SH6868, 2m cable is capable of transmitting signals up to 20 MHz. Any noise induced into the system will occur at the point where you make the connection to your terminal block or in the method used for frequency measurement. If you are trying to use Method 1 (previous link to frequency measurement tutorial), your error is greatly increased for a 5 MHz signal then for a 5kHz signal. Method 2 is much better for your application, but it requires 2 counters to measure the frequency of a single signal.

The error incurred by choosing the wrong measurement method is called synchronization error. Synchronization error is due to the gate and source edge not being synchronized, causing the final measurement to be off by as much as +/- 1 e
dge. Consider two separate signals with frequencies 50 kHz and 5 MHz. Using a 20 MHz timebase, source cycles last 50 ns. The number of 50 ns periods that occur during one cycle of a 50 kHz signal is 400 +/- 1, which yields a frequency measurement between 49.88 and 50.13 kHz. On the other hand, the number of 50 ns periods that occur during one cycle of a 5 MHz signal is 4 +/- 1, which yields a frequency measurement between 4 and 6.67 MHz. Method 2 is much better suited for high frequency measurements.

Hope this helps.

Kristi
0 Kudos
Message 4 of 4
(2,711 Views)