Motor-stage automatic adjustment