Controllers detect which direction the encoder is rotating by comparing channels A and B to see which one comes first – this process is referred to as phasing. You can reverse phasing by swapping A and B channel. In doing so, you should also swap A- and B- channels.