Link

Motion control

Choose the motor type:

BLDC motors Stepper motors

Choose the voltage control type:

Position control Velocity control Torque control

SimpleFOClibrary gives you the choice of using 3 different Closed-Loop control strategies:

You set it by changing the motor.controller variable. If you want to control the motor angle you will set the controller to MotionControlType::angle, if you seek the torque of the BLDC or Stepper motors either through voltage or the current use MotionControlType::torque, if you wish to control motor angular velocity MotionControlType::velocity.

// set FOC loop to be used
// MotionControlType::torque
// MotionControlType::velocity
// MotionControlType::angle
motor.controller = MotionControlType::angle;

For more information about the source code implementation of the motion control strategies check the library source code documentation