Current Control Mode

January 4, 2025 Update -

Documentation for REVLib 2025 can now be found at: https://docs.revrobotics.com/revlib

Please bookmark our new page as we transition over and add more information there!

Current Control uses a PID controller to run the motor at a consistent current providing a consistent torque. The PID controller is run using the setpoint, in Amps, and the internally measured current draw.

It is called as shown below:

m_pidController.setReference(setPoint, CANSparkBase.ControlType.kCurrent);

API Docs: setReference

Current Control mode will turn your mechanism continuously and will speed up to maximum velocity if unloaded. Use caution when running this mode and avoid using it on mechanisms with a limited range of motion.

Last updated