the invention relates to a device with a magnetic position sensor comprising a field sensor and analysis electronics for linear displacements of a rod - shaped component , in particular the shaft of an actuator , with an element generating a magnetic field and a position sensor measuring the magnetic field strength angle of this field , the field angle signal determined by this sensor being used for displacement path determination . the element generating a magnetic field is an axially magnetized magnet casing which surrounds the rod - shaped component of the actuator itself , is fixedly connected thereto and can rotate therewith about its displacement axis .