National Instruments NI cDAQ-9139 User Manual page 87

Eight-slot controller
Hide thumbs Also See for NI cDAQ-9139:
Table of Contents

Advertisement

Large Range of Frequencies with Two Counters
By using two counters, you can accurately measure a signal that might be high or low frequency.
This technique is called reciprocal frequency measurement. When measuring a large range of
frequencies with two counters, you generate a long pulse using the signal to measure. You then
measure the long pulse with a known timebase. The cDAQ controller can measure this long
pulse more accurately than the faster input signal.
Counter 0 is always paired with Counter 1. Counter 2 is always paired with
Note
Counter 3.
You can route the signal to measure to the Source input of Counter 0, as shown in Figure 5-14.
Assume this signal to measure has frequency fx. NI-DAQmx automatically configures Counter 0
to generate a single pulse that is the width of N periods of the source input signal.
Figure 5-14. Large Range of Frequencies with Two Counters
Signal of Known
Next, route the Counter 0 Internal Output signal to the Gate input of Counter 1. You can route a
signal of known frequency (fk) to the Counter 1 Source input. Configure Counter 1 to perform
a single pulse-width measurement. Suppose the result is that the pulse width is J periods of the
fk clock.
From Counter 0, the length of the pulse is N/fx. From Counter 1, the length of the same pulse is
J/fk. Therefore, the frequency of fx is given by fx = fk * (N/J).
Signal to
Source
Measure (fx)
Frequency (fk)
CTR_0_SOURCE
(Signal to Measure)
CTR_0_OUT
(CTR_1_GATE)
CTR_1_SOURCE
Counter 0
Source
Counter 1
Gate
0
1
2
3 ... N
Interval
to Measure
NI cDAQ-9138/9139 User Manual
Out
Out
© National Instruments | 5-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ni cdaq-9138Ni cdaq-9133

Table of Contents