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