Incremental Mode Principle Description
This section describes the use of the incremental mode to connect incremental encoders.
The incremental mode behaves like a standard up/down counter, using pulses and counting these pulses.
Positions must be preset and counting must be initialized to implement and manage the incremental mode.
The counter value can be stored in the capture register by configuring an external event.
The following diagram provides an overview of the encoder in incremental mode:
The following table presents the two available axis types and corresponding counting modes:
|
Axis Type |
Comment |
|---|---|
|
Linear |
This mode acts as a finite counter. |
|
Rotary |
This mode acts as an infinite counter. |
The input mode in incremental mode is always quadrature:
|
Stage |
Action |
|---|---|
|
1 |
On the rising edge of Preset condition, the counter value is set to the preset value and the counter is activated. |
|
2 |
When the Enable condition = 1, the counter starts to increment when the counting direction is up. |
|
3 |
The rising edge on the Preset condition loads the Preset value. |
|
4 |
When the incoming pulses stop, the counter maintains its value. |
|
5 |
When the Enable condition = 1, the counter starts to decrements when the counting direction is down. |
|
6 |
When the Enable condition = 0, the counter ignores the pulses applied to the counting inputs A/B. |
|
7 |
The rising edge on the Preset condition loads the preset value. |
|
8 |
When the Enable condition = 1, the counter starts to decrements when the counting direction is down. |
NOTE: Enable and Preset conditions depend on the configuration. These are described in the Enable and Preset function.