Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-26 © National Instruments Corporation
gateMode specifies how the signal on the counter's GATE pin is used. The options are:
• UNGATED_SOFTWARE_START—ignore the gate signal and start when CounterStart is
called.
• COUNT_WHILE_GATE_HIGH—count while the gate signal is TTL high after
CounterStart is called.
• COUNT_WHILE_GATE_LOW—count while the gate signal is TTL low after
CounterStart is called.
• START_COUNTING_ON_RISING_EDGE—start counting on the rising edge of the TTL
gate signal after CounterStart is called.
• START_COUNTING_ON_FALLING_EDGE—start counting on the falling edge of the TTL
gate signal after CounterStart is called.
pulsePolarity is the polarity of phase 2 of each cycle. The options are:
• POSITIVE_POLARITY—the delay (phase 1) is a low TTL level and the pulse (phase 2) is a
high level.
• NEGATIVE_POLARITY—the delay (phase 1) is a high TTL level and the pulse (phase 2) is
a low level.
CounterEventOrTimeConfigshort error = CounterEventOrTimeConfig (short device, char counter[],
unsigned short counterSize,
double sourceTimebase,
unsigned short countLimitAction,
short sourceEdge,
unsigned short gateMode,
unsigned long *taskID);
Purpose
Configures one or two counters to count edges in the signal on the specified counter's SOURCE
pin or the number of cycles of a specified internal timebase signal.
When you use this function with the internal timebase and in conjunction with CounterStart
and CounterRead your program can make more precise timing measurements than with the
Timer function.
You can also call the CounterStart function to gate or trigger the operation with a signal on
the counter's GATE pin.