Documente Academic
Documente Profesional
Documente Cultură
Overview
This document is part of the How-To Guide for Most Common Measurements (http://zone.ni.com/devzone/cda/tut/p/id/7136)
centralized resource portal.
Table of Contents
1. Frequency Overview
2. How to Make a Frequency Measurement
3. Recommended Hardware and Software
4. Frequency Webcasts Tutorials, and Other How-To Resources
1. Frequency Overview
Figure 3. Digital Signal with Respect to Internal Timebase (One Counter for Low Frequency)
When the frequency of the digital signal is very high or varies, it is better to use one of the two-counter methods described
below. Note that the same hardware limitation applies to both two-counter methods. That is, the frequency you are measuring
cannot exceed the maximum input frequency supported by the counter, even though it may exceed that of the internal
timebase.
High-Frequency Two-Counter Measurement Method
http://www.ni.com/tutorial/7111/en/ 1/3
3/12/2017 Frequency Measurements: How-To Guide - National Instruments
For a high-frequency signal, you need two counters. A paired counter (two counters) generates a pulse train with a user-
specified period, “measurement time” (see Figure 4), much larger than that of the signal you are measuring but small enough to
prevent counter rollover.
Figure 4. Digital Signal Frequency Measured with Two Counters (High Frequency)
The measurement time of this Internal Signal should be a multiple of the Internal Timebase, or, in other words, divided down.
The number of ticks of the Input Signal is then counted over the known period of time provided by theInternal Signal. Dividing
the number of ticks by the known measurement time gives the frequency of the Input Signal.
Large-Range Two-Counter Measurement Method
For signals with variations in frequency, this two-counter method provides increased accuracy throughout the entire range. The
Input Signal in this case is divided by a known value, or divisor. The number of ticks of the Internal Timebase is counted over
one logic-high of the Divided Down Signal (see Figure 5). This gives the time of the logic-high, which is the product of the
number of ticks counted and the period of the Internal Timebase. This in turn can be multiplied by 2 to get the period for the
Divided Down Signal (high and low time), which is a multiple of the Input Signal period. The Input Signal’s period can then be
inverted to obtain its frequency.
Figure 5. Digital Signal Frequency Measured with Two Counters (Large Range)
This method is like averaging the values over a longer range to account for the variation in the signal, but you can also use this
method to measure signals with higher frequencies than the timebase.
Connecting Your Digital Signal to an Instrument to Count Frequency
Many devices with hardware timing may be appropriate for counter measurements. Consider an NI CompactDAQ system as an
example (see Figure 6). The hardware timebase for NI CompactDAQ is located on the backplane of the chassis and is not
specific to the NI C Series modules themselves.
http://www.ni.com/tutorial/7111/en/ 2/3
3/12/2017 Frequency Measurements: How-To Guide - National Instruments
http://www.ni.com/tutorial/7111/en/ 3/3