Log in

View Full Version : Talon SRX / VersaPlanetary encoder parameters?


mhaeberli
09-03-2016, 00:42
Hi!

We are trying to figure out how to use and configure Talon SRX with VexPro VersaPlanetary encoder on a 63:1 gearbox.
We're running it directly to the Talon SRX with the weird special cable...
We already (think) we figured out that we have to call either of:

talonSRX.SetSensorDirection(true);
talonSRX.SetClosedLoopOutputDirection(true);

But can find no documentation on what, if anything, to do with:

talonSRX.ConfigEncoderCodesPerRev();

Some documentation claims that the right thing happens, magically, without setting this value.

Another document suggests that the actual value is 1024.

And, only when we call:

talonSRX.ConfigEncoderCodesPerRev(1024);

Do results seem sort of reasonable.

Suggestions welcome.

Thanks,

Martin Haeberli
(de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT)

wsh32
09-03-2016, 00:48
You should call talon.setFeedbackDevice(FeedbackDevice.CtreMagEnco der_Absolute); (or CtreMagEncoder_Relative depending on how you want to use it). Setting the feedback device to the CTRE Mag Encoder presets all the settings so you don't need to call the configEncoderCodesPerRev.

ozrien
09-03-2016, 09:05
Checkout section 17.2 in the talon srx software reference manual.