The linear movement of a flexible steel cable up to 2m long is converted into a rotary movement by a measuring drum. A return spring prevents the steel cable from sagging. The measuring drum is connected to a pulse generator, which generates two pulses every 0.1 mm offset by 90°. The measuring drum winds the steel cable in a single layer so that the resolution is independent of the position. The rope entry is protected against dirt by brushes.