Encoder Read

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Block References > On-chip Peripherals > TIM >

Encoder Read

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?


What can be configured?


When to use this block?

Use this block to read encoder output.

How does this block work?

The encoder read function uses built-in STM32F4 timer to interpret encoder data.

Available pins for encoder channel A and B depends on selected MCU (via Target Setup Block) and Timer.

The encoder position count always count up:

From 0 to (PPR x 4)-1 when channel A and B are used.
From 0 to (PPR x 2)-1 when only a single channel (either A or B) is used.

If Reset counter after every counter read is checked, the counter is reset to zero after the count is read.


1.Encoder Read