摘要 |
The present invention relates to a machine tool and a control method thereof. The machine tool can automatically execute commands at a proper moment even a tool replacing command and an auxiliary action command which is executed in parallel with the tool replacing command are emitted at the same time. A CPU reads content and execution moment of the each command according to a form, then sorts the command contents according to order of the execution moments, and stores a result into an RAM. When the command is a tool replacing command (S3: yes), the CPU executes a Z-axis rising process, a spindle head rises from the present position to a tool replacing position (ATC original point); and in the case that the spindle head 7 rises to an R point, (S5: yes), when a command for executing at an execution moment A exists in the content of the command stored in the RAM (73) (S6: yes), the content of the command used for executing at the execution moment A is executed (S7). |