Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

QDEC - Quadrature Decoder

The QDEC block handles the encoder Decoding

Fields

NameTypeDescription
LINKUP_INCRparam bitlink up incremental coder signal
Abit_muxQuadrature A
Bbit_muxQuadrature B
Zbit_muxZ index channel
RST_ON_Zparam bitZero position on Z rising edge
SETPwrite intSet point
HOMEDread bitQuadrature homed status
OUTpos_outOutput 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.

No Set PointUp then Down

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.

Up then down with reset and change of Set Point

Limitations

The block can continue to count when there is not a constant period between the pulses.

Variable quadrature period

The output takes three clock pulses to update. If the inputs are changing faster than this, inputs can be lost.

Faster input than output