Showing results for 
Search instead for 
Did you mean: 

Switching between Position Control and Speed/Torque Control in MC SDK

Associate II

I have a MC Workbench generated project for the NUCLEO-401 that's working great, running in position control mode.  Is it possible to switch in realtime between position control and torque/speed control?  I'd like to home my motor by applying a known torque into a pair of stops, but then switch to position control once I've established the "home positions" of my motor.  It looks like the speed/torque control component is sort of a subcomponent of the position control and this might be straightforward, but I thought I'd ask for the canonical solution before I go hacking on it myself.

Associate III

Hi @rsturmer-410 ,
I am trying to do something similar on an EVSPIN but the firmware is the same as yours.
Were you able to switch between the two modes in the same project/firmware?


Yes, I did eventually figure this out.  There are API calls to enable/disable the position control, and you can call the speed controller directly when the position controller is out of the loop.  If you still need more detail on this, let me know and I can give more specifics.


Hi @rsturmer-410 ,

I would appreciate it if you could share some examples to use the APIs you mentioned.