Chapter 7
Counters
X Series User Manual
7-6
ni.com
Pulse-Width Measurement
In p
u
lse-width meas
u
rements, the co
u
nter meas
u
res the width of a p
u
lse on
its Gate inp
u
t signal. Yo
u
can config
u
re the co
u
nter to meas
u
re the width
of high p
u
lses or low p
u
lses on the Gate signal.
Yo
u
can ro
u
te an internal or external periodic clock signal (with a known
period) to the So
u
rce inp
u
t of the co
u
nter. The co
u
nter co
u
nts the n
u
mber
of rising (or falling) edges on the So
u
rce signal while the p
u
lse on the Gate
signal is active.
Yo
u
can calc
u
late the p
u
lse width by m
u
ltiplying the period of the So
u
rce
signal by the n
u
mber of edges ret
u
rned by the co
u
nter.
A p
u
lse-width meas
u
rement will be acc
u
rate even if the co
u
nter is armed
while a p
u
lse train is in progress. If a co
u
nter is armed while the p
u
lse is in
the active state, it will wait for the next transition to the active state to begin
the meas
u
rement.
Refer to the following sections for more information abo
u
t X Series
p
u
lse-width meas
u
rement options:
•
Single Pulse-Width Measurement
•
Implicit Buffered Pulse-Width Measurement
•
Sample Clocked Buffered Pulse-Width Measurement
•
Hardware-Timed Single Point Pulse-Width Measurement
Single Pulse-Width Measurement
With single p
u
lse-width meas
u
rement, the co
u
nter co
u
nts the n
u
mber of
edges on the So
u
rce inp
u
t while the Gate inp
u
t remains active. When the
Gate inp
u
t goes inactive, the co
u
nter stores the co
u
nt in the FIFO and
ignores other edges on the Gate and So
u
rce inp
u
ts. Software then reads the
stored co
u
nt.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com