本设计研究的课题主要是基于单片机控制的数控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 for CNC XY table - interpolation part of the design.
Procedures used in the system design by point by point comparison 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μVision2 compile 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.
Key words: Interpolation X-Y NC Worktable Stepping Motor Microcontroller