The CTRE ecosystem#
CTR Electronics (CTRE) makes some of the most common FRC motors and controllers. The Talon FX is the integrated motor-controller portion that drives the Kraken X60, the Kraken X44, and the (now effectively discontinued) Falcon 500 — these are integrated motors where the controller is built into the motor. They run on the CAN bus and use the Phoenix 6 software library plus the Phoenix Tuner X desktop app for configuration and diagnostics.
Install Phoenix 6 via VS Code's "Manage Vendor Libraries" using CTRE's vendordep URL.
Creating and configuring a Talon FX#
Phoenix 6 uses a declarative configuration model: build a configuration object and apply it.
TalonFX motor = new TalonFX(1); // CAN ID 1
TalonFXConfiguration config = new TalonFXConfiguration();
config.MotorOutput.NeutralMode = NeutralModeValue.Brake;
// Stator limit protects the mechanism; supply limit protects the breaker/battery
config.CurrentLimits.StatorCurrentLimit = 80;
config.CurrentLimits.StatorCurrentLimitEnable = true;
config.CurrentLimits.SupplyCurrentLimit = 40;
config.CurrentLimits.SupplyCurrentLimitEnable = true;
motor.getConfigurator().apply(config);
Key idea: you get the device's configurator with getConfigurator() and call apply(...).
Control requests#
To command the motor you create a control request object and pass it to setControl(...):
// Simple open-loop: percent output via duty cycle
final DutyCycleOut openLoop = new DutyCycleOut(0);
motor.setControl(openLoop.withOutput(0.5)); // 50% output
This request-based design replaces the older "set mode then set value" style and makes advanced features (current limits, motion overrides) explicit.
Built-in closed-loop control#
A major advantage of the Talon FX is that PID and feedforward can run on the motor controller itself (faster than the roboRIO's 50 Hz loop). You configure gains in a Slot0Configs and use control requests like VelocityVoltage or PositionVoltage. Note that Phoenix 6 works in rotations and rotations per second by default:
Slot0Configs slot0 = new Slot0Configs();
slot0.kP = 4.8; // proportional
slot0.kI = 0;
slot0.kD = 0.1;
slot0.kS = 0.25; // static friction feedforward (volts)
slot0.kV = 0.12; // velocity feedforward (volts per rps)
motor.getConfigurator().apply(slot0);
// Spin to 50 rotations/second using on-board velocity control
final VelocityVoltage velReq = new VelocityVoltage(0);
motor.setControl(velReq.withVelocity(50));
For smooth point-to-point moves, CTRE provides Motion Magic (its on-board motion profiling), commanded with MotionMagicVoltage.
Sensors and a gotcha#
The Talon FX has a built-in encoder you read with motor.getPosition() and motor.getVelocity() (these return Phoenix 6 StatusSignal objects; call .getValueAsDouble() for the number). Note: the Talon FX does not have screw terminals for hardware limit switches — instead you use limit configs/overrides on the control request, or wire a CANcoder (CTRE's CAN magnetic encoder) as a remote sensor.
Phoenix Tuner X#
Use Phoenix Tuner X to assign CAN IDs, update firmware, run self-tests, plot signals, and field-calibrate. Assigning unique CAN IDs to every device is essential — duplicate IDs cause silent, confusing failures.
the part worth keeping
Key takeaways
- The Talon FX controller drives the Kraken X60, Kraken X44, and legacy Falcon 500 over the CAN bus.
- Phoenix 6 is declarative: build a TalonFXConfiguration and getConfigurator().apply(it).
- Command motors with control requests via setControl() (e.g., DutyCycleOut, VelocityVoltage); units are rotations and rotations/second.
- PID + feedforward can run on the controller via Slot0Configs; Motion Magic adds on-board profiling.
- Talon FX lacks screw-terminal limit switches — use limit configs/overrides or a CANcoder; manage CAN IDs in Phoenix Tuner X.
Programming, Controls & SensorsMotors, Sensors, and Closed-Loop Controllesson 1 of 4
Keep going
Take the quiz+10 XP with an accountMore in Motors, Sensors, and Closed-Loop Control
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- v6.docs.ctr-electronics.comPhoenix 6 Documentation
- v6.docs.ctr-electronics.comTalon FX Closed-Loop Control Requests
- v6.docs.ctr-electronics.comPhoenix 6 Configuration
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 18 min readCTRE Phoenix for FRC: Kraken X60/X44, TalonFX, Phoenix 6, CANcoder & Pigeon 2A practical guide to the CTRE Phoenix ecosystem for FRC: Kraken X60/X44 motors, TalonFX, Phoenix 6 API, Pro/FOC licensing, CANcoder, Pigeon 2 & CANivore./blogread it
- 8 min readFRC Motors Compared: NEO vs Kraken X60 vs Falcon 500 vs NEO VortexCompare FRC brushless motors: REV NEO, NEO Vortex, Kraken X60, and Falcon 500. Exact specs, FOC explained, and which motor to pick for drivetrain vs mechanisms./blogread it
answer sheet
Lesson quiz
All 4 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 4 answered
01In the CTRE Phoenix 6 ecosystem, what role does the Talon FX play with the Kraken X60, Kraken X44, and Falcon 500?
02Under Phoenix 6's declarative model, how do you set up a Talon FX before running it?
03The Talon FX has no screw terminals for hardware limit switches. What should you do instead to implement limit switch functionality?
04By default, what units does the Phoenix 6 API use for Talon FX position and velocity?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event