Skip to main content
Associate II
October 20, 2025
Solved

How to swap motor phases at runtime in MCSDK Firmware?

  • October 20, 2025
  • 1 reply
  • 193 views

We are using MCSDK 6.4.0 in Position Mode with a 3-Phase Motor with quadrature Encoder (only A+B phases, no Z Pin).

How can the motor phases be swapped at runtime in Software (U,V,W -> V,U,W), e.g. when the motor is connector is wired in the opposite direction (but the motor encoder is wired correctly)?

I know that i can set up the PWM Outputs in MC Workbench (as well as swap encoder pins), but i need a solution that can configure this at runtime without rebuilding the Project. 


I could not find a function for that (just feeding an inverted Position to MCI_ExecPositionCommand() does not take into account that the motor encoder is wired for an opposite direction as the motor phases).

If this is currently not possible, can you add this feature in a future release?

Best answer by GMA

Hello @StefanH1,

Thank you for your continued interest in our products.
We put significant effort into developing the best solutions we can provide. However, the current topology is considered static, and there are no plans to manage dynamic topology configuration.

1 reply

GMA
GMABest answer
Technical Moderator
November 3, 2025

Hello @StefanH1,

Thank you for your continued interest in our products.
We put significant effort into developing the best solutions we can provide. However, the current topology is considered static, and there are no plans to manage dynamic topology configuration.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA