Chapter 8
Counters
8-12
ni.com
•
Method 2: Measure High Frequency with Two Counters
—In this
method, yo
u
meas
u
re one p
u
lse of a known width
u
sing yo
u
r signal
and derive the freq
u
ency of yo
u
r signal from the res
u
lt. This method is
good for high freq
u
ency signals.
In this method, yo
u
ro
u
te a p
u
lse of known d
u
ration (T) to the Gate of
a co
u
nter. Yo
u
can generate the p
u
lse
u
sing a second co
u
nter. Yo
u
also
can generate the p
u
lse externally and connect it to a PFI terminal. Yo
u
only need to
u
se one co
u
nter if yo
u
generate the p
u
lse externally.
Ro
u
te the signal to meas
u
re (F1) to the So
u
rce of the co
u
nter.
Config
u
re the co
u
nter for a single p
u
lse-width meas
u
rement. S
u
ppose
yo
u
meas
u
re the width of p
u
lse T to be
N
periods of F1. Then the
freq
u
ency of F1 is
N
/T.
Fig
u
re 8-12 ill
u
strates this method. Another option wo
u
ld be to
meas
u
re the width of a known period instead of a known p
u
lse.
Figure 8-12.
Method 2
P
u
l
s
e
F1
P
u
l
s
e
F1
G
a
te
S
o
u
rce
1 2 …
N
P
u
l
s
e-Width
Me
asu
rement
T =
N
F1
Freq
u
ency of F1 =
T
Width of
P
u
l
s
e
N
Width of P
u
l
s
e (T)