文档介绍:南京航空航天大学
硕士学位论文
基于Linux实时扩展的嵌入式数控系统研究与开发
姓名:曹玉华
申请学位级别:硕士
专业:机械电子工程
指导教师:游有鹏
2011-01
南京航空航天大学硕士学位论文
摘要
嵌入式数控系统是嵌入式技术在现代数控领域的应用,它集嵌入式、机械制造、计算机、
信息处理、自动控制、机电一体化等多种技术于一体,是数控系统一个重要的研究和发展方向。
为了满足数控系统多任务、强实时性的功能需求,目前大多嵌入式数控系统采用“嵌入式
处理器+运动控制器”的双CPU结构形式,其强实时性任务功能主要在下位机的运动控制器中实
现,因此对运动控制器性能要求非常高,导致其开发难度较大、开发周期较长。为此,本文充
分利用当前嵌入式主机的优良特性及开发的便利性,尝试将系统强实时性的任务功能在上层主
机中实现,而将下层运动控制器简化为一个带精插补器的运动控制接口。
本文设计研究了一款以PC104嵌入式板卡为主处理单元的单CPU嵌入式数控系统,并通过
Linux实时扩展在上层实现其多任务、强实时性的数控功能。主要研究工作和成果如下:
1. 详细分析了嵌入式数控系统在硬件上的要求,特别是对硬件的实时性需求。设计构建了
以PC104嵌入式板卡为主处理单元的,以FPGA为核心扩展单元的硬件平台。
2. 为实现单CPU嵌入式数控系统的强实时性任务功能,对系统实时性开发和运行环境进行
了深入研究,提出了Linux+Xenomai架构的多任务、实时性扩展的系统开发运行环境,并对该
架构进行了实时性定量测试,验证了理论的正确性和架构的实用性。
3. 构建了符合本嵌入式数控系统要求的嵌入式Linux系统,安装了Xenomai内核实时子系
统,实现了Linux+Xenomai的多任务、强实时性扩展环境,并在此基础上规划和实现了数控系
统的核心软件功能模块。
4. 对Linux设备驱动构架进行了分析,总结了Linux字符设备驱动开发的一般流程,并以
RS-232C标准串口为通讯接口,在Linux系统环境下设计了一款数控系统专用键盘。
通过初步的性能测试,本文搭建的基于PC104嵌入式板卡和FPGA运动控制接口的数控系统
硬件平台,构建的以Linux+Xenomai架构的多任务、强实时性扩展环境,可满足常用嵌入式数
控系统功能的控制需求。
关键词:嵌入式系统,数控系统,实时性,Linux,Xenomai,PC104,设备驱动程序
I
基于 Linux 实时扩展的嵌入式数控系统研究与开发
ABSTRACT
The C system is the embedded technology applied in the C field. It
integrates embedded applications, machinery manufacturing, computer, information processing,
automation, mechatronics and other technologies. Also, it is an important direction of research and
development in C system.
At present, to meet the multi-tasking and real-time requirements, most of the C
systems use the dual-CPU structure of “embedded processor + motion controller”. In this structure,
the strong real-time task functions are mainly achieved in the motion controller. It is obvious that high
requirements are placed on the performance of the motion controller, which would lead to more
difficultly and longer cycle in the development of C system. To avoid these problems, taking
advantage of the good characteristics and the convenience of development of the current embedded
proce