Help: Resetting CAN Talon SRX Magnetic Encoders?

Hi,
My team is using the Magnetic Encoders that integrate with the CAN Talon SRX’s this year. I am able to read their values just fine, but I can’t seem to find a way to “reset” the value to zero. Also, it doesn’t seem to reset on bootup, but I don’t know if it’s actually supposed to.

A list of what I’ve tried thus far:

motorL1.setPosition(0); <— No effect.
motorL1.setEncPosition(0); <— Also no effect.
motorL1.reset(); <— No effect again.

Is there some obvious way of zeroing these things that I’m missing?

Lanuage: Java, Command Based.

Make sure firmware is updated in Talon. setPosition() is correct (section 13.1 - talon srx software reference manual).

How do you know it’ s not zero? Check the self-test.

setPosition() requires you to select the feedback type (Section 7).

Hi,
Thanks! selecting the feedback type worked. We have another issue now, with the built in PID system, though. We meet the requirements for measurement in rotations, but while in position mode, using set(2.56) does not drive for 2.56 rotations. In fact, using set(1000) and set(10) drives the motor the same roughly six inch distance. I have used debug statements and confirmed that the setpoint is actually being set, which it is. Am I missing something?

Thanks

1 Like