When I use the quadrature encoder output on the RT-Box and the motor is spinning in the negative direction I occasionally get glitches on the output when the speed changes. During steady state there isn’t a problem. The configuration has 200 line pairs, B follows A, and theta = 0 when A = 1 + B = 1 + I = 1. The test is to change the speed between 15krpm to 30krpm or vice versa. One further complication is that we have 4 index pulses. It is actually multiplying the angle by 4, using mod by 2*pi to get a new angle.
Somewhere in the speed transient I get the image attached.
The problem is not present with positive speeds, so it appears connected to the angle decreasing.