Design of reconfigurable CNC
- 格式:pdf
- 大小:205.03 KB
- 文档页数:4
Design of reconfigurable CNC system based on Embedded TechnologyYue Xu, Taiyong Wang, Yanju Zhao, Jingchuan DongCollege of Mechanical Engineering, Tianjin UniversityTianjin, 300072, Chinaxuyuetjpu@Abstract - A CNC system which was based on embedded p rocessors and embedded-real-time-o perating system was structured. Its hardware platform which is of dual-CPU model is designed by ARM and DSP. This structure is used to control p roduction p rocess. FPGA module realizes system’s flexible manufacturing and reconfiguration. Due to the disadvantages of single task software structure this paper uses embedded real time op erating system and software-layer-structure method enhance CNC system’s stability and task-disp atch’s real time. At last, feasibility of this method is certified through applications in NC machine.Index Terms - CNC System, Reconfigurable, FPGA, Real-time operating system.I. I NTRODUCTION At the end of 21st century great developments have beenmade in computer technology. Many embedded real-time system such as RTLinux, VxWorks, uC/OS-II come forth. Compared with desk operating system, embedded systems can be reduced and are real-time and reliable. With respect to theiradvantages, embedded systems are broadly used in industry,spaceflight, military and information industry, etc. Also with the developments of computer technology, traditional manufacturing changes largely. Many industrialized countries put mint fund to study modern manufacture technology and bring forward a new manufacture model which core is flexiblemachining. CNC system is core of manufacturing. At present,many designers design embedded system with the structure of IPC + motion Controller and use desk operating system or he system with real-time expand. Whereas, desk operating systemof huge code and hard to reduce, so it can not reach embedded system’s level in aspect of real-time attribute and reliability.At the same time, flexible manufacturing system requests control system can adjust its inner circuits dynamically.Based on above, this paper gives a CNC system design scheme with embedded processors, embedded real time operating system and FP G A. At first, designs the reconfiguration hardware platform. Secondly, chooses anappropriate embedded real-time operating system and replants it on hardware platform. At last, designs applications.II.D ESIGN OF CNC HARDWARE PLATFORM A. Structure of system hardwareThis work is supported by national 863 project fund Grant #2006AA04Z146 and technology development project of Tianjin Grant#06YFGZGX18200To construct the hardware we adopt embedded processors---ARM and DSP, which are of master and slaver model. ARM is master-processor and in charges of communication management, network management, HMI management, instruction translation, malfunction diagnosis and etc. The slave processor is DSP which especially responds for track interpolation, position control, error control and etc. FPGA realizes all the system’s interface control circuits which can adjust their inner structure with the change of manufacturing environment. Fig.1 expresses CNC system’sstructure based on aforesaid thinking.1) Master control module of ARM. ARM is in charge of all the system’s control and the configuration of FPG A module. Communication between ARM and DSP is throughDual port RAM.2) Slave-module of DSP. DSP gets master module’s instructions from dual port RAM. These instructions are translated from G codes by ARM. After receiving theinstructions, DSP can complete tracking interpolation, position control, error control independently. 3) FPGA reconfig uration module. FPG A can change interface-logic-circuit with the changing of machining conditions. It can improve CNC system’s flexibility and field reconfiguration capability and can realize the reconfiguration for numeric control lathe/milling machine/boringlathe/gadding machine. 4) HMI module. This module includes keyboard, LCD and USB equipments. It can complete keyboard disposal, multicolor display, user data transmitting and simple datadisposal. Keyboard unit in this module can complete the communication between PS/2 keyboard and ARM.5) Network module. It can solve complex connection between CNC system and executor. For general purpose, thismodule covers many popular kinds of net, such as Ethernet, RS232, CAN and etc. Ethernet unit uses REALTEK Company’s net-communication chip RTL8019 with the speed of 10Mbps.6) Memory module. T his module includes FLASH unit. One part of FLASH is compact with system’s running. T heysave program code, display word, tool magazine parameters, compensation parameters, machine parameters and FPGAconfiguration parameters. T he other FLASH is used to storecodes which are created during the communication betweennetwork and exterior.Proceedings of the 7thWorld Congress on Intelligent Control and AutomationJune 25 - 27, 2008, Chongqing, ChinaFig.1 Configuration of reconfigurable CNC systemB. Design of reconfiguration module based on FPGAIn order to meet the need of reconfiguration, CNC system must adjust its inner hardware circuit according to different applications. Generally, CNC system works in tow ways. One is its own data bus and the other is to expend other chips. These two ways both add periphery circuits and system’s cost. Due to that, this paper puts forward a reconfiguration module, including agent I/O unit, encoder input unit, pulse width modulation (PWM) unit, DAC output unit and ADC input unit with FPG A. The structure diagram of the reconfigurablesystem based on FPGA is in Fig.2.Fig.2 Configuration of Reconfigurable Section based on FPGAReconfiguration module is the bridge of control parts (ARM and DSP) and motion executers. It not only offers credible channels for message exchanging but also realizes the insulation between heavy-current signals and week-current signals. At meantime, every input and output signals’ definition and time sequence both are realized by FPGA.III.D ESIGN OF CNC SOFTWARE PLATFORM BASED ON RTOSFormer CNC system software usually judges tasks’ symbols in an infinity circle and using interrupt vectors (timer interrupt and keyboard interrupt) to active new task then running to a fixed interrupt program to realize special function. Under this single task environment, most system time is waiting for this infinity circle. During one task transaction, other tasks which have the same interrupt level can not use resources of CPU, can not carry up-down text’s exchange and lead to weak real-time respond. In the meantime, if a task in processing need to wait for signal or postpone signal process and this kind of postponement can’t anticipate, it may occupy a great deal of system time, resulted a great deal of waste of system resources, causes system can’t respond to more urgent task. Aim at these shortages of single task software structure, this paper uses embedded real-time multitask operating system -RT-Linux.A. Characteristic of RT-LinuxRT-Linux is a Linux operation system which can provide real-time function. Besides of Linux advantages RT-Linux can solve real-time problem in motor-control. There is a special core between Linux core and interrupt control hardware. During this structure Linux core has the lowest interrupt level and other real-time tasks are not work as Linux processes but as modules which can added by Linux. Those modules’ interrupt levels both are high to Linux core. Those characteristics of RT-Linux are very suit for real-time applications.B. System software structure based on RT-LinuxFig.3 expresses CNC system software structure based on RT-Linux. Hardware driver layer includes eight modules; application layer includes five modules; operation system layer plots into 14 parts as position control, interpolation control, interrupt arbitration, code-interpretation arbitration, memory management, keyboard tasks, file management and etc. Every layer works together and becomes system’s working and application platform.With following considering, the whole software is divided into above three layers: A CNC system’s functions are incarnated by software and realized by hardware. So divide five modules in the highest application layer based on CNC function require, divide 14 modules in operation layer according to function structure. Operations which can relate with hardware in those 14 modules are fond out to form the units of the hardware driver layer. In this system, every task concentrates in application layer with the form of program and serves for different function modules. RT-Linux manages system’s resources, realizes message management, dispatches tasks and disposes abnormal. In RT-Linux, every task is dispatched with a PRI which is invoked dynamically with the protocol of interrupt level. Through this way system’s property of real-time is realized.Fig.3 Software configuration of CNC system based on RT-LinuxC. Multi-tasks dispatching based on RT-Linux1) Task division in CNC systemCNC system is a special multitask system. Usually, it divides the whole tasks into two classes---management task and control task based on tasks’ property of real-time, show in Fig.4.Management tasks have a low requirement of real-time attribute and are divided into five sections such as: HMI, display management, data management, communication management and network management. Comparatively, there is a direct relationship between NC machining and control tasks which have a high requirement of real-time. In order to improve working efficiency and veracity, control tasks are divided into such sub-tasks as position control, track interpolation, instruction interpretation, I/O control, error control, state monitor, malfunction diagnosis and etc. During practical exploitation, designers divide sub-tasks further and form a task assemblage. Tasks in assemblage are activated by extern events and used by RT-Linux. High PRI task can use CPU resources. If a higher interrupt level task comes into task-list it can occupy system resources by protocol of “PRI-dispatch”. If more than one task with same interrupt level come into task-list Linux-core will control them with protocolof “time-slice-cycle”.Fig.4 Task division of CNC system2) Realization of multitask dispatching in CNCControl tasks are arranged by PRI, the high to low order is: position control, track interpolation, instruction interpretation, malfunction diagnosis, real-time monitor and etc. On the contrary, management tasks which are managed by RT-Linux with time-slice-cycle protocol have same and lowest PRI.Fig.5 describes this thinking. After system initial, software gets into time-slice cycle and deals different tasks at every time-slice. Whenever time-slice is over software must release CPU in spite of the task whether is complete. This task can re-occupy CPU when next time-slice belongs to itself is coming. All of control-tasks have interrupt level. Each of them is higher than management tasks’. They can occupy CPU through “PRI-dispatch” protocol. When more than one control-task with the same interrupt level comes into task-list, they will form a new task-cycle. This cycle uses time-slice-cycle protocol.Fig.5 Task-Dispatch mechanism of CNC system based on RT-LinuxIV.E XAMPLE OF CNC SYSTEM DESIGNIn order to improve present level of CNC system, plane-cycle-interpolation, screw interpolation, CIP interpolation andadaptive-feed control method are realized, which can strongly support the higher accuracy and higher speed machining, avoid the disadvantages of transfer curve and surface into line or circle. A reconfigurable CNC system which can control four-axis and one principal-axis simultaneously is developedin laboratory, just as what the Fig.6 shows.Fig.6 TDNC-M4 4-Axes NC-machining centerAt present, this four-axis machining centre is used by digital manufacture and testing research institute of TianJin University for general metal cutting and industry chinaware process.V.A SUMMARYAs a meaningful attempt, this paper design an embedded and reconfigurable CNC system based on ARM and DSP. ARM processor has strong RISC capability and its application assures the system in high speed, high precision and real-time processing. The DSP-based motion control module is of powerful function. FPG A can adjust control logic circuit according to different applications. RT-Linux works as the operation system and manages all of the tasks. Layering-software and task-dispatching method make system work more stabile and more exact. G reat deal of experimentation proves this system is good.R EFERENCES[1]Research on reconfigurable computer numeric control system based onUSB. Computer Integrated Manufacturing Systems. 2004,10(12):1567-1570.[2]G uiping Wng, Xu Lei, Minjie Zhu, Xu Lu. Multi-function IntelligentInstrument of Vehicle Detection Based on Embedded System. World Congress on Intelligent Control and Automation.June21-23,2006:5149-5153[3]Zhou.Z.D, Xie.J.M, Chen.Y.P. The development of a fieldbus-basedopen-CNC system. International Journal of Advanced Manufacturing Technology. 2004,23(8):507-513.[4]Wang Taiyong, Li Bo, Wan Shumin. Research on Reconfigurable CNCSystem Based on Field puter Integrated Manufacturing Systems.2006,12(10):162-1667.[5]Xie Jingming, Zhou Zude, Chen Youping. Research on the architectureof fieldbus-based open CNC system. Journal of Huazhong University of Science and Technology(Nature Science).2002,30(4):1-3[6]Wang Taiyong, Li Hongwei, Wang Wenjin. Framework of Distributiveand Intelligent Cooperation Based on Open Architecture CNC. Journal of Tianjin University. 2004,37(8):673-677.[7]Cheng Tao, Wu bo, Yang Shuzi. Study on Intelligent CNC System forDistributed Networked Manufacturing. China Mechanical Engineering.2004,15(8):688-693.。