Chapter 7
Counters
X Series User Manual
7-16
ni.com
Figure 7-14.
Large Range of Frequencies with Two Counters
NI-DAQmx then ro
u
tes the Co
u
nter 0 Internal O
u
tp
u
t signal to the gate of
Co
u
nter 1. Yo
u
can then ro
u
te a signal of known freq
u
ency (
fk
) as a co
u
nter
timebase to the Co
u
nter 1 So
u
rce inp
u
t. NI-DAQmx config
u
res Co
u
nter 1
to perform a single p
u
lse-width meas
u
rement. S
u
ppose the res
u
lt is that the
p
u
lse width is
J
periods of the
fk
clock.
From Co
u
nter 0, the length of the p
u
lse is
N
/
fx
. From Co
u
nter 1, the length
of the same p
u
lse is
J
/
fk
. Therefore, the freq
u
ency of
fx
is given by
fx
=
fk
* (
N
/
J
).
Sample Clocked Buffered Frequency Measurement
Sample clocked b
u
ffered point freq
u
ency meas
u
rements can either be a
single freq
u
ency meas
u
rement or an average between sample clocks. Use
CI.Freq.EnableAveraging to set the behavior. For b
u
ffered freq
u
ency, the
defa
u
lt is Tr
u
e. For hardware-timed single point (HWTSP), the defa
u
lt is
False.
A sample clocked b
u
ffered freq
u
ency meas
u
rement with
CI.Freq.EnableAveraging set to Tr
u
e
u
ses the embedded co
u
nter and a
sample clock to perform a freq
u
ency meas
u
rement. For each sample clock
period, the embedded co
u
nter co
u
nts the signal to meas
u
re (
fx
) and the
S
o
u
rce
O
u
t
Co
u
nter 0
S
o
u
rce
G
a
te
O
u
t
Co
u
nter 1
S
ign
a
l to
Me
asu
re (
fx
)
S
ign
a
l of Known
Freq
u
ency (
fk
)
CTR_0_
S
OURCE
(
S
ign
a
l to Me
asu
re)
CTR_0_OUT
(CTR_1_GATE)
CTR_1_
S
OURCE
Interv
a
l
to Me
asu
re
0 1 2
3
…
N
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com