登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 物流管理与工程类 > 物流工程 > 正文

基于STM32对CANopen401设备协议的研究与实现毕业论文

 2021-05-25 10:05  

摘 要

现场总线技术历经了近半个世纪的蓬勃发展,已然成为当前现场设备控制系统与高级控制系统之间信息传输的主流技术。现场总线技术有利于实现分布式网络化的设备布局,总线设备具有便于开发、拓展和复用的柔性特征,以及总线通讯系统具有简于布线、易于诊断和便于维护等优势,促使现场总线技术成为未来现场通讯技术的主流发展方向。

CAN总线技术主要应用于分布式现场控制系统,CANopen协议是在CAN总线技术的基础上建立的开放性通讯协议。目前CANopen通讯协议以及CANopen设备正处于不断攀升的发展趋势,因此国内外针对CANopen高性能控制系统的研发和推广也方兴未艾。

课题研究结合CAN总线技术和CANopen协议目前的发展状况,探究了CANopen401设备协议的应用规范,提出了基于STM32的CANopen401设备协议主从站通讯系统架构,设计完善了系统的软硬件构件,实现了系统的CANopen通信。

本文首先对各项相关技术的发展历程和研究现状进行了深入的探究,分析技术的应用规范和适用领域;再基于对课题背景的分析,设计了基于PC端上位机主站和STM32嵌入式从站为系统核心的CANopen通讯网络架构;接着对CANopen301通讯协议和CANopen401设备协议的使用规范进行了总结与规划;然后设计并实现了系统主从站软硬件构件;最后对设计实现的CANopen通讯系统进行了实验测试,并对其加以改进、完善,规划课题研究未来的发展方向。

本设计基于PC和STM32平台,建立自动化控制通讯体系,实现对CANopen401设备协议通讯系统的研究与分析,未来使系统与实际应用项目相结合进行深入研究,使之应用与自动化通讯系统领域,促进其更好更快的发展。

关键词:现场总线;CANopen401设备协议;PC端主站;STM32嵌入式从站。

Abstract

After nearly half a century of development, the fieldbus technology has become the mainstream technology in information transmission between the current field equipment control system and advanced control systems. Fieldbus technology is conducive to realize the distributed networked equipment layout, the bus device has the flexible characteristics of easy to develop, expand and reuse, as well as the bus communication system has many advantages, such as simply to wiring, easy to diagnose maintain, all of these make the fieldbus technology become the main development direction of the field communications technology in the future.

CAN bus technology is mainly used in discrete control system, the CANopen protocol is an open communication protocol which is based on the CAN bus technology. Now, the communication protocol and the device of the CANopen are in a rising trend, therefore, the development and promotion aimed at the high-performance control system of the CANopen are also in the ascendant at home and abroad.

The research project combining with the current state development of the CAN bus technology and the CANopen protocol, explores the application specification of the CANopen401 equipment, proposes the master-slave communication system architecture based on the STM32 CANopen401 equipment, designs the perfect hardware and software components of the system, carry out the CANopen system communication.

First, this thesis studies in-depth on the development course and research status of the related technology, make an analysis of the technology application specification and applies field; next, based on background of research, designs the system architecture with PC master computer STM32 embedded slave station as the core; then, make a summary and plan on the usage specification of the CANopen301 communication protocol and the CANopen401 equipment agreement; after that, design and achieve system master-slave station hardware and software component ; Finally, the design and implementation of the CANopen communication system is tested and improved, at the same time, make a plan about the future direction of the research.

This design is based on the PC and the STM32, building the automation control and communications system, realizing the research and analysis of the CANopen401 device protocol communication systems, in the future, trying to make the systems and practical applications joint connection, in order to research in depth, with can be good used in the field of automation and communication systems, and promoting its development better and faster.

Key words:Fieldbus, CANopen401 Equipment Protocol, PC Master Station,

STM32 Embedded Slave Station.

目 录

摘要 I

Abstract II

1 绪论 1

1.1 研究背景 1

1.2 研究现状 2

1.2.1 现场总线研究现状 2

1.2.2 CAN总线研究现状 4

1.2.3 CANopen协议研究现状 4

1.2.4 STM32平台研究现状 5

1.3 研究内容 5

1.4 研究预期目标 6

1.5 研究目的及意义 6

1.6 研究论文结构 6

2 研究系统架构 8

2.1 研究方法 8

2.1.1 文献研究法 8

2.1.2 理论与实践相结合 8

2.1.3 系统分析 8

2.1.4 实验调试 8

2.2 研究路线 8

2.2.1 物理层建立 8

2.2.2 数据链路层建立 9

2.2.3 应用层建立 9

2.3 研究环境 10

2.3.1 硬件设计环境 10

2.3.2 主站开发环境 10

2.3.3 从站开发环境 11

2.4 系统总体架构 12

3 CANopen协议分析 13

3.1 CAN总线协议分析 13

3.1.1 CAN总线物理架构 13

3.1.2 CAN协议数据结构与应用 13

3.1.3 CAN总线竞争机制 14

3.1.4 CAN通讯局限性与CANopen协议 15

3.2 CANopen协议分析 16

3.2.1 CANopen简介 16

3.2.2 CANopen规范 17

3.2.3 CANopen对象字典和通信模型 17

3.2.4 CANopen通讯对象 19

3.2.4.1 网络管理对象(NMT) 19

3.2.4.2 服务数据对象(SDO) 20

3.2.4.3 过程数据对象(PDO) 20

3.2.4.4 同步对象与CANopen同步机制 21

3.2.4.5 其它通讯对象 22

3.3 CANopen401设备协议分析 23

3.4 本章小结 23

4 系统硬件设计 24

4.1 主站硬件设计 24

4.1.1 主站硬件原理设计 24

4.1.2 主站硬件性能分析 26

4.2 从站硬件设计 28

4.1.1 从站硬件原理设计 28

4.2.2 从站硬件性能分析 30

4.2.2.1 TJA1050收发器性能 30

4.2.2.2 STM32F407概述 31

4.2.2.3 bxCAN概述 32

4.2.2.4 bxCAN主要特性 32

4.2.2.5 bxCAN介绍说明 33

4.3 本章小结 34

5 系统软件设计 35

5.1 主站软件分析 35

5.2 从站软件分析 39

5.3 主从站通讯分析 42

5.4 本章小结 42

6 实验测试及结果分析 43

6.1 实验测试硬件设备与功能 43

6.2 CANopen通讯系统实验结果 44

6.3 本章小结 45

7 总结与展望 46

7.1 全文总结 46

7.2 经济性分析 46

7.3 研究展望 46

参考文献 48

附录 50

致谢 53

1 绪论

课题针对目前实现现场设备智能控制网络与控制系统之间通讯的主流技术——现场总线技术进行深入研究。根据总线技术能够实现分布式网络化的设备布局,总线设备具有便于开发、拓展和复用的柔性特征,以及总线通讯系统具有简于布线、易于诊断和便于维护等优势,基于目前在离散型控制领域研发和推广如火如荼的CAN总线技术和CANopen协议,提出了一种现场总线通信网络系统。

课题研究结合CAN总线技术和CANopen协议目前的发展状况,探究了CANopen401设备协议的应用规范,提出了基于STM32的CANopen401设备协议主从站通讯系统架构,设计完善了CANopen协议现场设备通讯网络系统中的CANopen从站节点设备的软硬件构件,完成硬件原理设计与制作,对软件编写采用模块化集成式编程方法,实现了系统的CANopen通信,并对其进行实验测试,加以改进和完善,以便未来能将该系统应用于实际工程项目中。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图