|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Encoders with CANTalons
We are trying to use an encoder on our elevator gearbox. It is plugged through the top port into a Talon on CAN with a breakout board. How do I access this? getEncPosition, getSpeed, and getAnalogInputPosition all don't work when called on the CANTalon object.
|
|
#2
|
|||
|
|||
|
Re: Encoders with CANTalons
Are you able to control the Talon at all? What exactly happens when you try use those methods?
|
|
#3
|
||||
|
||||
|
Re: Encoders with CANTalons
I'm not sure what "don't work" means, BUT you should first try to grab the value in the RIO web-based config page (see Talon srx software ref manual - section 2.4). That way you can quickly figure out if it's a wiring issue or a programming issue.
|
|
#4
|
||||
|
||||
|
Re: Encoders with CANTalons
Some of the methods return nothing, some fluctuate within a couple integers 98-102
|
|
#5
|
||||
|
||||
|
Re: Encoders with CANTalons
Well getAnalogInputPosition() will return ~100 since you likely have nothing connected to the analog input. Please read section 16.21 in the Talon SRX Software Reference Manual.
If GetEncoder() is returning zero then you should check the self-test to see what's up (Section 2.4 in the Talon SRX Software Reference Manual). getSpeed/getPosition requires you to select which type of feedback you are using. Please see Section 7 and Section 5.3 for the java examples in the Talon SRX Software Reference Manual. |
|
#6
|
||||
|
||||
|
Re: Encoders with CANTalons
If you are using analogEncoders be sure to update the Talons to 1.4 (see section 21.13 for the fix).
EDIT:But at a minimum update to at least 1.1 (section 2.3 in Talon SRX Software reference manual, and also FRC rule R59). I just assumed you were using quad encoders but now realize that might not be true. Which breakout are you using? Last edited by ozrien : 03-02-2015 at 21:25. |
|
#7
|
||||
|
||||
|
Re: Encoders with CANTalons
Quad encoders. EDIT: Solved, encoder was bad.
Last edited by Poseidon5817 : 03-02-2015 at 22:12. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|