I am in possession of an incremental encoder, mounted on the shaft of an electrical machine. The encoder gives 1000 ppr. From the manual I read that it was a good idea to configure timer 3 in incremental interface mode. Also I configured it to trigger on any transition of T3IN only. Signal A from the encoder is physically coneceted to input port 3.4, and signal B to port 3.6. With the current software implementation I am able to relate counter clockwise shaft revolution with a negative decreasing value and vice versa. However I have some trouble figuring out how to relate the magnitude of the values to a given physical position of the shaft. Does anyone have an idea how to do that?