A method for calibrating a distance sensor of a rotary actuator device for controlling a charge cycle valve of an internal combustion engine, wherein the rotary actuator device includes a controllable electric motor having an actuator element for actuating the charge cycle valve, two energy storage means acting on the charge cycle valve in opposite drive directions, a control and regulating device which controls the electric motor with regard to a rotor angle according to a stored setpoint path such that the rotor of the electric motor is moved from a first end position into a second end position and vice versa, and a distance sensor for detecting rotor position, comprising the acts of:
- measuring at least one state variable of the electric motor;
- comparing the at least one state variable with a reference variable;
- determining whether there is a deviation between said variables;
- and
- altering at least one of the stored setpoint path and the distance sensor signal as a function of the state variable.