The measurement principle is the same as encoders but in lineal position.
The optical measurement with a piston shape, are built by vástago that moves within the body generating two trains of pulses staggered 90 degrees
Devices with magnetic activation are very common. An amplified head moves near a band that incorporates micro-magnets situated with a high resolution. The head activates a pulse every time a micro-magnet is surpassed (resolutions of 0,01mm) providing information on the progress of the head. This system works without contact.