Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-32 © National Instruments Corporation
Return Value
error short
integer Refer to error codes in Table 10-5.
Parameter Discussion
counter is the counter to be used for the counting operation. The valid counters are shown in
Table 10-2, which is found in the Valid Counters for the Counter/Timer Functions subsection of
the Easy I/O for DAQ Library Function Overview section of this chapter.
counterSize determines the size of the counter used to perform the operation.
• For a device with DAQ-STC counters, counterSize must be ONE_COUNTER (24-bit).
• For a device with Am9513 counters, counterSize can be ONE_COUNTER (16-bit) or
TWO_COUNTERS (32-bit).
• If you use TWO_COUNTERS, counter+1 is cascaded with the specified counter. counter+1 is
defined as shown in Table 10-3 in the function description for
CounterEventOrTimeConfig.
counterMinus1GateMode is the gate mode for counter-1. The possible values are:
• UNGATED_SOFTWARE_START
• COUNT_WHILE_GATE_HIGH
• COUNT_WHILE_GATE_LOW
• START_COUNTING_ON_RISING_EDGE
counter-1 is used to gate counter so that rising edges are counted over a precise sample time.
For a specified counter, counter-1 is defined as shown in Table 10-4.
CounterReadshort error = CounterRead (unsigned long taskID, short *overflow,
long *count);
Purpose
Reads the counter identified by taskID.