C7266config.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 52

Universal Library Virtual Instruments (VIs)
Counter VIs
C7266Config.VI
Configures a 7266 counter for desired operation. This function can only be used with boards that contain a
7266 counter chip (Quadrature Encoder boards).
Summary:
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
CounterNum
[I32] - Counter number (1 n) to configure
Quadrature
[I32] -
NO_QUAD
,
X1_QUAD
,
X2_QUAD
or
X4_QUAD
CountingMode
[I32] -
NORMAL_MODE
,
RANGE_LIMIT
,
NO_RECYCLE
,
MODULO_N
DataEncoding
[I32] -
BCD_ENCODING
,
BINARY_ENCODING
IndexMode
[I32] -
INDEX_DISABLED
,
LOAD_CTR
,
LOAD_OUT_LATCH
,
RESET_CTR
InvertIndex
[I32] -
DISABLED
or
ENABLED
FlagPins
[I32] - Selects function for
X1FLG
and
X2FLG
pins.
CARRY_BORROW
,
COMPARE_BORROW
,
CARRYBORROW_UPDOWN
,
INDEX_ERROR
.
Gating
[TF] -
DISABLED
or
ENABLED
Outputs:
ErrCode
– Error code returned from the Universal Library. Zero if no error
occurred. Use the ErrMsg VI to convert
ErrCode
into a readable string.
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal. The
specified board must have an LS7266 counter.
CounterNum
Counter number (1n) where n is the number of counters on the board. A PCM-
QUAD02 has two counters. A PCI-QUAD04 has four counters.
Refer to board-specific information contained in the Universal Library User's
Guide (available on our we
Quadrature
Selects the resolution multiplier (
X1_QUAD
,
X2_QUAD
, or
X4_QUAD
) for quadrature
input or disables quadrature input (
NO_QUAD
) so that the counters can be used as
standard TTL counters.
CountingMode
Selects one of the following operating modes for the counter:
NORMAL_MODE
- Each counter operates as a 24-bit counter that rolls over to 0 when
the maximum count is reached.
RANGE_LIMIT
- In range limit count mode, an upper and lower limit is set,
mimicking limit switches in the mechanical counterpart. The upper limit is set by
loading the
PRESET
register with the cbCLoad function after the counter has been
configured. The lower limit is always 0. When counting up, the counter freezes
whenever the count reaches the value loaded into the
PRESET
register. When
counting down, the counter freezes at 0. In each case the counting is resumed only
when the count direction is reversed.
NO_RECYCLE
- In non-recycle mode, the counter is disabled whenever a count
overflow or underflow takes place. The counter is re-enabled when a reset or load
operation is performed on the counter.
52