Patent ID: 7206659

Claim:
A numerical controller for controlling a servomotor for driving a machine according to a machining program, having a function of learning control to obtain correction data based on position deviations during repetition of execution of the same operation pattern and correct position deviations in execution of the same operation pattern based on the obtained correction data, said numerical controller comprising: means for moving a tool relative to a workpiece from a position commanded by the machining program to a shifted position where the tool and the workpiece do not interfere with each other; means for obtaining the correction data by automatically repeating the same operation pattern at the shifted position a set number of times, or until the position deviation is reduced to a set value or less; means for automatically storing the obtained correction data; and means for moving the tool relative to the workpiece from the shifted position to the commanded position, and controlling the servomotor to perform machining by correcting the position deviations in execution of the same operation pattern based on the obtained correction data.