PURPOSE: To drive both a main spindle and a subspindle with the aid of a single motor and to make the rotation angles of two spindles coincide with each other by locating a gearform locking member to a subspindle to engage a stopper therewith, and locating an angle detector for the spindle.
CONSTITUTION: A subspindle 12 is rotationally driven through a rotation transmission mechanism 23 with the aid of a motor 6 being a drive source for a main spindle 3. The subspindle 12 is provided on both sides of a pulley 31 with a pulley 32 for detection and a gearform lock member 33, and rotation is transmitted from the pulley 32 for detection to an angle detector 35 through a timing belt 34. In a stopper device 37, a stopper 38 is moved forward and backward by means of a hydraulic cylinder 39 to engage and disengage it with and from the gearform locking member 33. When machining by a main spindle 9 is completed, the main spindle 9 is rotated for division with the aid of the motor 6 so that the angle of the main spindle coincides with a detecting angle from the angle detector 35 for the subspindle 12. A subhead stock 13 is moved toward the head stock 1 side to transfer a work W of a main chuck 9 to a subchuck 11.