Programming instructions
Chapter 26 Measuring Frequency and Period
LabVIEW Data Acquisition Basics Manual 26-6
©
National Instruments Corporation
DAQ-STC, Am9513
If you need more control over when your frequency measurement begins
and ends, use the Intermediate VIs instead of the Easy VIs. Figure 26-7
shows one approach for this that uses the Event or Time Counter Config,
Adjacent Counters, Delayed Pulse Generator Config, Counter Start,
CTR Control, Counter Read, and Counter Stop VIs. The Delayed Pulse
Generator Config VI configures
counter
to count the number of pulses
while its GATE is high. The Adjacent Counters VI is used to determine the
correct
counter-1
. The Delayed Pulse Generator Config VI then configure
counter-1
to generate a single pulse for the GATE signal. The Counter
Start VI begins the counting operation for
counter
first, then
counter-1
.
The CTR Control VI is an Advanced VI which is used to check if the GATE
pulse has completed. The Counter Read VI returns the count value from
counter
, which is used to determine the frequency and pulse width. Finally,
the Counter Stop VI stops the counter operation.
Figure 26-7.
Frequency Measurement Example Using Intermediate VIs










