Patent ID: 7973509
Filing Date: 2011-07-05
Classification: G05B

Abstract:
1. A numerical controller having a control mode switching function for controlling a spindle by switching a control mode between a speed control mode for rotating a spindle motor according to a speed command and a position control mode for performing position control of the spindle motor according to a movement command, the numerical controller comprising: means for storing a position control start reference position which is initial coordinates of the spindle in the position control mode; means for maintaining a rotation of the spindle motor immediately before switching to position control mode during execution of a position control mode switching command for switching the control mode from speed control mode to position control mode; position detection means for detecting a spindle position; means for calculating a position command pulse of the spindle on the basis of a program command and outputting the calculated position command pulse to a spindle motor driving unit, during the position control mode; storage means for calculating and storing a difference between the current position of the spindle in the course of rotation at the start time of output of the position command pulse and the position control start reference position; compensation pulse calculation means for calculating a compensation pulse from the difference stored in the storage means; addition compensation means for adding the calculated compensation pulse to the calculated position command pulse and outputting the addition result; and spindle motor driving means for driving the spindle motor based on the addition result output from the addition compensation means, without stopping the spindle motor by using the means for maintaining the rotation of the spindle motor.