LogoLogo
REVLib Docs
  • REV ION Brushless
  • Quick Links
  • Frequently Asked Questions
  • NEO Brushless Motors
    • Brushless DC Motor Basics
    • NEO Vortex
      • Docking a SPARK Flex
      • Vortex Shafts
      • Installing a Shaft
      • NEO Vortex Solo Adapter
    • NEO V1.1
      • NEO V1
      • Pinion Pressing Guides
    • NEO 550
      • Pinion Pressing Guide
    • Dynamometer Testing
    • Motor Comparison
  • SPARK Flex Motor Controller
    • SPARK Flex Overview
      • SPARK Flex Dock
    • SPARK Flex Specifications
    • SPARK Flex Feature Description
      • Power and Motor Connections
      • Control Connections
      • Data Port
      • Mounting Holes
      • Control Interfaces
      • Mode Button
      • Operating Modes
    • SPARK Flex Getting Started
      • Wiring the SPARK Flex
      • Make it Spin!
      • Basic Configurations
    • SPARK Flex Status LED Patterns
    • SPARK Flex Troubleshooting
    • SPARK Flex Operating Modes
  • SPARK MAX Motor Controller
    • SPARK MAX Overview
    • SPARK MAX Specifications
      • Power and Motor Connections
      • Control Connections
      • Encoder Port
      • Data Port
    • SPARK MAX Getting Started
      • Wiring the SPARK MAX
      • Make it Spin!
      • Basic Configurations
    • SPARK MAX Status LED Patterns
    • SPARK MAX Troubleshooting
    • SPARK MAX Operating Modes
    • SPARK MAX Control Interfaces
    • SPARK MAX Configuration Parameters
    • Using Encoders with the SPARK MAX
      • Absolute Encoders
      • Alternate Encoder Mode
      • Securing the Encoder Adapters
      • Calibration for MAXSwerve
  • REVLib
    • REVLib Overview
      • REVLib Changelog
      • Migrating to REVLib 2025
    • Closed-Loop Control Overview
      • Closed Loop Control Getting Started
      • Getting Started with PID Tuning
      • Position Control Mode
      • Velocity Control Mode
      • Current Control Mode
      • Smart Motion Control
      • Smart Velocity Control
    • Code Examples
    • Migrating to REVLib
    • Device Firmware Changelogs
  • Tips and Tricks
    • Anderson Powerpole Connectors
    • REV Hardware Client Documentation
  • Legacy Documentation
    • SPARK Motor Controller
    • SPARK MAX Client
      • Navigating the SPARK MAX Client
      • Updating Device Firmware
      • Recovery Mode with the SPARK MAX Client
      • SPARK MAX Client Troubleshooting
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. REVLib
  2. Closed-Loop Control Overview

Smart Velocity Control

PreviousSmart Motion ControlNextCode Examples

Last updated 4 months ago

Was this helpful?

January 4, 2025 Update -

Documentation for REVLib 2025 can now be found at:

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

The Smart Velocity control mode utilizes the to improve upon velocity control. Honoring the maximum acceleration, Smart Velocity will speed up and slow down your flywheel or rotary mechanism in a controlled way, reducing power draw and increasing consistency.

It is called as seen below:

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

API Docs:

m_pidController.SetReference(SetPoint, rev::CANSparkBase::ControlType::kSmartVelocity);

API Reference:

Smart Velocity Control mode will turn your motor continuously. Be sure your mechanism does not have any hard limits for rotation.

https://docs.revrobotics.com/revlib
setReference
SetReference
This graph was generated with a very slow acceleration to better show the motion, the wobbles at low speed can be minimize by increasing your acceleration.
Smart Motion parameters