Skip to content

Lesson 5.9: Vendor Documentation Deep Dive

🎯 What You’ll Learn

By the end of this lesson you will be able to:

  • Navigate the CTRE Phoenix 6 documentation to find motor controller APIs and configuration options
  • Navigate the REV Robotics documentation for SPARK MAX and SPARK Flex controllers
  • Understand the difference between vendor APIs and WPILib APIs
  • Find and read vendor example projects to learn implementation patterns
  • Look up specific motor controller features (current limits, status signals, follower mode)

Why Vendor Docs Matter

In Unit 4, you learned to navigate WPILib documentation. WPILib provides the framework (subsystems, commands, schedulers), but the actual motor controllers and sensors on your robot come from vendors like CTRE and REV Robotics. Each vendor has their own API, their own documentation, and their own configuration tools.

Your team’s robot uses CTRE hardware extensively — TalonFX and TalonFXS motor controllers, Pigeon 2 gyro, and CANcoders. Understanding the Phoenix 6 documentation is essential for configuring, tuning, and debugging these devices.

VendorDocumentation SiteHardware on Your Robot
CTRE Phoenix 6v6.docs.ctr-electronics.comTalonFX, TalonFXS, Pigeon 2, CANcoder
REV Roboticsdocs.revrobotics.comSPARK MAX, SPARK Flex (if used), color sensors

CTRE Phoenix 6 Documentation

Phoenix 6 is CTRE’s latest API for controlling TalonFX (Falcon 500 / Kraken X60) and TalonFXS motor controllers. It’s a significant upgrade from the older Phoenix 5 API, with better performance, cleaner syntax, and more features.

Documentation Structure

The Phoenix 6 docs are organized into these key sections:

SectionWhat It CoversWhen to Use It
Getting StartedInstallation, vendordep setup, basic configurationFirst time setting up Phoenix 6 in a project
API ReferenceEvery class, method, and configuration optionLooking up specific method signatures and parameters
Device ConfigurationMotor output, current limits, soft limits, sensor configConfiguring a motor controller for a specific mechanism
Control RequestsDutyCycleOut, VelocityVoltage, PositionVoltage, MotionMagicChoosing and using the right control mode
Status SignalsReading sensor data (position, velocity, current, temperature)Getting data from motor controllers for logging or control
ExamplesComplete example projects for common use casesLearning how to implement a specific feature

Connecting Phoenix 6 to Your Code

Your team’s code uses Phoenix 6 throughout. Let’s connect the docs to real code:

Motor Configuration: Open ShooterSubsystem.java and look for TalonFXConfiguration. This is where motor settings like current limits, PID gains, and neutral mode are configured. The Phoenix 6 docs explain every field in this configuration object.

Control Requests: When your code calls motor.setControl(new VelocityVoltage(targetRPS)), it’s using a Phoenix 6 control request. The docs explain each control request type:

Control RequestWhat It DoesExample Use
DutyCycleOutSimple percent output (-1.0 to 1.0)Intake rollers, basic mechanisms
VelocityVoltageClosed-loop velocity control with voltage compensationShooter flywheels
PositionVoltageClosed-loop position controlTurret aiming
MotionMagicVoltageSmooth position control with trapezoidal motion profilingElevator, arm positioning

Status Signals: When your code reads motor.getVelocity().getValueAsDouble(), it’s using a Phoenix 6 status signal. The docs explain signal latency, refresh rates, and how to optimize signal reads.


Your team's shooter uses VelocityVoltage control to maintain flywheel speed. You want to add a feedforward term to improve spin-up time. Where in the Phoenix 6 docs would you find how to configure feedforward?


REV Robotics Documentation

If your team uses any REV hardware (SPARK MAX, SPARK Flex, color sensors), the REV docs are your reference.

Key REV Documentation Sections

SectionWhat It Covers
SPARK MAX/Flex User GuideHardware setup, wiring, LED status codes
REVLib APIJava/C++ API for controlling SPARK controllers
REV Hardware ClientDesktop tool for configuring and testing REV devices
ExamplesCode examples for common SPARK configurations

REV vs CTRE: Key Differences

AspectCTRE Phoenix 6REV REVLib
ConfigurationTalonFXConfiguration object applied with configurator.apply()SparkMaxConfig with individual setter methods
Control modesControl request objects (VelocityVoltage, etc.)set() method with control type parameter
Sensor readingStatus signals with getValueAsDouble()Direct getter methods (getEncoder().getPosition())
Follower modesetControl(new Follower(masterID))follow(masterSpark)
DiagnosticsPhoenix Tuner XREV Hardware Client

Finding and Using Vendor Examples

Both CTRE and REV provide example projects that demonstrate common patterns. These are invaluable when you’re implementing a new feature.

Where to Find Examples

  • CTRE Examples: github.com/CrossTheRoadElec/Phoenix6-Examples — organized by language (Java, C++, Python) with examples for each control mode
  • REV Examples: Linked from the REV documentation site and available in the REVLib GitHub repository

How to Use a Vendor Example

  1. Find the example that matches your use case (e.g., “VelocityClosedLoop” for a shooter)
  2. Read the example’s README — it explains what the example demonstrates
  3. Study the configuration — how do they set up the motor controller?
  4. Study the control loop — how do they command the motor?
  5. Adapt, don’t copy — take the pattern and apply it to your subsystem’s structure

Say you find the Phoenix 6 “VelocityClosedLoop” example. It shows:

// From the example:
var config = new TalonFXConfiguration();
config.Slot0.kP = 0.11;
config.Slot0.kI = 0.0;
config.Slot0.kD = 0.0;
config.Slot0.kV = 0.12;
motor.getConfigurator().apply(config);
// To command velocity:
motor.setControl(new VelocityVoltage(targetRPS));

To adapt this for your shooter, you’d:

  1. Use your team’s PID values from Constants.java instead of the example values
  2. Apply the configuration in your ShooterSubsystem constructor
  3. Use the VelocityVoltage control request in your setTargetRPM() method
  4. Keep your existing subsystem structure — just update the motor control approach

Vendor Docs Lookup Workflow

When you encounter a vendor-specific question, follow this workflow:

  1. Identify the vendor — Is it a CTRE device (TalonFX, Pigeon, CANcoder) or REV device (SPARK MAX/Flex)?
  2. Go to the right docs — Phoenix 6 docs for CTRE, REV docs for REV
  3. Search for the feature — Use the docs search bar with specific terms
  4. Check the API reference — For exact method signatures and parameters
  5. Look for examples — Vendor examples show the recommended implementation pattern
  6. Test on a branch — Never change motor configuration on main without testing

Checkpoint: Vendor Documentation
Open the CTRE Phoenix 6 documentation (v6.docs.ctr-electronics.com). Find the page about current limits for TalonFX. Answer: (1) What are the two types of current limits available? (2) How would you apply a 40A supply current limit to a motor in your team's code? (3) Why would you want to limit current on a mechanism like the intake?

Good answers include:

  1. Two types: Supply current limit (limits current drawn from the battery) and stator current limit (limits current through the motor windings). Supply limits protect the battery and breakers; stator limits protect the motor and mechanism.

  2. Applying a limit: In the TalonFXConfiguration object, set config.CurrentLimits.SupplyCurrentLimit = 40 and config.CurrentLimits.SupplyCurrentLimitEnable = true, then apply with motor.getConfigurator().apply(config).

  3. Why limit intake current: If the intake jams (game piece stuck, mechanism hits something), the motor will draw excessive current trying to push through. A current limit prevents the motor from overheating, tripping the breaker, or damaging the mechanism. It also prevents brownouts that could affect other subsystems.


Key Terms

📖 All terms below are also in the full glossary for quick reference.

TermDefinition
Vendor LibraryA third-party library (like CTRE Phoenix 6 or REV REVLib) that provides APIs for controlling specific hardware devices
Control RequestA Phoenix 6 object that specifies how a motor should be controlled (e.g., VelocityVoltage for closed-loop velocity)
Status SignalA Phoenix 6 mechanism for reading sensor data from motor controllers, with configurable refresh rates and latency compensation
VendordepA vendor dependency file (JSON) in the vendordeps/ folder that tells the build system to include a vendor library
Current LimitA motor controller configuration that restricts the maximum electrical current to protect hardware and prevent brownouts

What’s Next?

You now know how to navigate vendor documentation for the hardware on your robot. In Activity 5.10: Use a Vendor Example, you’ll find a vendor example project, study its implementation, and adapt a pattern from it for one of your team’s mechanisms.