Falcon Encoder Issue

How do you code the encoders on the Falcon 500? My team followed the CANcoder documentation but it still returns a value of 0.

EDIT: We are now getting an error message
“ERROR -3 CTR: CAN frame not received/too-stale. CANCoder 1 GetPosition”

The encoders on the Falcon’s are not CANcoders. Use it as you would get an encoder value from a TalonSRX. i.e. use getSelectedSensorPosition()


thank you :slight_smile:

Any chance you could share your code or direct me to your site? We just got Falcons this year and we are very inexperienced at PID control.

I would recommend reading the documentation regarding closed loop control with Talons (this applies to both TalonSRX and TalonFX).
And using the examples that are available in the example repository.

Thanks! Thats the clarification I was looking for as to how to treat these motors.

One more clarifying question, we define these using WPI_TalonFX - correct?

You can use either WPI_TalonFX or TalonFX. The WPI_ prefix allows you to use WPI classes such as DifferentialDrive with them. You can read up on it here.
Most examples use the non-WPI version. For an example that does, look at Differential Drive.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.