基于ARM的以太网与CAN总线互联网络接口控制器的研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
控制器局域网络(CAN)是一种能有效支持分布式控制或实时控制的串行通信网络,具有高性能和高可靠性的特点,现已经形成国际标准,是国际上应用最广泛的现场总线之一。与此同时,随着Internet的发展和生产自动化程度的提高,管理人员希望能够通过Internet或局域网来监控工业现场的情况。因此测控系统接入互联网已经成为大势所趋。实现企业信息网与现场总线网络互联具有非常重要的现实意义和推广价值。
     本文分析了CAN总线和以太网的数据传输技术,并参照国家标准,利用已有的高性能嵌入式ARM7硬件开发平台,实现了CAN总线协议与以太网协议之间的相互转换,使CAN总线能够方便的接入以太网。利用在嵌入式平台上构建动态Web页面实现对CAN网络中各设备的监控,并提出一种多机互联系统的构建,实现系统的扩充。
     本文详细阐述了系统的硬件、软件设计思路和实现方法。硬件平台,选用了基于ARM7内核的LPC2129处理器,并扩展了CAN总线驱动接口电路、以太网接口电路。由于该处理器集成了CAN总线控制器和先进的接收验收滤波器,本系统主要设计了CAN总线驱动电路;以太网接口选用了RTL8019AS。同时硬件设计上采用了线路隔离与屏蔽多项措施,保证系统的抗干扰能力。软件设计上采用了μC/OS-Ⅱ嵌入式实时操作系统,保证系统的实时性。在μC/OS-Ⅱ平台上分别实现了CAN总线和以太网底层驱动函数后,对标准TCP/IP协议进行了针对性的裁减和优化。并介绍了在TCP/IP协议栈之上如何进行Web服务器的构建,实现通过Web页面动态显示现场数据的功能。
     最后,本文讨论了多机通讯系统的构建。在介绍了多机系统构建框图基础上,介绍了一种多机通讯协议设计的方法,即自主设计开发的应用层协议以及通信转换协议。在介绍了路由器工作原理的基础上,阐述了多机互连系统工作方法以及互联网络接口控制器在多机系统中的相关设置。
CAN bus is a kind of Serial communication network which can effectively support the distributed control and the real-time contorl. It featured of high performance and redundant relibale. An international standard for CAN has been used, and, CAN is the one of most extensive application Fieldbus of the international community. At the same time, with the Internet's development and the improvement of production automation, managements hope to through the Internet or LAN to monitor the situation of the industrial site. Therefore, monitoring system connected to the Internet has become the trend of the times, the related research have very important actual means and extension value to carry out that the corporation information intranet interconnects with the Field Bus.
     The dissertation analyses the whole data communication technology between CAN Bus with Ethernet, and refer to the national standards , sueeessly realize the interconversion between CAN bus and Ethernet, enables CAN bus to connect with Ethernet facilely by using the advaneed ARM7 embedded processor with rapid speed, high performance.
     This paper analyses the CAN bus and Ethernet data transmission technology, and in the light of national standards, the use of the existing high-performance embedded ARM7 hardware development platform, and the CAN bus protocol and Ethernet mutual agreement between the conversion, CAN bus to facilitate access to Ethernet. Using construct a dynamic Web page on embedded platform to monitor the field data in CAN Bus.
     In this paper, the design and realize method of the hardware and software are presented. About hardware platform, LPC2129 which is based on ARM7TDMI-S? CPU core was selected,and CAN bus driver interface circuits、Ethernet interface circuit are expanded. In LPC2129, CAN interfaces with advanced acceptance filters are intergrated, so this system is mainly designed CAN bus driver circuit.RTL8019AS was chosen as Ethernet controller. To achieve high EMC perfomence,many methods were applied, such as optoelectronic isolation、shield. In order to ensure real-time, the RTOS--μC/OS-Ⅱwas chosen about software platform. After CAN bus drivers and and the underlying Ethernet function based onμC/OS-Ⅱ, embedded the standard TCP/IP to the targeted reductions and optimization. And, embedded Web server was designed based on TCP/IP. Dynamic Web page was realized to present field data.
     At last, this article discusses the multi-communication system design. After the introduction of the multi-computer system diagram, this paper introduced a multi-protocol design method, that is, application layer protocol based on independent design and communication conversion protocol. Working methods of multi-computer system was expatiated based on the router principle, and how to setting the interface controllers.
引文
[1]阳宪惠.现场总线技术及其应用[M].北京:清华大学出版社,1999.
    [2]夏锋,孙优贤.基于交换式以太网实现多现场总线集成[J].电力系统及其自动化学报,2003,15(4):58-62.
    [3]赵浩,李声晋,芦刚.基于CAN总线和以太网的远程监控系统设计[J].测控技术,2006,25(10):53-56.
    [4]刘学军,万曼影,师好智.基于AT91RM9200的CAN-Ethernet间的智能网关设计[J].工业控制计算机,2005,18(9):39-40.
    [5]马献果,曹奇英,焦阳.现场总线技术的应用及发展[J].石油化工建设,2006,28(3):22-23,44.
    [6]郑文波.控制网络技术[M].北京:清华大学出版社,2001.
    [7]马世平.现场总线标准的现状和工业以太网技术[J].机电-体化.2007,(3):6-8,13.
    [8]陈学珍,陈旭武.CAN总线及应用[J].电气传动自动化.2005,27(5):51-53.
    [9]吕皴.基于嵌入式Web的CAN总线控制器的研究[D].广州:广东工业大学,2006.
    [10]冯冬芹,金建祥,诸健.“工业以太网及其应用技术”讲座[J].自动化仪表,2002,6(6):36-38.
    [11]赵海.嵌入式Internet--21世纪的一场信息技术革命[M].北京:清华大学出版社,2001.
    [12]emWare,Inc,EMIT4 spec sheet.pdf,http://www.emware.com,2001.
    [13]eDevice,Inc,Smart Stack for Ethernet,http://www.edevice.com.
    [14]王勇,姚亦峰,陈抗生.一种嵌入式系统接入Internet的方法及实现[J].电子技术,2000,(9):12-15.
    [15]周立功等.ARM嵌入式系统基础教程[M].北京:北京航空航天大学出版社,2005.
    [16]PHILIPS Semiconductors.LPC2129 datasheet.PHILIPS INC,2004.
    [17]Sipex.Spx1117 datasheet.Sipex INC,2004.
    [18]National Semiconductor.LM1575/LM2575/LM2575HV datasheet.National Semiconductor INC,1999.
    [19]PHILIPS Semiconductors.PCA82C251 Datasheet.PHILIPS INC,2000.
    [20]Realteck.RTL8019AS Datasheet.Realteck INC,2000.
    [21]苏锦秀,杨庆江,张广璐.以太网控制芯片RTL8019AS详细配置[J].现代电子技术,2007,(22):151-153.
    [22]Jean J.Labrosse著,邵贝贝译.μC/OS-Ⅱ--源代码公开的实时嵌入式操作系统[M].北京:中国电力出版社,2001.
    [23]王田苗.嵌入式系统设计与实例开发--基于ARM微处理器与μC/OS-Ⅱ实时操作系统(第2版)[M].北京:清华大学出版社,2003.
    [24]PHILIPS Semiconductors.LPC2100 User Manual.PHILIPS INC,2004.
    [25]邵贝贝,许庆丰,王若鹏.什么是嵌入式实时操作系统[J].单片机与嵌入式系统应用,2001,(7):72-76.
    [26]朱涛.以太网与CAN总线通讯接口技术研究[D].武汉:武汉理工大学,2006.
    [27]方捷磊,朱杰.在嵌入式网络应用中实现TCP/IP协议[J].微电子学与计算机,2002,(5):28-30.
    [28]DaveH arrold.Industry Ethernet[J].Control Engineering,1999.
    [29]Tony Kinsella,Richard.Ethernet in Industrial Automation-Today andTomorrow [J].Intech,March 2001.
    [30]Behrouz A.Forouzan&Sophia Chung Fegan,TCP/IP协议族[M].北京:清华大学出版社,2001.
    [31]李元熙.基于ARM7的CAN总线到以太网网关研究与实现[D].南京:南京理工大学,2006.
    [32]袁学文.CAN总线与以太网互连系统设计[D].武汉:武汉大学,2004.
    [33]谢希仁.计算机网络(第4版)[M].北京:电子工业出版社,2005.
    [34]张莹.基于JuPiter处理器的嵌入式网关研究[D].广州:广东工业大学,2005.
    [35]刘国梅,郑安平.uClinux下动态Web技术的实现方法[J].单片机与嵌入式系统应用,2004,(2):67-69.
    [36]何伟,李家结.基于嵌入式Web服务器的远程温度监测系统的设计[J].可编程控制器与工厂自动化(PLC&FA),2007,(9):73-75.
    [37]盂一飞,戴胜华.基于嵌入式Web服务器的电源屏监控系统[J].计算机工程,2007,33(6):250-252.
    [38]罗隆.基于Ethernut的嵌入式多功能网关研究[D].广州:广东工业大学,2007.
    [39]Guelish.S.CGI Programming with Perl.O' Reilly&Associate,Inc.
    [40]Nick Witchey.Designing an Embedded Web Server http://www.computer.org.
    [41]EmWeb:The Embedded Web Server Solution for Device Access and Control.
    [42]张文亚,李恩,蔡丽等.一种基于1wIP的CAN/Ethernet嵌入式网关设计[J].计算机应用,2007,27(2):278-281.
    [43]GMBH RB.CAN Specification version 2.0[Z].1991.
    [44]李恩,蔡丽,梁自泽等.一种适用于煤矿安全监控系统的CAN总线应用层通讯协议[J].计算机应用,2006,26(9):2178-2181.