A new method was presented for the two turntable 5-axis postprocessor. The quaternion algorithm was adopted to conduct the coordinates transformation and space arc interpolation. Thus, the rotation arithmetic was become more visual and the code reusability was improved. By setting restriction to the A,C axis’ increments and subdividing long lines into multiple segments, the non linear error was reduced.