节点文献
基于RTLinux的全软件数控系统设计与开发
Development of RTLinux-based Software CNC
【作者】 朱达宇;
【导师】 李彦;
【作者基本信息】 四川大学 , 机械制造及其自动化, 2005, 硕士
【摘要】 本课题是四川省科技攻关项目(03GG006-013-1)“开放式软件数控系统开发与应用”的子项目,课题名称“基于RTLinux的全软件数控系统设计与开发”,课题致力于构建一个Linux平台下的数控系统原型。 随着信息技术的飞速发展,开放式数控系统正进入一个崭新的发展阶段——全软件数控(亦称软件数控或软数控)。全软件数控是指CNC系统的各项功能,包括插补,位控和PLC,均由软件模块来实现。软件实现的灵活性有利于数控系统实现更高层次的开放性。 “基于PC”是目前实现CNC开放化比较现实而明确的途径。PC平台上的主流操作系统(如Windows、Linux等)是一种通用(general-purpose)操作系统,其软实时特性不适合直接作为软数控系统的开发平台。本课题以Linux为开发平台,解决实时性问题的办法是采用RTLinux实时扩展。 软件开发是软数控系统开发的核心和关键。本课题以C语言为主要开发语言,系统图形用户界面的开发采用Tcl/Tk脚本语言。通过对数控系统功能需求及多任务间数据依赖关系的分析,结合Linux+RTLinux平台上实时应用软件的结构特点,本课题的软数控系统采用分层结构,自上而下分别为:界面层、管理层和控制层,界面层之上是用户,控制层之下是硬件。每一层又分为若干个模块及子模块,同层模块相互配合共同完成该层的任务。通过UNIX信号机制和半双工管道实现管理层与界面层的通信,通过RTLinux提供的内核实时管道实现管理层与控制层的通信。 软数控系统的实时控制功能由控制层中的软CNC模块和软PLC模块完成。其中软CNC模块由四个子模块组成,分别是插补准备子模块、插补子模块、位控子模块和输出子模块。在系统实现上四个子模块体现为四个实时线程,按流
【Abstract】 The thesis of Development of RTLinux-based Software CNC is the sub item of "Development and Application of Open Architecture Software CNC System ", which is supported by Key Technologies Research and Development Program Fund of Sichuan Province, China (Grant No. 03GG006-013-1) . This thesis dedicates to constructing a prototype of Linux-based CNC system.Along with the fast development of information technology, open CNC system has been entering upon a new phase, which is all-software CNC, software CNC or soft CNC. Software CNC means that all the functions of CNC system, such as interpolation, position control and PLC, are implemented with software modules. The flexibility of software makes it available for CNC systems to achieve higher-level openness."PC-based " is a practical and definite way to actualize the openness of CNC systems at present. The mainstream OS (operating systems) on the PC platform, such as Windows, Linux and so on, are general-purpose OS. The soft real-time characteristic makes them not suitable to be the development platform for software CNC systems. In this thesis, the way to solve this problem is to introduce the RTLinux realtime expansion.Software development is the core of software CNC system development. In this thesis, C language is used as the main development language and Tcl/Tk is used in the development of the graphical user interface. Through analyzing the functional requirements of CNC system and the relationship between the tasks(realtime or nonrealtime), we adopt multilayer structure in the software CNC system. From top to bottom, they are interface layer, management layer and control layer. The one aboveinterface layer is the user, and the one below the control layer is the hardware. Each layer falls into several modules or sub-modules. Through cooperation with each other, the modules of the same layer complete the mission of that layer. The interface layer communicates with the management layer through UNIX signal mechanism and semiduplex pipe. The management layer communicates with the control layer through the kernel real-time pipe, which is provided by RTLinux.The realtime control function of software CNC system is performed by the soft CNC module and the soft PLC module. The soft CNC module comprises four sub-modules, which are pre-interpolation module, interpolation module, position control module and output module. The four sub-modules act as four realtime threads. They work under the pipeline model. The realtime requirement of CNC system is satisfied by the high timer resolution and appropriate buffer management.In this thesis, the hardware platform is general PC or industrial PC. As to the interface between CNC controller and servo system and auxiliary devices, a multifunctional interface card is used. On the one hand, the card transforms the outputting commands of the upper controller into corresponding pulse series, which drive the servo system; on the other hand, it accomplishes the input-output of the switching values.At present, the software CNC system developed in this thesis, has realized basic numerical control functions such as coding, acceleration and deceleration, line and arc interpolation, and so on. It can run stably on the experimental facilities.
【Key words】 open CNC; software CNC; RTLinux; realtime thread; Communication pipe;
- 【网络出版投稿人】 四川大学 【网络出版年期】2006年 01期
- 【分类号】TG659
- 【被引频次】12
- 【下载频次】478