Rotary variable resistor with limitation of the rotational angle