Contents
NI 6238/6239 User Manual viii ni.com
Chapter 7
Counters
Counter Input Applications ...........................................................................................7-3
Counting Edges............................................................................................... 7-3
Single Point (On-Demand) Edge Counting...................................... 7-3
Buffered (Sample Clock) Edge Counting......................................... 7-4
Non-Cumulative Buffered Edge Counting....................................... 7-5
Controlling the Direction of Counting.............................................. 7-5
Pulse-Width Measurement..............................................................................7-6
Single Pulse-Width Measurement .................................................... 7-6
Buffered Pulse-Width Measurement ................................................ 7-6
Period Measurement ....................................................................................... 7-7
Single Period Measurement..............................................................7-8
Buffered Period Measurement.......................................................... 7-8
Semi-Period Measurement.............................................................................. 7-9
Single Semi-Period Measurement .................................................... 7-9
Buffered Semi-Period Measurement ................................................7-10
Frequency Measurement................................................................................. 7-10
Method 1—Measure Low Frequency with One Counter ................. 7-10
Method 1b—Measure Low Frequency with One Counter
(Averaged)..................................................................................... 7-11
Method 2—Measure High Frequency with Two Counters .............. 7-12
Method 3—Measure Large Range of Frequencies Using Two
Counters......................................................................................... 7-13
Choosing a Method for Measuring Frequency................................. 7-14
Position Measurement..................................................................................... 7-16
Measurements Using Quadrature Encoders...................................... 7-16
Measurements Using Two Pulse Encoders ...................................... 7-18
Two-Signal Edge-Separation Measurement ................................................... 7-19
Single Two-Signal Edge-Separation Measurement.......................... 7-19
Buffered Two-Signal Edge-Separation Measurement...................... 7-20
Counter Output Applications......................................................................................... 7-21
Simple Pulse Generation................................................................................. 7-21
Single Pulse Generation.................................................................... 7-21
Single Pulse Generation with Start Trigger...................................... 7-21
Retriggerable Single Pulse Generation............................................. 7-22
Pulse Train Generation.................................................................................... 7-23
Continuous Pulse Train Generation.................................................. 7-23
Frequency Generation..................................................................................... 7-24
Using the Frequency Generator........................................................ 7-24
Frequency Division......................................................................................... 7-25
Pulse Generation for ETS ............................................................................... 7-25