User manual

Chapter 3 Software Overview
© National Instruments Corporation 3-91 NI-DAQ User Manual for PC Compatibles
inactive, the counter value latches to the Hold Register. You then can call
CTR_EvRead
to retrieve the saved value. Pulse width is then equal to the
value returned by
CTR_EvRead
*
timebase. When the counter value is
latched to the Hold Register, the counter reloads itself with a zero and
waits for the gate to go active to begin a new measurement.
For measuring pulse width, you need a rough estimate of the duration of
the pulse being measured. When you configure a counter to measure pulse
width, the counter continues counting in case of overflow. No counter value
is latched to the Hold Register until the gate signal becomes inactive.
To detect the counter overflow, feed the output of the pulse-width
measurement counter to the source input of an event-counting counter.
If the event-counting counter value is not zero after the pulse-width
measurement, the pulse-width measurement is not correct.
Interval Counter/Timer Functions
The Interval Counter/Timer functions perform interval timing I/O and
counter operations on the 516 devices, DAQCard-500/700, Lab and
1200 devices, and LPM devices.
Refer to the NI-DAQ Function Reference Online Help file to determine
which functions your device supports.
ICTR_Read
Returns the current contents of the selected counter
without disturbing the counting process and returns
the count.
ICTR_Reset
Sets the output of the selected counter to the
specified state.
ICTR_Setup
Configures the assigned counter to operate in the
specified mode.