基于嵌入式ARM的MODBU协议的研究与实现1
下载后可任意编辑 论文题目: 基于嵌入式ARM的MODBU协议的讨论与实现 专 业: 电子信息工程 学 生: 孙玉鑫 签名: 指导老师: 孙弋教授 签名: 摘 要 电子技术的迅速进展极大的改善了人们的生活,彻底的改变了世界的面貌。在工业控制领域现场总线控制系统(FCS)的出现和进展彻底改变了传统的可编程控制器(PLC)和分散式控制系统(DCS)基本结构。现场总线系统技术极大地简化了传统控制系统繁琐且技术含量较低的布线工作量,使各种并行通信转向串行通信,使系统检测和控制单元的分布更趋合理。Modbus通信协议作为现场总线的一种,具有数据传输量大、可扩展性好、可靠性好等优点,它目前已成为自动控制和通信领域使用非常广泛的通信语言。 Linux操作系统以其开源、免费、易于移植,支持众多的处理器而得到了广泛的应用。ARM处理器具有成本低、功耗低、易开发和性能好等特点,其中的S3C2410性价比、可靠性较高可作为本系统的硬件平台。 本论文首先介绍了Modbus协议的法律规范,协议的通信原理以及对协议的具体实现过程。之后对嵌入式Linux操作系统平台的建立、构造以及内核的制作、移植、烧录等过程也进行了的阐述,最后实现了基于RS485接口的Modbus串口编程。 【关键字】 ARM 嵌入式Linux Modbus总线 串口通信 【论文类型】设计型 下载后可任意编辑 Title: Research and Implementation of Modbus Protocol on ARM-Based Embedded System Major: Electronic ination engineering Name: Sun Yuxin Signature: Supervisor: Professor Sun Yi Signature: Abstract The rapid development of electronic technology has greatly improved people s lives, completely changed the world. The emergence and development in the field of industrial control field bus control system (FCS) completely changed the basic structure of the traditional programmable logic controller (PLC) and distributed control systems (DCS). Field Bus System greatly simplifies the workload of the tedious and low-tech effort traditional control system wiring, which turns a variety of parallel communication to serial communication, at the same time makes the distribution of the system detection and control unit more reasonable. As a member of field bus ,Modbus protocol has been widely used in the field of automatic control and communication because of its good capacity of data transmission ,and its expandability and reliability. Linux is open-source, free, easy to port, and supporting a large number of processors, so it is widely used, particularly in the embedded field. ARM processor with its low cost, low power consumption, easy development and good perance characteristics, which S3C2410 cost-effective, high reliability can be used as the hardware plat. First,the Modbus protocol specification, protocol communications principles and a specific implementation of the Modbus protocol are introduced .Embedded Linux operating system plat, after the establishment, structure and core production, transplant, burn and other processes have also been elaborated, and finally to achieve interface based on RS485 Modbus serial programming. 【Keywords】ARM Embedded Linux Modbus BUS Serial Communication 【Type of Thesis】 Design 下载后可任意编辑 目 录 1.绪 论1 1.1引言1 1.2课题讨论背景与现状1 1.3讨论内容2 1.4论文组织与安排2 2. MODBUS现场总线综述4 2.1现场总线的实质和优点4 2.2 MODBUS现场总线协议概述5 2.3 Modbus协议在串行链路上的实现6 2.3.1 Modbus串行链路协议OSI模型对应关系6 2.3.2 Modbus主站/从站协议原理7 2.3.3两种串行传输模式8 2.4 MODBUS应用层协议14 2.4.1 MODBUS功能码14 2.4.2 MODBUS异常响应15 3.嵌入式硬件平台18 3.1嵌入式简介18 3.1.1嵌入式系统特点18 3.1.2嵌入式操作系统19 3.1.3嵌入式的开发过程19 3.2硬件平台介绍20 3.3 RS485模块22 3.3.1 串口基本类型介绍22 3.3.2 串口电路设计23 3.