A rotary encoder includes a first group of components and a second group
of components. The first group of components has a pulse wire, a
detector, and a circuit configuration. The second group of components has
a magnet and a code element. Upon approach of the magnet to the pulse
wire, a voltage pulse is able to be generated by the pulse wire. A signal
is able to be generated by the detector as a function of the relative
position, and based on the signal, a logic circuit is able to ascertain
position information which is able to be stored in a non-volatile memory.
Triggered by the voltage pulse, a voltage from a voltage source is able
to be applied to the circuit configuration. The circuit configuration is
disconnectable again from the voltage source at the latest after the
storage of the position information in the memory.