Using the Redline Encoder on the motor shaft of a Redline motor in quadrature mode. The encoder appears at first to be indicating correctly but loses it’s reference after one or more moves. We are using the motor through a 16:1 reduction. We should have 1024 counts X 16 per revolution of the output sprocket. On the first move we get to our target of approximately -30,000 counts but when we go the other way the drive goes to the stops. Manual operation of the lift from one position to the next and back to the start verifies large (10k plus) count errors. As an additional note we extended the cable by about 10 feet and suspect this may be an issue. Would we be in a better situation if we ran in PWM mode?
This would be where I would look first, there’s a large chance interference on this line is causing issues, especially if it’s near moving parts. Are you connecting the encoder to the roboRIO?Is it possible to either connect the encoder to a Talon or move the motor controller closer to the motor? If you can’t do any of these, one other option would be to use a CTRE CANifier.
Encoder is connected to the RoboRio DIO and the motor drives a chain sprocket. Depending on the position of one of two elevation stages it could be near moving parts. We are controlling the motor with a TalonSRX. I will take a look at that Talon connector pin-out and see how we might use it. We are between events and may be able to experiment with last years robot. The long cable extension is definitely near moving parts.