We are running closed loop control on a Falcon 500 but would like to switch the sensor feedback to an external quadrature encoder connected to 2 DIO ports on the roboRio (which itself is declared as an Encoder object).
Looking through the CTRE Java API I cannot find a RemoteFeedbackDevice that accepts an encoder object from the roboRio, only a Canifier or some other CAN-based modules such as a pigeon.
Is it actually possible to provide feedback to a TalonFX closed loop controller via roboRio-derived feedback inputs, or is this only possible through directly integrated sensors or external sensors connected to the CAN bus?
There’s really no reason to run control on the Talon if the signal is coming from the RIO; you’re already gated by the RIO update rate in that case (the Talon cannot directly read from the FPGA, so you’re stuck waiting for the main RIO thread to read the sensor anyway).
The Canifiers are out of stock and the F500 doesn’t have data breakout pins, so is there any other way to feed the TalonFX data from this external encoder?
Why are you trying to feed the TalonFX data from the external encoder? Why can’t you just run closed loop control on the RoboRIO? As Oblarg said above, you don’t get the benefits of on-motor-controller PID if you want to use an external quadrature encoder.
I was trying to avoid the additional software dev/test time of regenerating motion profiling and motion magic on a roboRio based control loop in time for an upcoming offseason competition, figuring there was an easy way to swap to an external encoder on a non-slippable driven shaft, but it sounds like doing this dev on the roboRio would be necessary. I’ll start looking into the TrapezoidProfile class.
Only 2 more hours of shop time available before next event so we will have to stick to just using periodic setPosition commands from the external encoder to keep things aligned.