In a machine tool having a turret tool post, said machine tool including a turret having a plurality of turret faces each equipped with a tool for machining, a turret shaft for rotating said turret, a cam follower provided on said turret shaft, a cam having a cam surface engaged with said cam follower to cause said cam following to rotate, an indexing motor for driving said cam to index said turret faces, a straight raceway portion formed on said cam surface of said cam so that said cam follower is not driven to rotate through a predetermined angle, an apparatus for controlling indexing of said turret tool post comprising:
- first dogs provided on said cam for indicating a given indexed position;
- second dogs provided on said cam for confirming that said turret faces of said turret tool post is in said given indexed position;
- a stop confirmation sensor for detecting said first dogs;
- a stop command sensor for detecting said second dogs and for delivering a stop command signal to said indexing motor;
- and
- a controller means for setting a lag time so that said cam comes to rest when said cam follower is in engagement with said straight raceway portion in response to said stop command signal from said stop command sensor means.