How do I adjust the gear ratio from my Codesys programme?

Using the SMC_ChangeGearingRatio function block, the gear ratio and drive type can be changed from within the programme.

Overbrengingsverhouding_ChangeGearing_ratio

After execution, the axis must be restarted using SMC3_ReinitDrive to ensure that all variables are initialised correctly.