User manual
Chapter 3 Software Overview
NI-DAQ User Manual for PC Compatibles 3-86 ni.com
Event-Counting Applications
CTR_EvCount
and
CTR_EvRead
work with four types of
event-counting/timing measurements—event counting, pulse-width
measurement, time-lapse measurement, and frequency measurement.
CTR_EvCount
also supports the concatenation of counters so that you
can obtain 32-bit or 48-bit resolution for these measurements.
For event-counting applications, the events counted are the signal
transitions or edges of an input SOURCE signal; therefore, you should
set timebase to a value from 6–10. NI-DAQ can count either low-to-high
or high-to-low edges (this feature is selected by edgeMode in the
CTR_Config
function). In addition, you can use the various gating modes
of
CTR_Config
to control counting. Figure 3-31 illustrates timer event
counting.
Figure 3-31. Timer Event Counting
For pulse-width measurement, configure a counter to count for the duration
of a pulse. For this application, you can use any timebase, including an
external clock connected to the counter SOURCE input. Use level gating
modes for pulse-width measurements in which the pulse to be measured is
connected to the counter GATE input. Pulse width is then equal to (event
count)
*
(timebase period). Figure 3-32 shows a typical pulse-width
measurement.
1
23
4
5
5
SOURCE
Event Signal
GATE
Start/Stop Signal
CTR_EvRead Count










