Patent ID: 8600542

Claim:
A method of controlling a machine tool to restart automatic operation for machining a workpiece from an interrupted point after said machine tool, which has been automatically operated by NC program commands output from an NC apparatus, is caused to interrupt the automatic operation halfway, comprising the steps of: classifying said NC program commands into a plurality of main groups with respect to contents of motions for changing a machine state of said machine tool by said NC program commands; and determining an order of execution of said NC program commands such that said main groups are arranged in a prescribed order of execution, for automatically generating a machine state restoration command, when the automatic operation of said machine tool restarts after the automatic operation has been interrupted halfway, wherein when said machine tool is automatically operated to machine the workpiece, said main groups comprise at least one of: a first group including at least one sub-group having an NC program command for retracting a component which would otherwise become an obstacle to a movable axis of said machine tool when the movable axis moves; a second group including at least one sub-group having an NC program command for clamping and unclamping the movable axis; a third group including a sub-group having an INC program command not included in the remaining groups of said main groups, among commands required to restore the machine state of said machine tool; a fourth group including at least one sub-group having an NC program command for rotating a main spindle on which a tool or the workpiece is mounted; and a fifth group including at least one sub-group having an NC program command for making an action immediately before the automatic operation restarts, and wherein when the automatic operation of said machine tool restarts after the automatic operation has been interrupted halfway, the order of execution of said NC program commands is determined such that said main groups are arranged in the order of the first group, the second group, the third group, the fourth group and the fifth group, for automatically generating said machine state restoration command.