基于单片机控制的数控 X-Y 工作台系统设计——插补部分摘要本设计研究的课题主要是基于单片机控制的数控 X-Y 工作台系统设计—插补部分设计。在系统程序设计上运用逐点比较法使步进电机实现单坐标定位、两坐标直线插补和圆弧插补的基本功能;在此功能基础上通过建立象限判别程序,使X-Y 工作台达到四象限的工作要求;并编写了代码处理指令,使 CPU 能够根据读入的指令信息( G 代码与 X 轴和 Y 轴坐标) ,分别向 X 轴和 Y 轴步进电机输出执行指令所需的控制信号,从而完成指定的工序。该设计选用 Keil μVision2 软件进行程序的编译和调试,在Proteus 环境下实现进一步的调试并仿真得出程序的运行结果。此次设计的程序均能在 Proteus 中的控制系统仿真电路图中仿真通过,仿真时,只需从键盘输入 G代码后,步进电机就能通过直线插补和圆弧插补,完成平面轮廓加工。关键字: 插补数控 X-Y 工作台步进电机单片机 Design of X-Y NC Worktable Based on Microcontroller —— Interpolation part ABSTRACT The subject of this design study is mainly based on MCU control system design C XY table - interpolation part of the design .P rocedures used in the system design by point by parison then single-coordinate positioning, linear interpolation of the two coordinates, circular Interpolation of the two coordinates by use the stepper motor; on the basis of this, establish quadrant identification procedures so that XY table can work in four quadrants; and write the code handler , so CPU according to the information which have been read(G code and the X-axis and Y-axis coordinates), output signals to two stepper motor separately for control the table how to move on X-axis and Y-axis to finish the specified process. The design of the software programs used Keil μ pile and debug, debugging at the Proteus and get the results of simulation. the results of the design of the program in the simulation by Proteus is wonderful, when simulation the program, just need input G code by the keyboard, stepper motor can control the table through linear interpolation and circular interpolation to finish plane contour machining. K ey words: Interpolation X-Y NC Worktable Stepping Motor Microcontroller 目录摘要........................................................................................................... I ABSTRACT ............................................................................................... II 前言.....................................................................................