National Instruments 321645c-01 User Manual

Page of 554
Chapter 2
Function Reference — CTR_EvCount
NI-DAQ FRM for PC Compatibles
2-92
©
 National Instruments Corporation
CTR_EvCount
Format
status = CTR_EvCount (deviceNumber, ctr, timebase, cont)
Purpose
Configures the specified counter for an event-counting operation and starts the counter.
Parameters
Input
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.
timebase selects the timebase, or resolution, to be used by the counter. timebase has the 
following possible values:
–1:
Internal 5 MHz clock used as timebase (200 ns resolution) (AT-MIO-16F-5, 
AT-MIO-64F-5, AT-MIO-16X, and PC-TIO-10 only).
0:
TC signal of ctr-1 used as timebase.
1:
Internal 1 MHz clock used as timebase (1 µs resolution).
2:
Internal 100 kHz clock used as timebase (10 µs resolution).
3:
Internal 10 kHz clock used as timebase (100 µs resolution).
4:
Internal 1 kHz clock used as timebase (1 ms resolution).
5:
Internal 100 Hz clock used as timebase (10 ms resolution).
6:
SOURCE1 used as timebase if 1 
 ctr 
 5 or SOURCE 6 used as timebase 
if 6
ctr 
 10.
7:
SOURCE2 used as timebase if 1 
 ctr 
 5 or SOURCE 7 used as timebase 
if 6
ctr 
 10.
8:
SOURCE3 used as timebase if 1 
 ctr 
 5 or SOURCE 8 used as timebase 
if 6
ctr 
 10.
9:
SOURCE4 used as timebase if 1 
 ctr 
 5 or SOURCE 9 used as timebase 
if 6
ctr 
 10.
Name
Type
Description
deviceNumber
i16
assigned by configuration utility
ctr
i16
counter number
timebase
i16
timebase value
cont
i16
whether counting continues