The optimization of the control logic of a redundant six axis milling machine