Hi, we have two motors that need to be kept in perfect sync using software. From our testing, setting a motor as a follower uses PWM rather than encoders to keep the motors in sync, which won’t work as the motors each have slightly different resistance and load on them. The best option seems to be using Position Control Mode with PID and encoder outputs, but I’m not sure on how to do this.
Thank you!
You make one Talon a master and it runs a primary PID based on the addition of the encoders of both motors. That master then runs an Auxiliary PID and it’s setpoint will be the difference of the encoders. So you set the set-point of main PID to the encoder position you want to go to the and the set-point of the auxiliary PID to zero (no encoder differences). Then you set the other Talon as an AUXFollower.
If you are a Java team I think this is the relevant CTRE example…
Thank you so much! This code has been super helpful and has kept the encoders really close, although they are slightly off, and not compensating based on each other.
We’re trying other methods of writing this, and one area of confusion is what each of the control modes does and exactly how it behaves and sets the motor. They aren’t explained in the Talon API.
Could you explain the differences between each of the Talon control modes (PercentOutput, Position, Velocity, Current, MotionProfile, MotionMagic, MotionProfileArc)?
Thank you!
Here is a link to the table that has a brief primer as to each of them and what they are.
For further details, you need to do some more reading.
That PDF contains some better explanations of each mode overall.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.