what is your encoder pulse rate/ rev? When we First starting using them years ago, the pulse rate was too high for the software/computer to keep up. As Don noted earlier, eliminate mechanical slip, and then triple check software code. Have you marked the connector, encoder, and axle to visually see if it creeps?
