QDEC - Quadrature Decoder
The QDEC block handles the encoder Decoding
Fields
Name |
Type |
Description |
---|---|---|
LINKUP_INCR |
param bit |
link up incremental coder signal |
A |
bit_mux |
Quadrature A |
B |
bit_mux |
Quadrature B |
Z |
bit_mux |
Z index channel |
RST_ON_Z |
param bit |
Zero position on Z rising edge |
SETP |
write int |
Set point |
HOMED |
read bit |
Quadrature homed status |
OUT |
pos_out |
Output position |
Counting
The quadrature decoder counts, incrementing at each rising or falling edge of the sequence. If the sequence is reversed the count will decrease at each edge. The initial value is set to the value of the SETP input.
(Source code, png, hires.png, pdf)
(Source code, png, hires.png, pdf)
Resetting
Whilst counting, it can be reset to ‘0’ on while the Z input is high, provided that this functionality is enabled by setting the RST_ON_Z input to ‘1’. If the SETP input is changed the count value changes to the new value.
(Source code, png, hires.png, pdf)
Limitations
The block can continue to count when there is not a constant period between the pulses.
(Source code, png, hires.png, pdf)
The output takes three clock pulses to update. If the inputs are changing faster than this, inputs can be lost.
(Source code, png, hires.png, pdf)