7-2
|
ni.com
Chapter 7
Counters
•
Frequency Measurement
•
Position Measurement
•
Two-Signal Edge-Separation Measurement
Counting Edges
In edge counting applications, the counter counts edges on its Source after the counter is armed.
You can configure the counter to count rising or falling edges on its Source input. You also can
control the direction of counting (up or down) as described in the
Controlling the Direction of
Counting
section.
Us the following edge counting options to read the counter values on your M Series device:
•
Single Point (On-Demand) Edge Counting
•
Buffered (Sample Clock) Edge Counting
Single Point (On-Demand) Edge Counting
With single point (on-demand) edge counting, the counter counts the number of edges on the
Source input after the counter is armed. On-demand refers to the fact that software can read the
counter contents at any time without disturbing the counting process. Figure 7-2 shows an
example of single point edge counting.
Figure 7-2.
Single Point (On-Demand) Edge Counting
You also can use a pause trigger to pause (or gate) the counter. When the pause trigger is active,
the counter ignores edges on its Source input. When the pause trigger is inactive, the counter
counts edges normally.
You can route the pause trigger to the Gate input of the counter. You can configure the counter
to pause counting when the pause trigger is high or when it is low. Figure 7-3 shows an example
of on-demand edge counting with a pause trigger.
Figure 7-3.
Single Point (On-Demand) Edge Counting with Pause Trigger
Counter Armed
SOURCE
Counter Value
1
0
5
4
3
2
Counter Armed
SOURCE
Pause Trigger
(Pause When Low)
Counter Value
1
0
0
5
4
3
2
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com