MC_SEW_ConfigEncoderAxis
This function block configures an encoder axis. The configuration can also be carried out via the configuration menu of the logical device.

VAR_IN_OUT
Variable name | Data type | Description |
|---|---|---|
Axis | AXIS_REF | Reference to a logical device |
VAR_INPUT
Variable name | Data type | Description |
|---|---|---|
Execute | BOOL | Start execution of the function block. |
EncoderSource | E_EncoderSource | Select the source of the encoder:
|
EncoderMinValue | DINT | Minimum value of the encoder position Only required if EncoderSource is E_EncoderSource.eExternalSource. The encoder position is processed as a DINT value. If the encoder position covers the entire DINT range (-2147483648 to 2147483647), EncoderMinValue and EncoderMaxValue must be set to 0. In all other cases, the two values must be set according to the encoder configuration. |
EncoderMaxValue | DINT | Maximum value of the encoder position Only required if EncoderSource is E_EncoderSource.eExternalSource. The encoder position is processed as a DINT value. If the encoder position covers the entire DINT range (-2147483648 to 2147483647), EncoderMinValue and EncoderMaxValue must be set to 0. In all other cases, the two values must be set according to the encoder configuration. |
PositionWindow | LREAL | Position window for a consistency check between the saved position on the MOVI-C® CONTROLLER and the actual position of the encoder. If the saved position on the MOVI-C® CONTROLLER (RETAIN) and the actual position of the encoder are outside the PositionWindow, a warning is issued. If PositionWindow is 0, the consistency check is switched off. |
FilterType | E_FilterType | Select the filter type for the encoder position:
|
FilterTime | DINT | Filter time for encoder position in [ms] (maximum value 1000 ms) |
DeadTimeCompensation | LREAL | Delay of the encoder position in [ms] (maximum value 1000 ms) |
VAR_OUTPUT
Variable name | Data type | Description |
|---|---|---|
Done | BOOL | Function block successfully completed |
Busy | BOOL | Function block is active |
Error | BOOL | An error has occurred in the function block |
ErrorID | WORD | Error number |
