1 magnetic sensor 2 activation magnet 3 permanent magnet 4 piston 6 piston stroke, distance 7 movement direction 8 first sensor element 10 second sensor element 12 distance between sensor elements 14 evaluation unit 18 switching signals 20, 20' group of signal values 22 first sensor signal 24 second sensor signal 28 key 30 housing 34 pneumatic cylinder 36, 36' display A, B, C, D magnetic positions of the piston