Motor Setup & CAN IDs
Now set up each device. Every device needs its own CAN ID and the correct configuration, so the software matches the hardware. You prove it by applying a volt or two and checking that the mechanism moves the correct direction. Get this wrong and tuning in the next lessons is impossible.
- The mechanism assembled and powered.
- Phoenix Tuner X connected to the CANivore over USB, firmware current.
- No robot program running. Tuner X owns the bus here.
What mechanism are you working on?
The lesson below is written for the one you pick. Switch back any time to read it for the other.
Assign every CAN ID
Factory Default resets inversion and every other setting, but it does not reset the CAN ID. If two devices flash together on a blink, they share an ID. Change one to any unused ID, give the other its number from the table, then come back to the first.
| Device | CAN ID | Device label |
|---|---|---|
| Arm TalonFX | 31 | Arm motor |
| Arm CANcoder | 32 | Arm encoder |
| Flywheel TalonFX | 21 | Flywheel motor |

- Open a device, click the three dots, then Factory Default.
- Press Clear Faults. This clears whatever the last session left behind.
- Click the Blink button on the left panel. The device that flashes is the one you are about to edit.
- Give it the ID from the table and a name that says which mechanism it drives.
- Repeat until every device has its own ID and Tuner X reports no duplicates.

A config change does nothing until you press Apply, the arrow icon above the config list. Its tooltip says "Apply and flash configs". That saves the configs onto the device. It does not touch the firmware.

Arm motor direction
Get the motor right first, by hand, before the encoder or any power. Factory Default reset its inversion, so you set it here.
- Select the arm TalonFX on
31and plot its position. - With the motor facing you, turn the arm counterclockwise by hand.
- The motor's position must go up. If it goes down, change
Invertedin the Motor Output config, press Apply, and repeat the hand test.
A motor and an encoder linked while they count in opposite directions break every lesson after this one. Do not move on until both go up together.
Arm encoder direction and zero
With the motor right, check the encoder the same way. It is what every downstream lesson uses.
- Open the CANcoder device in Tuner X and plot the position.
- With the motor facing you, turn the arm counterclockwise by hand.
- The CANcoder position must increase. If it decreases, flip the sensor direction, apply, and repeat the hand test.
- Put the arm to 0, based on the Unit Circle, then zero the CANcoder position.
- Turn it 90 degrees counterclockwise. Expect about
0.25rotations. A full turn reads1.0.
Positions are measured in rotations, not degrees. One full turn is 1.0. Counterclockwise with the motor facing you is positive, and every position target from here to Motion Magic is written that way. Every photo on this site is taken from that side, so your directions match ours.


Choose the reference with whoever builds the arm, and mark it if you can. If a CANcoder is ever replaced, redo this section on the new one.
Link the Encoder
The motor and the encoder have each been checked on their own. Now link them.
- Select the arm motor and scroll down in the config section to the Feedback section.
- Set the
Feedback Remote Sensor IDto match your CANcoder ID. - Set the
Feedback Sensor SourcetoRemoteCANcoder. - Press Apply. You should hear it chime.
Turn the arm counterclockwise by hand. The arm motor's position should now go up along with the CANcoder.

Leave Sensor To Mechanism Ratio at 1. The CANcoder sits on the output shaft, so it already reads the arm. With a Pro license you could pick FusedCANcoder or SyncCANcoder instead, and then Rotor To Sensor Ratio must be the gear reduction. If you ever change a ratio, do it before you tune, because it changes what every gain means. It is saved on the device, so Generate Code includes it.
Direction under power
This is the first time anything moves under power. Voltage Out sends a fixed voltage and nothing else: no target and no stopping at the end of travel.
You have checked the motor, the encoder and the link by hand. Now prove it under power: positive voltage has to turn the arm counterclockwise.
A flywheel has no sensor to agree with, so nothing on the bench decides which way positive goes. You decide, and then the motor has to match. The rule on this robot is that positive runs a game piece the way it is meant to travel, so on the shooter positive shoots. Seen from the motor side, that is clockwise. The motor is the only thing allowed to change from here.
Before you enable anything
Make sure the mechanism is clear of obstacles. Blink the device first: voltage goes to a CAN ID, not to the one you meant. Start at 1 volt and enable for about a second at a time. A Voltage Out request runs until you stop it.
- Select the arm TalonFX on
31flywheel TalonFX on21and set Control Mode toVoltageOut, the same request your code sends in Mechanisms. - Enter
1 Vunder Output (Volts), click DISABLED to enable the device, then disable after about a second. Watch the mechanism. - With the motor facing you, the arm should move counterclockwise, and the motor's position should go up.
- The wheel should spin the way it shoots, which is clockwise seen from the motor side.

If it turns clockwise, stop. Do not fix it here. One of the hand tests above was skipped or not applied, so go back and redo them.
If positive voltage turns it the other way, the motor is configured wrong. Fix Inverted in the motor's Motor Output config, apply, and test again.
Once 1 V is right, repeat at 3 V. Only the speed should change. An arm that will not budge at 1 V is usually fighting friction or gravity rather than bad wiring. Climb in single volts until it creeps, then stop. A wheel takes a moment to come up and coasts for a while after you disable, so give it time before you call the direction. You are checking which way it goes, not how fast.
The flywheel reads the motor's own sensor, so its positions and speeds are motor rotations. Setting Sensor To Mechanism Ratio in the Feedback configs to the gear reduction would make them, and the gains, read at the wheel. This course leaves it at 1 to keep things simple. If you do set it, set it before you tune, because it changes what every gain means. It is saved on the device, so Generate Code includes it.
Check your work
Power the bench down, bring it back up, and walk these checks in order.
You should see
- Blinking any ID flashes the device you expected.
- A volt or two moves the mechanism, and disabling stops it.
- Tuner X lists all devices on your mechanism, each with its own ID and a name.
- The arm reference reads about zero, and a quarter turn reads
0.25. - Turning the arm counterclockwise by hand raises both the motor and the CANcoder readings, and positive voltage on TalonFX 31 drives it the same way.
- Positive voltage on TalonFX 21 spins the wheel the way it shoots, clockwise from the motor side, and it spins down on its own once you disable.
PID tuning starts on the next page!
Check yourself
You blink one device from the Tuner X list and two devices on the bench flash together. What have you found?
With the motor facing you, you turn the arm counterclockwise by hand. What should CANcoder do?
What does setting the arm's zero do?
A CANcoder fails and somebody fits a new one. What has to happen?
The motor and encoder are linked, and at 1 volt the arm turns clockwise. What do you do?
At 1 volt the wheel spins counterclockwise, seen from the motor side. What do you change?
You enable at 1 volt for a second, and the wheel is still turning after you disable. What does that tell you?
Why blink the device before sending it any voltage?