Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Encoders with CANTalons (http://www.chiefdelphi.com/forums/showthread.php?t=133940)

Poseidon5817 03-02-2015 20:07

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.

Ben Wolsieffer 03-02-2015 20:22

Re: Encoders with CANTalons
 
Are you able to control the Talon at all? What exactly happens when you try use those methods?

ozrien 03-02-2015 20:37

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.

Poseidon5817 03-02-2015 21:07

Re: Encoders with CANTalons
 
Some of the methods return nothing, some fluctuate within a couple integers 98-102

ozrien 03-02-2015 21:15

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.

ozrien 03-02-2015 21:21

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?

Poseidon5817 03-02-2015 21:23

Re: Encoders with CANTalons
 
Quad encoders. EDIT: Solved, encoder was bad.


All times are GMT -5. The time now is 22:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi