摘 要 现场总线是一种数字通信协议,也是一种数字通信的系统,还是一种自动化控制网络。以现场总线为基础而发展起来的全数字控制系统称为现场总线控制系统。 现场总线发展迅速,其中最有影响的是基金会现场总线。基金会现场总线为适应自动化系统,特别是过程自动化系统在功能、环境与技术上的需要而专门设计的,它分低速现场总线和高速现场总线两部分。其中低速现场总线以国际标准化组织/开放式系统互连模型为基础,取其物理层、数据链路层和应用层,并在应用层之上增加了用户层,构成了四层结构的通信模型。 本系统主要是研究基金会现场总线中的低速现场总线的数据链路层的功能和特点,并设计和实现一套基于基金会现场总线的数据链路层协议的串行口通信系统,完成现场设备通信过程中的总线访问控制等功能,对于具体的应用有重要的意义和价值。 关键词:现场总线控制系统;基金会现场总线;串行口 Abstract Field-Bus is a kind of digital communication agreement, and it also is a kind of system of digital communication, still is a kind of automation control cross-domain communication. Takes the Field-Bus as the foundation and the total number word brain developed is called FCS(Field-Bus Control System). The development of Field-Bus is rapid, and what among them has most the influence is FF (Foundation Field-Bus). FF serve as to suit the automation system, the especially process automation system at the function and environment special design with the needs in the technology, it divides two parts, low speed (FF-H1) and high speed (FF-HSE). Among them FF-H1 takes ISO / OSI 's model as the foundation, and takes his physics layer, data link layer and applying layer, and increases the user layer above applying layer, and formed the communication model that four stratifications construct. This system chiefly studied the function and the characteristic t of FF-H1's data link layer, and the design with implement one set based on Serial Port communication of FF’s data link layer protocol, the functions such as control are visited by the bus accomplished in the equipment communication course of scene, and have important meaning and value as for the concrete application. Key word:Field-Bus Control System;Foundation Field-Bus;Serial Port 目 录 绪 论 1 第1章 现场总线与现场总线控制系统 2 1.1 现场总线 2 1.2 现场总线控制系统 2 1.3 基金会现场总线 3 第2章 数据通信基础 6 2.1 数据通信的分类方式 6 2.2 串行通信基础 7 第3章 DELPHI5中串行通信的实现 11 3.1 DELPHI5开发环境介绍 11 3.2 DELPHI5实现串行通信的方法 11 第4章 系统总体设计 15 4.1 系统硬件设计 15 4.2 系统软件设计 19 第5章 系统详细设计 22 5.1 MSCOMM通信控件应用 22 5.2 通信系统界面设计 24 5.3 程序主体设计 25 5.4 疑难技术分析 32 第6章 系统调试与测试 33 参考文献 35 致 谢 36 绪 论 随着计算机技术、通信技术、控制技术、大规模集成电路及智能仪表的发展,在工业控制领域出现了一种新兴的控制技术,即现场总线技术[1]。它是上述几种技术的综合,是当今自动化控制技术发展的热点,代表了工业自动化控制领域的一种发展方向。 现场总线的发展至今,共经历了以下几个阶段:(1)人工控制阶段;(2)模拟仪表控制阶段(50年代初期);(3)计算机集中监控阶段(60年代初期);(4)分布控制系统(DCS)阶段(70年代初);在现场总线技术诞生的初期,它的主要功能是将当时的可编程逻辑控制器(programmable logic controller, PLC)以一种较简洁的方式连接起来。随着计算机技术引入PLC,计算机通信技术被引入现场总线;PLC功能的增强对现场总线提出了更高的要求,计算机通信技术的引入大大增强了现场总线的功能,成为现场总线技术发展的主要趋势。在分散型控制系统(distribution control system,DCS)的发展历程中,较早地在站间通信中采用了局域网(local area network--- LAN)技术。 现场总线控制系统(FCS,Field-bus Control System)则突破了DCS的限制,把基于封闭的、专用的解决方案变成了基于公开化、标准化的解决方案,把来自不同厂家的设备能够互连在一起,组成大范围的信息网络的共享系统。在这一过程中,各厂家必须遵循共同的标准,现在比较有影响的现场总线标准有:基金会现场总(FF,Foundation Field-bus)、Lon Works, PROFIBUS, CAN, HART。 在上面的几种总线标准中,其中最有影响的是基金会现场总线FF,它以美国Fisher-Rosemount公司为首,联合美国、欧洲等地的150多家公司制定的一种现场总线协议。它以ISO/OSI开放系统互连模型为参考,制定了自己的通信模型,在这一模型中有物理层,数据链路层,应用层,用户层。其中数据链路层是最主要的一层,它控制着总线上的各种传输活动。 本系统主要功能:基于FCS的串行通信的研究与实现,从数据链路层的功能和特点展开,以FF数据链路层协议为准,实现现场设备通信过程中的总线访问控制。在现实应用中,有重要的意义和价值。 |