Quadrature Encoder
Measure rotation of encoder in ticks
Add-On Required: This feature requires the Simulink Coder Support Package for NXP FRDM-K64F Board add-on.
Libraries:
Simulink Coder Support Package for NXP FRDM-K64F Board
Description
The Quadrature Encoder block reads the rotation tick count and the direction of the encoder to which the board is connected.
When you rotate the encoder in a clockwise direction, the tick count increases. When you rotate the encoder in a counterclockwise direction, the tick count decreases.
Using the parameters of this block, specify the encoding mode, reset mode, and phase polarity.
On the board, the Flexible Timer Module (FTM) peripheral provides dedicated pins for the Phase A and Phase B output signals from the encoder.
Connect the Phase A output pin on the encoder to the PTB18 pin on the board. Connect the Phase B output pin on the encoder to the PTB19 pin on the board.
Ports
Input
Output
Parameters
Version History
Introduced in R2017a