Has anyone used the COTS Andymark swerve module with a CIM as drive and a PG motor and encoder to turn? I am having trouble figuring it out using the PG Encoders. If anyone can help me out that would be appreciated.
And we already have a comp bot, just trying to get this working for next year
Basically, the quad encoder is fine to use during the match, but you should use an absolute encoder to “zero” the quad encoder’s position. If you do PID calculations on the RoboRIO, then you might as well not even use the quad encoder. The quad encoder is nice to use with a Talon SRX’s onboard PID control.
I’m not sure if the quad encoders on the PG motors vary in encoder counts per revolution or if the gear ratios on the Andymark swerve modules have varied year to year. Most of the time I find that turning the wheel 360 degrees is 1657 encoder counts, but one year it was 628 encoder counts. You can use Phoenix Tuner to see the encoder counts if you have the quad encoder plugged into a breakout board on the Talon SRX. There’s many different ways to plug in the quad encoder, that’s just the way we did it.
What are you having problems with exactly? Were you able to see the encoder counts go up/down?