Engee documentation

STM32 Encoder

Receiving data from the encoder channels.

blockType: CFunction

Path in the library:

/Interfaces/Targets/STM32/STM32 Encoder

Description

To work with the block, install/update the support package. equipment.

Block STM32 Encoder It is intended for receiving data from encoder channels.

Ports

Output

# Count — the CNT register
scalar

Details

The value of the CNT register selected in the parameter Таймер:, which represents the edge difference at the inputs of the encoder channels.

Data types

uint32_t

Complex numbers support

No

Parameters

Main group

# Таймер: — the timer selected in CubeMX
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14

Details

The number of the timer configured in CubeMX in encoder operation mode.

Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14

Default value

1

Program usage name

m_tim_num

Tunable

No

Evaluatable

Yes

Configuring CubeMX to work with the Encoder module

In the "Pinout & Configuration" tab, in the "Timers" column, select the desired timer for operation TIM. In the "Mode" tab, for the Combined Channels parameter, specify Encoder Mode.

stm32 encoder 1

Generate the code.