Use a Rev through bore encoder with CTRE MotionMagic

Our lead mentor would like to see if we can use a Rev through bore encoder on our arm pivot point, with our current Falcon/MotionMagic setup to move to position. It looks like this may be possible using this definition to configure the sensor, but I’m a little stuck with finding references on how to define the feedback device as the through bore sensor.

armPivot.configSelectedFeedbackSensor(FeedbackDevice.PulseWidthEncodedPosition, loopIDX, timeoutMS);

Any help would be appreciated.

I’m going to assume that you are using an AC motor for this. For the question of “defining” the motor, I am going to assume that you mean instantiating in code. I’m that case, and this might seem weird, but there is no “rev throughbore” class, but you would use wpilib’s prebuilt class for motor controllers (forgot the exact import) then use position control.

1 Like

For the TalonFXFeedbackSensor enum, you probably need to choose RemoteFilter0, and configure that in Phoenix tuner. If you wanted to do pid control with a WPILib class, you would use Encoder for quadtatture and DutyCycleEncoder for absolute (through bore encoder)