An encoder converts rotation into a digital signal, usually by reading a finely marked disc optically or magnetically. It closes the control loop: the controller commands an angle, the encoder reports the actual angle, and the difference drives the motor current.
Incremental encoders count pulses from wherever they started, so the robot must be homed after power-up. Absolute encoders report the true angle immediately, often backed up by a battery or a multi-turn mechanism, which is why modern arms know their pose the moment they switch on.
Resolution matters directly for accuracy: with a 100:1 gearbox, one encoder step on the motor becomes a hundredth of that at the joint, which is how arms reach repeatability in the range of hundredths of a millimetre.
