A device for dosing a substance, including at least one rotating element and at least one coding element associated with the rotating element, using which the rotational position of the rotating element can be identified, further including at least one reference element whereby a reference signal is generated at pre-set positions or changes in position, and a method for identifying the rotational position of a rotating element which serves to set a dose, wherein the rotational position of the rotating element is identified by a coding which is only read or evaluated when a reference signal is generated at pre-set rotational positions or positional transitions.