|
Re: CAN Talon Encoder
We are trying to read the encoder value by calling leftMotor.getPosition or leftMotor.getEncPosition, both returned zero while the motor is running. Is there a trick to do this? Did I miss some sort of configuration to "enable" encoder on the CANTalon? I hooked the encoder wires to +5V, A, B and GND of the Talon. We are not using the breakout board (they are out-of-stock). We spliced the ribbon cable to a 8-pin molex connector. Encoder should have +5V on pin 2, A on pin 7, B on pin 5 and GND on pin 10. I assume the red wire on the ribbon is pin 1. I checked with a volt meter that pin 2 and pin 10 is indeed 5V to GND. So it means I did not flip the connector backward. In code, aside from instantiate the CANTalon motor controller, the only call we made is to leftMotor.setFeedbackDevice(CANTalon.FeedbackDevic e.QuadEncoder). I am thinking we may not even have to do that if we call getEncPosition. But we set the feedback device anyway so we can also call getPosition. But somehow both calls returned zero. Any help is appreciated.
BTW, everybody said there is new beta firmware for the Talon SRX but nobody seems to know where to download it. A link to it would be nice.
Thanks.
__________________
Last edited by mikets : 06-02-2015 at 03:51.
|