Synchronize feed and spindle speed in forward and reverse feed