文档介绍:河北工业大学
硕士学位论文
基于PROFIBUS-DP总线的智能通用接口的开发与设计
姓名:聂娜娜
申请学位级别:硕士
专业:控制理论与控制工程
指导教师:孙鹤旭
20081101
河北工业大学硕士学位论文
基于 PROFIBUS-DP 总线的智能通用接口的开发与设计
摘要
随着智能芯片技术的发展成熟,设备的智能程度越来越高,因此,在智能设备之间使
用基于开放标准的现场总线技术构建自动化系统的技术也逐渐成熟。PROFIBUS 现场总
线具有通信实时性强、高传输率、低成本、拓扑结构灵活多样、冗余性强、适于各种工控
领域等优点而得到广泛应用。然而,现场总线领域至今没有形成一个统一的标准,依然是
多种现场总线并存。本课题旨在设计一款通用的高速 PROFIBUS-DP 从站接口,从而使普
通的设备可以方便地挂接到总线上。
本文首先研究了 PROFIBUS-DP 的协议结构、数据通信原理,接着以此为依据,设计
了具有 PROFIBUS-DP 接口的智能从站。通过分析对比“MCU+ASIC”硬件协议转换和
“MCU 软件协议转换”两种实现方式,确定了硬件协议转换方式,并选用了 SIEMENS
SPC3 作为从站 PROFIBUS-DP 协议处理芯片。从站接口硬件设计以 STC89C58 MCU 芯片
和 SPC3 芯片接口电路以及双口 RAM 电路为核心,外加辅助接口电路构成。重点阐述了
PROFIBUS-DP 协议专用芯片、双口 RAM、RS485 以及总线驱动与光耦的硬件电路设计,
软件设计主要阐述了 SPC3、X5045 驱动程序设计、双口 RAM 的内存规划与程序设计和
中断程序设计。最后搭建了基于 PC 的 PROFIBUS-DP 主从站试验调试系统,在 PLC 中组
态主从站,加入自主开发的 GSD 文件、STEP7 通信程序最终实现了主-从站的双向数据通
信,而且性能稳定、通用性较好,从而验证了论文的设计。
关键词:PROFIBUS-DP,通用接口,协议专用芯片
i
基于 PROFIBUS-DP 总线的智能通用接口的开发与设计
DEVELOP AND DESIGN OF INTELLIGENT UNIVERSAL
INTERFACE BASED ON PROFIBUS-DP
ABSTRACT
With the intelligent chip technology developed, equipments are ing more intelligent.
so the technology to build automation systems based on opened standard fieldbus between
intelligent devices has gradually matured. PROFIBUS has widespread usage because it's
advantages; such is munication real-time character, high transmitting rate, low cost,
topological structure flexible, high redundant, suitable for various kinds of industrial control
field, etc. But, the field of fieldbus doesn't have formed a unified standard yet, a variety of
fieldbus remaining existence. The objective of the research is to design a high-speed and
universal slave interface for PROFIBUS-DP, so an ordinary device can be connected on this bus
conveniently.
First, the protocol structure munication principle of PROFIBUS-DP are analysed
in this paper. According to this principle, the intelligent slave interface for PROFIBUS-DP is
designed. Analysed an