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 TestScale backplane can measure this long pulse more accurately than the faster input signal.

Note Counter 0 is always paired with Counter 1. Counter 2 is always paired with Counter 3.

You can route the signal-to-measure to the first counter, as shown in the following figure. Assume this signal-to-measure has frequency fx. NI-DAQmx automatically configures the first counter to generate a single pulse that is the width of N periods of the source input signal.

Figure 33. Large Range of Frequencies with Two Counters

1378

Next, the device routes this pulse to the second counter. You can route a signal of known frequency (fk) to the second counter’s counter timebase input. Configure the second counter to perform a single pulse-width measurement. Suppose the result is that the pulse width is J periods of the fk clock.

From the first counter, the length of the pulse is N/fx. From the second counter, the length of the same pulse is J/fk. Therefore, the frequency of fx is given by fx = fk * (N/J).