BL4S200 User’s Manual
72
setDecoder
int setDecoder(int channel_a, int channel_b, int channel_index,
char index_polarity);
FUNCTION DESCRIPTION
Sets up Quadrature Decoder functionality on the specified channels. The Quadrature
Decoder may optionally use an index channel.
PARAMETERS
channel_a
channel to use as Input A (also known as in-phase or I)
channel_b
channel to use as Input B (also known as quadrature or Q)
channel_index
channel to use as index input (-1 if not used)
NOTE:
The Quadrature Decoder count may still be reset by existing or new synch signals
set up on the same block of a particular RIO chip.
index_polarity
polarity of the index channel
(not used when channel_index set to -1)l.
0 — index on low level
non-zero — index on high level
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
-EACCESS
— resource needed by this function is not available.
SEE ALSO
brdInit, getCounter, resetCounter
electronic components distributor