Encoder error cpr polepairs mismatch

I had a weird issue which also result in this error code. However the reason mine was doing it was because I mounted the encoder on a shaft that was being driven by the motor and to fix the problem I had to get a longer motor shaft and mount the encoder directly to the motor shaft. Which was weird because I had the exact same setup on another motor driving a different axis (where the encoder was mounted on a shaft being driven by the motor) and it worked fine. All timing pulleys were tensioned properly as well. But it all works now in the new configuration so all is good!

1 Like

Hey, this happened to me, and after examining my wiring, I discovered that some of them were not properly wired.

This fixed my issue as well. My Encoder was not aligned properly and whenever I entered closed loop control mode on that motor it would instantly skyrocket the Iq setpoint to my current limit and then throw an error. I have the output shown below where the first shows it working properly and the second code block shows it instantly skyrocketing.

Changed motor state for axis 0 to: 8
Iq Setpoint: -10.00, Iq Measured: -10.59
Iq Setpoint: -1.03, Iq Measured: -0.86
Iq Setpoint: 1.07, Iq Measured: 0.95
Iq Setpoint: 0.62, Iq Measured: 0.67
Iq Setpoint: 1.90, Iq Measured: 1.89
Iq Setpoint: 5.31, Iq Measured: 5.28
Iq Setpoint: 9.82, Iq Measured: 9.63
Iq Setpoint: 13.90, Iq Measured: 13.86
Iq Setpoint: 15.27, Iq Measured: 15.44
Iq Setpoint: 1.46, Iq Measured: 1.60
Iq Setpoint: 0.10, Iq Measured: 0.15
Iq Setpoint: -0.25, Iq Measured: -0.07
Iq Setpoint: -0.90, Iq Measured: -0.80
Iq Setpoint: 0.04, Iq Measured: -0.08
Iq Setpoint: -0.45, Iq Measured: -0.55

Changed motor state for axis 1 to: 8
Iq Setpoint: 0.00, Iq Measured: 0.03
Iq Setpoint: 0.00, Iq Measured: -0.02
Iq Setpoint: 0.00, Iq Measured: -0.03
Iq Setpoint: 0.00, Iq Measured: -0.01
Iq Setpoint: 0.00, Iq Measured: -0.02
Iq Setpoint: -13.84, Iq Measured: -12.06
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14
Iq Setpoint: -20.00, Iq Measured: -19.14

I know it is solved, but wanted to add this for anybody else who encounters a similar issue. Thanks for the help!