Switch control mode of spindle drive as function of contouring,spindle orientation