本設計研究的課題主要是基于單片機控制的數(shù)控X-Y工作臺系統(tǒng)設計—插補部分設計。
在系統(tǒng)程序設計上運用逐點比較法使步進電機實現(xiàn)單坐標定位、兩坐標直線插補和圓弧插補的基本功能;在此功能基礎上通過建立象限判別程序,使X-Y工作臺達到四象限的工作要求;并編寫了代碼處理指令,使CPU能夠根據(jù)讀入的指令信息(G代碼與X軸和Y軸坐標),分別向X軸和Y軸步進電機輸出執(zhí)行指令所需的控制信號,從而完成指定的工序。
該設計選用KeilμVision2軟件進行程序的編譯和調試,在Proteus環(huán)境下實現(xiàn)進一步的調試并仿真得出程序的運行結果。此次設計的程序均能在Proteus中的控制系統(tǒng)仿真電路圖中仿真通過,仿真時,只需從鍵盤輸入G代碼后,步進電機就能通過直線插補和圓弧插補,完成平面輪廓加工。
關鍵字:插補 數(shù)控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