基于单片机控制的数控X-Y工作台系统设计——插补局部摘要本设计研究的课题主要是基于单片机控制的数控X-Y工作台系统设计—插补局部设计。在系统程序设计上运用逐点比拟法使步进电机实现单坐标定位、两坐标直线插补和圆弧插补的根本功能;在此功能根底上通过建立象限判别程序,使X-Y工作台到达四象限的工作要求;并编写了代码处理指令,使CPU能够根据读入的指令信息〔G代码与X轴和Y轴坐标〕,分别向X轴和Y轴步进电机输出执行指令所需的控制信号,从而完成指定的工序。该设计选用KeilμVision2软件进行程序的编译和调试,在Proteus环境下实现进一步的调试并仿真得出程序的运行结果。此次设计的程序均能在Proteus中的控制系统仿真电路图中仿真通过,仿真时,只需从键盘输入G代码后,步进电机就能通过直线插补和圆弧插补,完成平面轮廓加工。关键字:插补数控X-Y工作台步进电机单片机DesignofX-YNCWorktableBasedonMicrocontroller——InterpolationpartABSTRACTThesubjectofthisdesignstudyismainlybasedonMCUcontrolsystemdesignforCNCXYtable-interpolationpartofthedesign.Proceduresusedinthesystemdesignbypointbypointcomparisonthensingle-coordinatepositioning,linearinterpolationofthetwocoordinates,circularInterpolationofthetwocoordinatesbyusethesteppermotor;onthebasisofthis,establishquadrantidentificationproceduressothatXYtablecanworkinfourquadrants;andwritethecodehandler,soCPUaccordingtotheinformationwhichhavebeenread(GcodeandtheX-axisandY-axiscoordinates),outputsignalstotwosteppermotorseparatelyforcontrolthetablehowtomoveonX-axisandY-axistofinishthespecifiedprocess.ThedesignofthesoftwareprogramsusedKeilμVision2compileanddebug,debuggingattheProteusandgettheresultsofsimulation.theresultsofthedesignoftheprograminthesimulationbyProteusiswonderful,whensimulationtheprogram,justneedinputGcodebythekeyboard,steppermotorcancontrolthetablethroughlinearinterpolationandcircularinterpolationtofinishplanecontourmachining.Keywords:InterpolationX-YNCWorktableSteppingMotorMicrocontroller目录摘要...........................................................................................................IABSTRACT......................................................