Abstract:The design solved the problem of difficult to bring CAD technology into PLC motion control.Interface design,as the focus of the implementation,included HPGL instruction normalization,compression storage of the target file , hierarchical memory allocation,different download mode set. HPGL program execution control algorithm, function block and urgent task allocation were allocated in different levels. Tertiary preemptive scheduling algorithm was adopted to complete the task scheduling. After testing straight line, circle, rectangle, helix and the rules track , the results well fit trajectory in CAD.Verify the feasibility of the design in rectangular coordinate robot control.