Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-46 © National Instruments Corporation
Parameters
Input device short integer Assigned by configuration utility.
counter short integer The counter to be controlled (valid counters are
0 through 2).
controlCode short integer Determines the counter's operating mode.
count unsigned
short integer The period between output pulses.
binaryorBCD short integer I_BINARY: The counter operates as a 16-bit
binary counter (0 to 65,535); I_BCD: The
counter operates as a 4-decade BCD counter (0
to 9,999).
outputState short integer I_HIGH_STATE: Output state of the counter is
high; I_LOW_STATE: Output state of the
counter is low. Valid when the controlCode = 7
(I_RESET).
Output readValue unsigned
short integer Returns the value read from the counter when
controlCode = 6 (I_READ).
Return Value
error short integer Refer to error codes in Table 10-5.
Parameter Discussion
controlCode determines the counter's operating mode. This parameter accepts the following
attributes:
0: I_TOGGLE_ON_TC—counter's output becomes low after the mode set operation and the
counter decrements from count to 0 while the gate is high. The output toggles from low to
high once the counter reaches 0.
1: I_PROGRAMMABLE_ONE_SHOT—counter's output becomes low on the count following
the leading edge of the gate input and becomes high on TC.
2: I_RATE_GENERATOR—counter's output becomes low for one period of the clock input.
The count indicates the period between output pulses.
3: I_SQUARE_WAVE_RATE_GENERATOR—counter's output stays high for one-half of the
count clock pulses and stays low for the other half.
4: I_SOFTWARE_TRIGGERED_STROBE—counter's output is initially high, and the
counter begins to count down while the gate input is high. On terminal count, the output
becomes low for on clock pulse, then becomes high again.