Patent ID: 8818549

Claim:
A controller for a machine tool controlling a machining position and a machining attitude of a tool relative to a workpiece by driving any of motors for driving axes including a linear axis and a pivoting axis based on a control data, said controller for said machine tool comprising; a detecting member detecting said machining position where said pivoting axis is reversed in machining by said machine tool based on said control data; an allowable position error setting member setting an allowable position error between a commanded machining position and an actual machining position; an allowable angular error calculating member calculating an allowable angular error of a difference between a commanded angle of said pivoting axis and an actual angle of said pivoting axis based on said allowable position error and a distance; an allowable acceleration deciding member deciding an allowable acceleration about said pivoting axis based on said distance which is a distance from said machining position of said reversed axis to a center of said pivoting axis and based on said allowable position error being set or said allowable angular error; and a controlling member controlling a velocity about said driving axis based on said allowable acceleration.