A numerical control device that reads a machining program and causes a machine tool to operate based on the machining program, all of a moving command, acceleration and deceleration in a tangential direction of a command route of the moving command, speed at an end of the command route, and a superimposition command for executing a moving command following the moving command in at least one block, being described the block, and the machining program including a plurality of blocks including the block, the numerical control device comprising:
- an acceleration-deceleration determining unit configured to set the acceleration and the deceleration as acceleration-deceleration data when the acceleration and the deceleration satisfy tolerances decided based on actual mechanical dynamic characteristics, set the tolerances as acceleration-deceleration data when the acceleration and deceleration do not satisfy the tolerances, and, when the acceleration and the deceleration in the tangential direction of the command route of the moving command do not satisfy the tolerances if the moving command following the moving command is executed with the superimposition amount, change the superimposition amount to a large value without changing the speed at the end of the command route or reduce the speed at the end of the command route without changing the superimposition amount;
- and
- a position-command generating unit configured to generate a position command based on the moving command, the acceleration-deceleration data, and the speed at the end of the command route and the superimposition amount subjected to processing by the acceleration-deceleration determining unit such that the moving command and the moving command following the moving command are superimposed by a distance corresponding to the superimposition amount and output the generated position command to a driving device of the machine tool.