登录

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

注册

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

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 机械机电类 > 测控技术与仪器 > 正文

化工园区无机有毒气体监测系统485通信设计毕业论文

 2022-01-26 12:01  

论文总字数:23151字

摘 要

化工园区的大气成分监测除常规的气体成分监测外,还需监测HCl、NH3、HF、H2S等无机气体成分,精确地监测化工园区大气中有毒气体为控制排污标准的制定、环境监测、管理及废气排放收费提供了科学依据。在监测系统中,通信部分起到了重要的作用,一个准确可靠的通信系统能够为园区的监测提供实时有效的数据监测。

RS485总线在工业园区中运用广泛,采用485总线来进行通信能够进行远距离的传输,但是适合于485接口标准的通信协议不一,所以还需要设计一个合适的协议来支持通信,Modbus协议简单实用,用于实现对数据的读取有很好的效果,所以本系统将会采用到485总线和Modbus协议来设计。

基于此,本次设计完成了有毒气体检测仪通讯模块基于485总线和Modbus协议的设计,实现信号的传输,使通讯模块具有较高的可靠性,系统主要是一个主从模式的通信,上位机可与485芯片的收发口连接实现通讯功能,主机与从机之间通过从机的串口收发数据,单片机的串口通信为系统的基础,上位机在接收到从机返还的指令后进行数据处理,从而实现对园区气体的监测。

 

 

关键词:RS-485 MODBUS通信协议 主机从机 串口通信

Design of 485 communication system for monitoring inorganic toxic gases in chemical industry park

Abstract

In addition to conventional gas composition monitoring, the atmospheric composition monitoring of chemical industry parks also needs to monitor the inorganic gases such as HCl, NH3, HF, H2S, etc. The accurate monitoring of toxic gases in the atmosphere of chemical industry parks provides a scientific basis for the formulation of emission control standards, environmental monitoring, management and waste gas emission charges. In the monitoring system, the communication part plays an important role. An accurate and reliable communication system can provide real-time and effective data monitoring for the monitoring of the park.

RS485 bus is widely used in industrial parks. It can communicate with 485 bus for long-distance transmission. But the communication protocols suitable for 485 interface standard are different. So we need to design a suitable protocol to support communication. Modbus protocol is simple and practical. It has a good effect to read data. So this system will adopt 485 bus and Modbus bus. Protocol design.

Based on this, this design completes the design of the communication module of toxic gas detector based on 485 bus and Modbus protocol, realizes the transmission of signals, and makes the communication module more reliable. The system is mainly a master-slave mode communication. The upper computer can connect with the receiving and sending ports of 485 chip to realize the communication function. The data between the host computer and the slave computer can be sent and received through the serial ports of the slave computer, and the single chip computer can receive and receive data from the slave computer. Serial communication is the basis of the system. Upper computer processes the data after receiving the instructions returned from the slave computer, so as to realize the gas monitoring in the park.

Key words: RS-485;MODBUS protocol;host-slave;serial communication

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 研究背景及意义 1

1.2 研究现状 2

1.3课题介绍 3

第二章 系统主要模块介绍 4

2.1 RS485总线 4

2.2 ADM2587E芯片 4

2.3 RS485方式构成的通信系统 7

第三章 硬件设计 10

3.1 ADM2587E芯片 10

3.2 电源模块 11

3.3 单片机通信系统主板部分 13

第四章 程序设计 15

4.1 Modbus介绍 15

4.1.1 Modbus协议与RS485关系 15

4.1.2 Modbus协议介绍 15

4.2程序主体设计 19

4.3通信协议 20

4.4 STM32CubeMX实现部分 20

4.5 Keil编写部分 22

4.5.1 串口空闲中断 DMA方式传输 22

4.5.2 Modbus处理函数 23

4.6上位机部分 24

第五章 调试与问题解决 26

5.1 程序运行结果 26

5.2关于RS485布线 26

5.3 MODBUS协议调试时出现的问题和原因 27

第六章 总结与展望 29

6.1总结 29

6.2展望 29

参考文献 31

致谢 33

第一章 绪论

1.1 研究背景及意义

在工业化日益突出的今天,化工产品在生活中扮演着重要的作用,化工园区的数量也在增加,伴随着工业生产而产生的各种各样的有毒有害气体对人类的危害也愈加显得严重。除了我们熟知的CO、SO2等气体的危害,还需监测HCl、NH3、HF、H2S等无机气体成分,各类挥发性有机化学物质对人类健康和安全的危害也已经受到越来越多的关注[1]。根据国家标准,二类区(工业区)的气体排放应按照标准进行实时监测,应客观地反映实际情况。同时,人们也越来越注重大气环境对自身身体健康和安全的影响,再加上近几年来关于工业园区的排放气体流入居民生活区,给居民造成严重危害的新闻被曝光,很难让人们不去在我们生活的环境周围可能存在有毒气体,人们也开始意识到对大气监测的必要性,尤其是化工园区的监测。现代气体传感器检测技术已经为我们提供了一个可以方便、快速获得所处环境中有毒有害气体存在与否的有效手段。

目前,适应不同用途、工艺成熟、技术可靠的装备有气体感器的气体检测、监测仪器已经在各个行业、部门得到了广泛的应用[2]。这些测量仪器能够测量出现场有害气体存在的浓度,更智能的仪器可以在超标时候报警。此外,日益发展的电子技术对于与其他设备的互联起到了重要作用,通过设备的控制从而实现监测等操作,能够很大程度上避免或减少有毒有害气体对人们生命和健康的危害,例如采用氧气传感器直接测量烟气、有毒气体含量[3]。在这一过程中,通讯系统起到了至关重要的作用,有毒气检测系统的通讯模块软件的设计帮助实现信号的有效传输[4]

请支付后下载全文,论文总字数:23151字

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

企业微信

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