CTR Electronics Phoenix Pro User manual

Phoenix Pro
CTR Electronics
May 19, 2023


Intro
1 Why Phoenix Pro? 3
2 Installing Phoenix Pro 5
3 Conguring your Device 9
4 Device Licensing 11
5 Phoenix Tuner X 17
6 TalonFX 45
7 Pigeon 2.0 47
8 CANcoder 51
9 API Usage 55
10 Simulation 101
11 WPILib Integration 105
12 Examples 109
13 CANivore Intro 115
14 CANivore Setup 117
15 CANivore API 123
16 Hardware-Attached Simulation 125
17 Advanced Conguration 127
18 Troubleshooting 131
19 Support 135
i

ii

Phoenix Pro
Welcome to the Phoenix Pro documentation. Individuals looking for Phoenix 5 documentation
may locate it here.
The Phoenix Pro software framework allows you to control and congure your CTR Electronics
Phoenix Pro Devices. Phoenix Pro represents a complete rewrite of the software framework
over the existing Phoenix 5 framework. With Phoenix Pro, users have access to many new
features that expand the control the user has over their devices.
Important: User’s looking for documentation on the Phoenix 6 API can nd that on the
latest version of this site.
CTR Electronics Blog For news and updates about your CTR Electronics device, please check
out our blog.
Changelog A changelog containing API, Tuner and Firmware changes is
available here.
Migration Guide A Phoenix 5 migration guide is available here.
Installation Installation instructions for Phoenix API & Tuner.
Phoenix Tuner Documentation that introduces the companion application to
manage your CTR Electronics devices.
Hardware Reference Documentation for device specic conguration, trou-
bleshooting and setup instructions.
API Reference Documentation and details on using the CTR Electronics device API. This
includes usage of signals, congs, control requests, etc.
Examples Software API examples for controlling your devices.
Troubleshooting Common troubleshooting for hardware or software problems.
1

Phoenix Pro
2

1
Why Phoenix Pro?
Phoenix Pro currently oers the following features and will further expand.
1.1 Comprehensive API
• Device signal getters return a StatusSignalValue object, expanding the functionality of
status signals.
• Control devices with an extensive list of exible, strongly-typed control request objects.
1.2 Canonical Units
• Uses the popular Units library for C++ and standardizes on SI units.
• Signals are documented with the unit type and the minimum and maximum values.
1.3 Time Base Synchronization
• Using CANivore Timesync, signals from all devices are sampled and published to the
CAN bus at the same time.
• API can synchronously wait for data from multiple devices on a CANivore to arrive.
3

Phoenix Pro
1.4 Field Oriented Control (FOC)
• ~15% increase in peak power.
• Increased torque output; faster acceleration and higher speeds under load.
• Greater eiciency; the motor draws less current for the same output power, increasing
battery life.
• Support for direct torque control.
1.5 Improved Device Control
• New and improved control output types and closed-loop conguration.
• Improved Motion Magic® with jerk control and support for modifying the prole on the
y.
• Kalman-based algorithms to reduce latency while maintaining smooth data.
•Fuse a CANcoder with the motor’s internal rotor, getting absolute data all the time while
using the fast internal sensor for closed looping.
1.6 Enhanced Support for CAN FD
• Improved CAN FD framing further reduces any CAN bus utilization issues.
• Larger CAN frames allow for the addition of more advanced features.
1.7 New Tuner X Self Tests
• Detailed and resolute self tests to improve debugging.
1.8 Free High-Fidelity Simulation
• Simulation closely follows the behavior of real hardware.
• Write unit-tests for your robot code, and make sure the robot works before deploying.
•Try Phoenix Pro before you buy!
4 Chapter 1. Why Phoenix Pro?

2
Installing Phoenix Pro
Installation of Phoenix Pro is comprised of a few steps
•Installing API
•Installing Tuner
•Updating Device Firmware
•Device Licensing
2.1 API Installation
Phoenix Pro currently supports Java and C++ for development.
2.1.1 System Requirements
The following targets are supported:
• NI roboRIO
• Windows 10/11 x86-64
• Linux x86-64 (desktop)
–Ubuntu 22.04 or newer
–Debian Bullseye or newer
• Linux ARM32 and ARM64 (Raspberry Pi, NVIDIA Jetson)
–Ubuntu 20.04 or newer
–Debian Bullseye or newer
• macOS (regular simulation only)
5

Phoenix Pro
2.1.2 Oine
Important: Users on non-Windows devices should skip to the Online installation instruc-
tions.
1. Download the Phoenix Framework Installer
2. Navigate through the installer, ensuring applicable options are selected
3. Apply the vendordep via WPILib VSCode Adding Oine Libraries
2.1.3 Online
FRC (Pro Only)
Important: This vendordep is for robot projects that are only using Phoenix Pro licensed
devices.
Paste the following URL in WPILib VS Code Install New Libraries (Online)
•https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/
PhoenixPro-frc2023-latest.json
6 Chapter 2. Installing Phoenix Pro
Table of contents

















