Teaching successive positions by numerical control