Chapter 2 Function Reference — CTR_EvRead
NI-DAQ FRM for PC Compatibles 2-94
©
National Instruments Corporation
CTR_EvRead
Format
status = CTR_EvRead (deviceNumber, ctr, overflow, count)
Purpose
Reads the current counter total without disturbing the counting process and returns the count
and overflow conditions.
Parameters
Input
Output
Parameter Discussion
ctr is the counter number.
Range: 1, 2, or 5 for an MIO device except the E Series devices.
1 through 10 for a PC-TIO-10.
overflow returns the overflow state of the counter. A counter overflows if it counts up to
65,535 and rolls over to zero on the next count. If overflow = 0, no overflow has occurred. If
overflow = 1, an overflow occurred. See the Special Considerations for Overflow Detection
section later in this function.
count returns the current total of the specified counter. count can be between zero and 65,535.
count represents the number of edges (either falling or rising edges, not both) that have
occurred since the counter started counting.
Note
C Programmers—overflow and count are pass-by-reference parameters.
Name Type Description
deviceNumber i16 assigned by configuration utility
ctr i16 counter number
Name Type Description
overflow i16 overflow state of the counter
count u16 current total of the specified counter