Skip to main content

Encoder Axis

Encoder axes are used to convert encoder values to a SoftMotion axis which can be used as a master axis for MC_CamIn, MC_GearIn, and other Master/Slave function blocks.

Encoder axes can represent additional encoders from drive units. In this case, they are configured as special encoder axes under fieldbus devices in the device tree. Alternatively, free encoders in the General Axis Pool could also use analog inputs as encoder axes.

For more information, see: Free Encoder

. Properties
  • Similar to logical axes, encoder axes are "read-only". They only provide the position and velocity values. No movements can be commanded on them.

  • The axis state of encoder axes is always standstill.

    This is the state of PLCopen for Motion Control Part 1 which matches best. According to the statechart, this state means that the axis is ready and there is no error. Moreover, none of the movements commanded by the PLC is active on the axis.

    Important

    Note that before CODESYS SoftMotion version 4.18.0.0 the encoder axes were in the state power_off. However, when MC_Power was called for them, they were in a state standstill.

  • The zero position of the encoder axis can be offset with MC_SetPosition.

  • Master/Slave function blocks always use the actual values of the encoder axis.

  • A logical axis below the encoder axis can be used for dead-time compensation.

Tip

When using encoder axes, it is not necessary to call MC_Power, and it makes no difference to the behavior of the encoder axis for CODESYS SoftMotion version 4.18.0.0 and higher.