I’m using a motor with
motor.controller = MotionControlType::torque;
and (when the motor is mechanically unloaded) trying to limit the free-running speed of the motor with changes to motor.velocity_limit inside loop.
This seems to make no difference. Is there a different approach that I should be taking ?
Hey, yes, you are right, voltage_limit will just limit the voltage, and therefore the torque.
But in the torque-voltage mode, this is all that is being controlled. There is no PID controller and no concept of velocity in the control. The sensor is used for closed loop, but only for the FOC level, to determine the current position in the electrical cycle.
But for an unloaded motor, in this control mode voltage is also proportional to velocity, within the physical limits of the motor.
To achieve what you want you need a more complicated control mode. In velocity mode, you can control the velocity while limiting the torque (by limiting the voltage) or in position mode you can set positions while limiting both velocity and torque.