Described are system for recording piston rod position information in a
magnetic layer on the piston rod. A piston rod has a magnetically hard
layer formed thereon to provide a recording medium. A magnetic pattern is
recorded in the magnetically hard layer. A magnetic field sensor disposed
adjacent to the piston rod senses the recorded magnetic pattern while the
piston rod is moving and generates signals in response to the magnetic
pattern that are used to determine a position of the piston rod.