Patent ID: 7174226

Claim:
A numerical controller, comprising: a learning controller carrying out learning control for creating and storing correction data on the basis of a position deviation in same operation patterns executed by the numerical controller that are generated when an NC program is repeatedly executed, and correcting the position deviation at execution of the same operation patterns on the basis of the correction data, and when commands in the NC program are executed, learning control is started at a location where same operation patterns start occurring, and learning control is stopped at a location where same operation patterns end, wherein the numerical controller discriminates and stores, from among the commands in the NC program, commands which produce the same operation patterns to carry out learning control or commands which do not carry out learning control prior to execution of the NC program, and determines whether a location is where the same operation patterns start occurring or where the learning control is stopped on the basis of the stored commands, so that learning control is carried out for a section where the same operation patterns occur.