I am trying to use the encoder which is wiried to the Talon SRX to stop a motor at certain positions but don’t know where to start in the program. Any ideas?
Post a picture showing how it is wired.
Since the encoder is wired to the Talon I assume your using CAN and the Talon’s have the 5V Analog Breakout (or something similar).
I’m not sure if you’re goal is to…
1-servo the motor’s position using a closed-loop
2-just make the motor stop at a certain limit (soft-limit)
3-or if you want to grab the analog position yourself and decide to change the Talon’s throttle.
Checkout the Talon SRX Software Reference manual for all three.
For 2 checkout Section 8 Soft.limits. and section 7 selecting the feedback device.
For 3 checkout section 5.
For 1 you’ll have to read up on several sections including selecting the sensor, specifying the closed-loop params, reversing the sensor if need be.
Be sure to update your Talon to firmware 1.4