Patent ID: 7852031

Claim:
A machine tool controlled by a numerical controller and having movable axes respectively supported by fluid bearings for moving a workpiece relative to a tool held by a machining attachment according to a machining program, comprising: position detectors for respectively detecting positions of the movable axes; position deviation determining means that determines a position deviation between a position command for each of the movable axes and a position of each of the movable axes detected by said position detectors; contact detection means that detects a contact between a probe and a surface of the workpiece or the machining attachment when the position deviation detected by said position deviation determining means exceeds a preset value; movable axis stopping means that stops the movable axes at an instant when the contact is detected by said contact detection means; coordinate value detection means that obtains coordinate values at the instant when the contact is detected by said contact detection means; inclination determining means that moves linear axes of the movable axes so that the workpiece or the machining attachment is moved relative to the probe to perform detection of contacts between the probe and the surface of the workpiece or the machining attachment at least two different points on the surface by said contact detection means, and determines an inclination of the workpiece or the machining attachment based on a distance of motion of one of the linear axes and the coordinate values obtained by said coordinate value detection means; and correction means that corrects a mounting error of the workpiece or the machining attachment, or corrects the machining program based on the determined inclination of the workpiece or the machining attachment.