Configure
Encoder I/O
Configures the encoder flags and whether to
reload the 24-bit encoder counter on an index pulse.
Library
qctools
Description

The Configure Encoder I/O block for the Q8
series of I/O cards provides a mechanism for configuring the two
interrupt flags available for each encoder channel, and for
configuring whether an index pulse should reload the encoder count
value from the preload register. This block is normally unnecessary
since its functionality is also provided by the Encoder Input block.
Parameters and Dialog Box

Board Number
The board number of the I/O card. If
there is only one Q8 board in your system, then the board number
should be zero. The second Q8 board in your system is board number 1,
etc.
Channel(s) to Configure
The channels to configure. The channel
numbers may range from 0 to 7, since there are 8 encoder channels on
the Q8 I/O boards.
Flags
The encoders have two flag outputs.
Each flag may be used as an interrupt source for asynchronous
interrupts (see the Encoder Interrupts block) or for polling (see the
Poll Encoder Interrupts block and Encoder Status block). This option
selects the meaning of those flags. The selected flags are used for
each selected channel. The flags are as follows:
CARRY.
When the 24-bit encoder counter overflows ie, cycles from 16777215
(0xffffff ) to 0 when counting upward, the CARRY flag goes low for
one cycle of the filter clock.
BORROW.
When the 24-bit encoder counter underflows ie, cycles from 0 to
16777215 (0xffffff ) when counting downward, the BORROW flag goes low
for one cycle of the filter clock.
CARRY/BORROW.
When the 24-bit encoder counter overflows or underflows ie, cycles
from 0 to 16777215 (0xffffff ) or vice versa, the CARRY/BORROW flag
goes low for one cycle of the filter clock.
COMPARE.
When the 24-bit encoder counter equals the Initial Value, the COMPARE
flag goes low for one cycle of the filter clock.
IDX.
Set to 1 when the index is valid. Otherwise set to 0. This flag is
meaningless if the Enable Index option is not checked.
E.
Set to 1 when excessive noise is present at the inputs.
UP/DOWN.
When the 24-bit encoder counter is counting upward, this flag is 1.
When it is counting downward, the flag is 0. If the counter is not
changing then the previous state is output.
Reload Counter on Index
When this option
is checked, a pulse on the encoder index input causes the encoder
counter to be reset to the Initial Value (assuming the index is
enabled). This option applies to all channels. For more flexibility
with regards to the index pulse, refer to the blocks in the Encoder
Extras library. In non-quadrature mode, a low-level at the encoder
index input causes the encoder counter to be reset to the Initial
Value.
|