基于Linux的工业控制终端的设计与开发
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
近几年来,嵌入式技术和工业控制技术不断蓬勃发展,已经广泛应用到人们生活的各个领域中,并成为我国经济的新增长点。同时,采用ARM系列的CPU来取代部分单片机、PC104等传统平台,并成为工业控制自动化、消费类电子、汽车电子等应用领域的主流芯片。目前,虽然有许多嵌入式操作系统已经被广泛使用,如Windows CE、Vxworks、Uc/OS-II、Linux、QNX、PalmOS等等,但很多嵌入式操作系统的代码并不开源,如Windows CE,这样不利于操作系统的裁剪和移植,而Linux操作系统具有代码开源、系统稳定、内存管理优秀等特性,使其能够很好的满足工业控制系统的要求。
     本文结合实际工程应用,提出了一种基于Linux的工业控制终端。该控制终端将PLC控制器和LCD触摸屏合二为一,构成一种价格低廉的工业控制终端,并已经应用到实际的小城镇自来水厂水压控制系统的项目中。本文研究和设计了上位机部分——LCD触摸屏,硬件部分采用AT91SAM9261嵌入式处理器为核心,软件部分采用嵌入式Linux系统及基于Qt的控制界面。本文着重就以下几个方面的内容进行深入的研究。
     1、分析了目前工业控制系统、嵌入式Linux系统以及小城镇、乡村给水系统的现状和趋势,并比较了目前应用比较普遍的各种工业控制系统。结合当前小城镇给水系统的特点,论述了选用嵌入式Linux系统的原因。
     2、根据实际项目的要求和AT91SAM9261的特点及性能,分析了系统的主要外围硬件模块包括:存储器接口、电源模块、显示模块以及通信模块。
     3、分析了bootloader和Linux内核的原理和结构。根据嵌入式系统的特点,修改并裁减内核,并将u-boot和Linux2.6移植到AT91SAM9261的开发平台上,通过busybox制作根文件系统,建立工业控制的软件平台。
     4、根据实际系统硬件电路,修改并编写触摸屏驱动程序、UART驱动程序、LCD驱动程序以及USB驱动程序。
     5、论述了嵌入式Linux下图形界面开发环境QT/Embedded,并将QT/Embedded移植到Linux2.6平台上。
     6、在本文最后部分,作者结合实际科研项目——“中小型自来水厂水压控制系统”,编写了针对小城镇、乡村水厂控制水压的图形控制界面。
Recently, embedded technology and industrial control technology continue to flourish, and have been widely applied to various areas of people’s life, being a new growth point in our country’s economy. Meanwhile, ARM series CPU have replaced some parts of traditional platforms, such as MCU, PC104 and so on, and have become mainstream chip in the field of industrial control automation, consumer electronics, automotive electronics. Currently, although there are many embedded systems being used widely, including Windows CE, Vxworks, Uc/os-II, Linux, QNX, PalmOS. Many of them are not open source, which are not conducive to cutting and transplantation. And Linux system has so many advantages, such as source code, system stability, excellent memory management, which can meet the requirements of industrial control systems well.
     This paper proposes an industrial control terminal which is based on the Linux system. This industrial control terminal combines LCD touch screen and PLC controller, and has been applied to the hydraulic control system of small towns. The paper studies and designs host computer part, in which AT91SAM9261 is taken as the core processor and the system software is made up of embedded Linux system and based on Qt control interface. The whole system includes the following aspects.
     1. Analyzing the current actuality and direction of industrial control systems, embedded Linux systems and water supply systems in small towns and villages. In view of the water supply system’s characteristics, this paper discusses the reasons for using embedded Linux system.
     2. According to actual project requirements and CPU’s performance, designing the main peripheral hardware modules, such as memory interface, power module, display module and communication interface.
     3. Analyzing the principles and structures of bootloader and Linux system. According to the features of the embedded systems, this paper modifies and reduces the kernel, and transplants the u-boot and Linux2.6 to the platform of AT91SAM9261, and makes root file system by busybox, builds software platform for industrial control.
     4. According to practical hardware circuit, this paper revises and writes touch screen driver, UART driver, LCD driver and USB driver.
     5. Dissertating the GUI development environment of Qt/Embedded under embedded Linux system, and transplanting the Qt/Embedded to the platform of Linux2.6.
     6. In the last of this paper, the author combines the requirements of the lab project "hydraulic control system" and compiles the graph control interface of hydraulic control system.
引文
[1]李春林,程健.工业自动化领域中的无线技术[J].工业仪表与自动化装置.2007,(1):15-17.
    [2]北京市金典永恒公关顾问有限公司.应对电子制造及工业自动化新挑战[J].工业控制计算机.2007,20(8):93.
    [3]章昌南.浅谈我国工业自动化发展状况[J].金属加工.2008,(18):1-5.
    [4]刘鑫.中国工业控制自动化技术的现状与发展趋势[J].航天控制.2004,22(4):42-47.
    [5] Fritsch, A. Industrial Ethernet Goes Process Automation And What About Explosion Protection. Electrical and Instrumentation Applications in the Petroleum & Chemical Industry, 2007. PCIC Europe 2007. 4th European Conference on, 2007.1-7.
    [6]郭明,侯彦华.嵌入式Linux系统的现状与未来[J],北京广播电视大学学报,2003(3):37-40.
    [7]刘红.嵌入式系统技术发展趋势浅析[J],中国建设教育,2006,10(10):51-54.
    [8] Richard A Sevenich. An Introduction to Embedded Linux Development. Linux Journal, 2004, 10:132-137.
    [9]童礼.关于饮用供水安全的对策思考[J].中国西部科技,2005,8(14):64-65.
    [10]沈建国.昆山市村级水厂现状与管理对策[J].中国卫生监督杂志,2001,8(3):106-108.
    [11]汪建武.农村自来水厂设计应注意的几个问题[J].甘肃水利水电技术,2009,45(5):14-15.
    [12]周秀达,毛根荣等.遂昌县农村水厂现状和再改水探讨[J].浙江预防医学,2005,17(10):34-35
    [13]张剑銘,石汝法.浙江省农村水厂现状与今后改水管理对策[J].中国农村卫生事业管理,2004,24(12):37-38.
    [14]汤铭潭.基础设施在小城镇发展中的作用[J].小城镇建设,2001(4):58-59.
    [15]肖绍雍.论城镇供水事业发展形势与展望[J].给水排水,2001,27(1):102-104.
    [16]中国城市规划设计研究院,中国建筑设计研究院,沈阳建筑工程学院.小城镇规划标准研究[M].北京:中国建筑工业出版社.2002
    [17]“AT91SAM9261”. http://pdf.dzsc.com/AT9/AT91SAM9261.pdf
    [18]“HY57V561620(L)T”. http://pdf.dzsc.com/HY5/HY57V561620T-HP.pdf
    [19]“AT45DB321”. http://pdf.dzsc.com/AT4/AT45DB321.pdf
    [20]“K9F1G08U0A”.http://pdf.qic.com.cn/down/SAMSUNG/30437_K9F1G08U0 .pdf
    [21]“SP6200/6201”.http://pdf.dzsc.com/SP6/SP6201EM5-2.85.pdf
    [22]“NCV33163”. http://pdf.dzsc.com/NCV/NCV33163.pdf
    [23]“REG1117/REG1117A”. http://pdf.dzsc.com/REG/REG1117A-1.8_2K5.pdf
    [24]“34063A”.http://pdf.dzsc.com/340/34063A.pdf
    [25]韦东山.嵌入式Linux应用开发完全手册[M].北京:人民邮电出版社,2008.
    [26]孙纪坤,张小全.嵌入式Linux系统开发技详解——ARM[M].北京:人民邮电出版社,2007.
    [27]宋宝华.Linux设备驱动开发详解[M].北京:人民邮电出版社,2008.
    [28] Victor Yodaiken, Michael Barabanov. A Real-Time Linux. New Mexico Institute of Technology.
    [29] M. Beak, H.Bohme, M.Dziadzka, U.Kunitz, R Magnus, D Verworner. Linux Kernel Internals. Second Edition. Addison-Wesley,1997:100-123.
    [30]“The Linux Kernel Archives”. http://www.kernel.org.
    [31] A. Lennon.“Embedded Linux”.Embedded Systems IEE REVIEW, MAY 200 1:33-37.
    [32] Daniel P. Bovet, Marco Cesati. Understanding the Linux Kernel [M]. 2nd Edition. O’ReillyMedia, Inc.2002.
    [33] Ravi Gupta. Linux 2.6 for Embedded Systems-Closing in on real time. RTC Magazine, 2003(10).
    [34] Yong Hoon Choi, Woo Il Kwon, Heung Nam Kim. Code generation for Linux device driver[J]. Advanced Communication Technology, 2006. ICACT 2006. The 8th International Conference, Volume 2, 20-24 April 2006.
    [35]“Compiling the Linux kernel”. http://ploug.eu.org/doc/1-kernel.pdf.
    [36] Brandon White Linux2.6:A Breakthrough for Embedded Systems. LynuxWorks 2003.
    [37]李善平,刘文峰,王焕龙. Linux与嵌入式系统[M].北京:清华大学出版社,2003
    [38] BusyBox[EB/OL]. http://www.busybox.net.
    [39]科波特.Linux设备驱动程序(第三版)[M].北京:中国电力出版社,2006.
    [40]李俊.嵌入式Linux设备驱动开发详解[M].北京:人民邮电出版社,2008.
    [41] Alessandro Rubini, Linux Device Drivers, OrReilly & Associates, Inc. 1998.
    [42] Alessandro Rubini, Jonathan Corbet.LINUX device drivers [M]. O’Reilly Media, Inc.2000.
    [43] ADS7843 Chip DataSheet. HyBus Co. Ltd.2003.6.
    [44] Hongfeng Zhu, Tianhua Liu, Chuansheng Zhou, Guiran Chang. Research and Implementationof Zero-Copy Technology Based on Device Driver in Linux[J]. Computer and Computational Sciences, 2006. IMSCCS '06. First International Multi-Symposiums, Volume 2, 20-24 April 2006.
    [45] C Y Huang, L P Chang, T W Kuo. A Cyclic-Executive-Based QoS Guarantee over USB[J]. In IEEE 9th Real-time and Embedded Technology and Applications Symposium (RTAS’03),2003.
    [46] Alberto Martinez. USB Latency Requirements and the Effect of Video Adapter PCI RetryCondition on Maintaining USB Streaming Pipelines [R]. Sacramento: California State Univers ity, 1997.
    [47] USB 2.0 Universal Serial Bus Specification [S]. http://www.usb.org.
    [48]倪继利.Qt及Linux操作系统窗口设计[M].北京:电子工业出版社,2006.
    [49] Online Reference Documentation. http://doc.qt.nokia.com.
    [50] Alan Ezust,Paul Ezust.C++设计模式——基于Qt 4开源跨平台开发框架[M].北京:清华大学出版社,2007.
    [51]丁林松,黄丽琴.Qt4图形设计与嵌入式开发[M].北京:人民邮电出版社,2009.
    [52] Trolltech. Qt Reference Documentation. http://www.trolltech.com.
    [53]刘瑛,张修忠.工业控制计算机系统及应用[J].石油工业计算机应用.2003,11(1):25-27.
    [54]张守伟,王琳琳,汪运来.污水外输自动化控制系统的设计与应用[J].计算机测量与控制.2007,15.
    [55] Lui S, Rajkumar R, Lehoczky J. Priority inheritance protocols: An approach to real-time synchronization. IEEE Transactions on Computers,1990,39(9):1175-1185. (11):1512-1514.
    [56]张大为,张莹等.自动控制技术在自来水厂的应用[J],电气技术,2009(3):70-73.
    [57]汪玉凤,韩光明等.自来水厂恒压控制系统的设计[J],科技资讯,2007(13):25-26.
    [58] Gasmin Blanchette,Mark Summerfield.C++ GUI Programming with Qt 3[M]. Prentice Hall Ptr,2006.
    [59] Anne-Marie Mahfouf. Qt Designer and KDevelop-3.0 for beginners,2003.
    [60]罗苑棠,杨宗德.嵌入式Linux应用系统开发实例精讲[M].北京:电子工业出版社,2007.
    [61]邹思轶.嵌入式Linux设计与应用[M].北京:清华大学出版社,2002.
    [62]王进德.嵌入式Linux程序设计与应用案例[M].北京:中国电力出版社,2007.
    [63] Knudsen P.V, Madsen J. Integrating communication protocol selection with partitioning in hardware/software codesign[J]. System Synthesis, 1998. Proceedings. 11th International Symposiu m, 2-4 Dec. 1998
    [64]朱懿,蒋念平.ModBus协议在工业控制系统中的应用[J].微计算机信息. 2006, 22(41):118-120.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700