收藏 分享(赏)

中小规模可编程逻辑控制器的研制硕士学位论文.doc

上传人:无敌 文档编号:690461 上传时间:2018-04-18 格式:DOC 页数:94 大小:4.82MB
下载 相关 举报
中小规模可编程逻辑控制器的研制硕士学位论文.doc_第1页
第1页 / 共94页
中小规模可编程逻辑控制器的研制硕士学位论文.doc_第2页
第2页 / 共94页
中小规模可编程逻辑控制器的研制硕士学位论文.doc_第3页
第3页 / 共94页
中小规模可编程逻辑控制器的研制硕士学位论文.doc_第4页
第4页 / 共94页
中小规模可编程逻辑控制器的研制硕士学位论文.doc_第5页
第5页 / 共94页
点击查看更多>>
资源描述

1、分类号: 密级: 硕 士 研 究 生 学 位 论 文中小规模可编程逻辑控制器的研制 分类号: 密级: 硕 士 研 究 生 学 位 论 文中小规模可编程逻辑控制器的研制 专 业: 信号与信息处理 研究方向: 信号获取与处理研 究 生: 指导教师: 论文起止日期:2011 年 4 月至 2012 年 5 月Development of Small and Medium-scale Programmable Logic ControllerMajor: Signal and Information ProcessingDirection of Study:Signal acquisition and

2、 processingGraduate Student: Kan WeiSupervisor: Prof. Weng HuihuiSchool of Electronics & Information Yangtze UniversityApril ,2011 to May,2012I学位论文原创性声明本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律后果由本人承担。作者签名: 日期: 年

3、月 日学位论文版权使用授权书本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。本人授权 大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。涉密论文按学校规定处理。作者签名: 日期: 年 月 日导师签名: 日期: 年 月 日II摘 要可编程逻辑控制器(PLC),是一种为工业控制特别设计的专用计算机。因为它易于设置和编程,运行可预估,甚至在恶劣的生产环境下还可以保持正常工作,所以广泛应用于工业控制。本课题设计了一个基于 dsPIC30F4013

4、单片机的小型通用控制器,目的是在小型控制系统中能够替代 PLC,实现更加灵活的应用方案并在保证可靠性的基础上大大降低成本。本课题所设计的系统在硬件上参照 PLC 的体系结构,在 dsPIC30F4013 单片机的基础上扩展了丰富的外围设备,实现了 PLC 的大部分功能,包括中央处理器(CPU)、数字量 I/O、高速脉冲 HSC、模拟量 I/O、串口及以太网通信等,并设计了专门的输入输出点处理电路,使系统具有良好的抗干扰特性和驱动能力。在软件设计上针对 MODBUS 通讯协议的特点,采用 C 函数编程实现了通信数据的提取、解析和发送。采用 CRC 校验方法,保证了通信数据的准确性。基于dsPIC

5、30F4013 的中小规模可编程逻辑控制器的研制,适应了工业控制机向嵌入式发展的趋势,提供了更灵活的软、硬件方案,并大大降低了控制系统的成本13,具有较高的实用价值。本控制器是集远程数据采集、计量与自动控制于一体的 PLC。主要市场定位于天然气长输管道的各个阀室中,阀室一般只有阀门和管道,而没有计量调压设备,因此 I/O 点数相对较少,工艺流程相对简单。以往用户都是选用进口的 PLC 控制器来对阀室进行数据采集和监控,一定程度上造成了 PLC 系统资源的浪费,且其高昂的成本也使用户较难接受。针对这种情况,我们研制出一款基于 MODBUS 协议的中小型 PLC 系统来满足这种特定的市场需求。系统

6、采用一体化结构并集成了 AI、AO、DI、DO 和 HSC 五类信号输入输出通道。AI 通道能采集现场仪器仪表的标准 420mA 信号,通过板内的跳线设置,能接受两线制或三线式仪器仪表;DI 通道提供开关数据采集通道,输入信号类型为干触点输入;AO 通道有两种可选择的输出信号类型,分别是 420mA 或者15V 信号;DO 通道提供开关数据输出通道,输出信号类型为干触点输出,且可通过板上的拨动开关选择常开触点输出或常闭触点输出两种方式;HSC 通道能检测频率不超过 15KHz 的信号。现场总线是当今自动化领域发展的热点之一,被誉为自动化领域的计算机局域网。它作为工业数据通信网络的基础,沟通了生

7、产过程现场设备之间的联系。MODBUS 作为一种有效支持分布式控制和实时控制的现场总线协议,以其稳定性好、可靠性高、抗干扰能力强、通讯速率高、维护成本低等优点越来越受到人们的重视,并被公认为最有前途的现场总线之一。很多工业设备,诸如PLC、DCS,智能仪表等都使用 MODBUS 协议作为它们之间的通信标准。因此,基于 MODBUS 协议的现场总线的研究与开发具有非常现实的意义。 III本文在简要分析了当前最具影响的几种现场总线协议的基础上,对 MODBUS总线协议进行了深入研究,主要包括 MODBUS RTU 和 MODBUS TCP 两种协议,设计了基于 MODBUS 协议的中小规模可编程逻

8、辑控制器,同时对设计的系统的可行性在实际中的应用做了说明,并给出了本控制器在工业现场实际应用的例子,内容包括以下三个部分:1、研究并阐述了 MODBUS 协议的格式和定义及其体系结构,对该总线协议的各个部分,包括协议的传输方式、帧的构成、错误校验、功能码等给出了详尽的描述;2、研究了基于 MODBUS 协议的中小规模可编程逻辑控制器的设计思想和系统结构,并完成了控制器实物的设计。该控制器本质上是一种对生产现场进行控制和管理的网络,具有很高的实时性、可靠性、数据完整性和可用性,通过专门的接口和设备完成与上层工厂信息系统的数据交换和传递。3、通过文字、数据、图片等方式展示了该控制器在一个实际的工业

9、工程控制领域的成功应用,体现了设计的基于 MODBUS 协议的中小规模可编程控制器的可行性。同时,简要说明了系统应用的情况和市场前景。通过实际应用表明,基于 MODBUS 总线协议设计的控制器在可靠性、容错处理、数据交换、系统管理、抗干扰等方面都比传统仪表组成的系统功能强。在控制系统领域将会有很大的发展空间和市场。关键词:PLC, dsPIC30F4013 单片机, MODBUS 协议, 控制器 IIIAbstractProgrammable logic controllers, also called programmable controllers or PLCs, are special

10、-purpose computers used for industry control. They are easy to configure and program, foreseeable when running, and can keep working well even in tough industry environment. So PLCs are widely applied in industry control. A small general-purpose controller based on dsPIC30F4013 is designed in this p

11、aper, as a substitute for PLCs in some small control systems. This controller can be configured and program in a more flexible way, and reduces the cost largely on the premise of good reliability.In respect of hardware design, the system in this paper designed plenty of peripheral equipment based on

12、 dsPIC30F4013 according to the architecture of PLCs, realizes most of the necessary modules of PLCs, including CPU(Central Process Unit), digital I/O,HSC(high-speed pulse), analog I/O, serial port communication, human-machine-interface, and so on. Special process circuits are designed for I/O device

13、, which enhance the systems ability for anti-interference and drive. As to software, according to the characteristic of MODBUS information frame, the system achieves the function of capturing,analyzing and sending information data by the program compiled in C function programming language. The appli

14、cation adopts CRC checksum method to ensure the accuracy of communication dataThe design of this embedded controller based on dsPIC30F4013 complies with the trend of the development of industry control, and provides a more flexible way to develop control system, and reduces the cost largely, but pos

15、sessed high practical value.This controller is a set of remote data acquisition, measurement and automatic control in one PLC. The major market position is in the valve chambers of long gas pipeline. Valve chambers, generally only have valves and pipes, and no measurement of pressure control equipme

16、nt, so the number of I/O points is relatively small and the process is relatively simple. In the past, the users adopt the imported PLC controllers to data collection and monitoring for the valve chambers, to some extent it is a waste of resources for the PLC system, and it is difficult for users to

17、 accept the high cost. In view of this situation, we develop a small and medium-sized PLC systems based on MODBUS protocol to meet the market demand.The system uses the integrated structure and the integration of AI, AO, DI, DO, and HSC five types of signals which are input and output channels. The

18、channels of AI can capture the standard 4-20mA signal of field instrumentation, and they can acquire the signal of two-wire or three-wire instrumentation through board jumper IVsettings. The channels of DI provide switch data acquisition channels, and the type of the input signal is dry contact inpu

19、t. The channels of AO have two selectable output signal types, namely, 4-20mA or 1-5V signals. The channels of DO provide switch data output channels, and the type of the output signal is dry contact output, besides, we can select normally opened contact output or normally closed contact output by t

20、he panel toggle switch. The channels of HSC can detect the frequency which is no more than 15KHz signal.Field bus is one of the hotspot in automation development,and which is regarded as a computer LAN in automation areaAs a foundation of industrial communication network, field bus links up the fiel

21、d equipments of production processMODBUS field bus is a technology which efficiently supports distributed real time with a very high level of security. It attracts attention with a very high level of capability and a very high level of security and a very better of anti-jamming and a very fast of co

22、mmunication speed and a very low of maintenance cost and a particular design. It is regarded as one of field bus with expansibility. Many industrial equipments, such as PLC,DCS and intelligent instruments use MODBUS as their communication standards. It is realistic meaning to research and develop in

23、strument based on field bus.In this dissertation, the most popular MODBUS techniques currently used are reviewed briefly, a systematic analysis on the MODBUS based field bus control system is presentedA General-Purpose Controller based on MODBUS is designed while its feasibility and potential applic

24、ations is demonstratedThe main work of this dissertation is listed below:First, the format and then definition of the system structure of MODBUS protocol are introduced briefly. This part in detail described the different parts of the bus protocol, which include the transmission method, the frame st

25、ructure, error verification, function code, and so onSecond, the design theory and system structure based on the MODBUS protocol in the field bus control system are investigatedThe General-Purpose Controller is constructed according to this protocolThis system basically is a control and manage netwo

26、rk, which has high real-time,high reliability, data integrality, and usabilityThe data exchange and transfer between this system and the company information system are realized by the special interfaces and equipmentThird, a successful application of the General-Purpose Controller is demonstrated in

27、 the area of the industrial engineering, by text, data and figuresThe VGeneral-Purpose Controller is proved by this applicationThe potential system applications and market forecast are introduced as well in this partThrough the application in the real world,comparing with the traditional control sys

28、tem, the system proposed in this paper has been found that the MODBUS control system shows great advantages in terms of reliability, error-handling, data exchange,system management, as well as anti-interruption for environmentalTherefore, it will have a great future and market in instrument control

29、areaKeywords: PLC, dsPIC30F4013 Microcontroller, MODBUS Protocol, ControllerV目 录摘 要 .IAbstract.III目 录 .V第 1 章 绪论 .11.1 课题的研究背景 .11.2 可编程逻辑控制器概述 .11.3 现场总线 .51.4 课题研究的意义 .101.5 基于 MODBUS 协议的控制器的发展现状 .121.6 论文的主要研究内容 .131.7 本章小结 .13第 2 章 MODBUS 通讯协议研究 .142.1 MODBUS 协议标准 .142.3 MODBUS 协议在串行链路上的实现 .202.

30、4 MODBUS 协议在 TCP/IP 上的实现 .232.5 本章小结 .28第 3 章 中小规模可编程逻辑控制器的方案设计 .293.1 系统设计要求 .293.2 总体方案设计 .293.3 dsPIC30F4013 单片机简介 .303.4 CPU 资源分配 .323.5 本章小结 .34第 4 章 中小规模可编程逻辑控制器的硬件设计 .354.1 基于 dsPIC30F4013 的最小系统设计 .354.2 通信接口电路设计 .384.3 系统电源设计 .424.4 系统 I/O 接口电路设计 .444.5 本章小结 .52第 5 章 中小规模可编程逻辑控制器的软件设计 .535.1 开发环境介绍 .535.2 总体软件设计 .535.3 主站系统软件设计 .555.4 从站系统软件设计 .575.5 模拟量输入通道接口程序设计 .635.6 开关量输入通道接口程序设计 .64

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 学术论文 > 管理论文

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报