基于485总线的多锭位记录仪通讯系统研究毕业论文
2022-01-09 18:21:14
论文总字数:21548字
摘 要
目前,随着产品需求量的不断上升,工业现场生产设备也在随之增加,加大了设备管理的难度。因此为了方便多设备的集中管理,常采用一个主机通过总线对多个从机设备进行管理,即一主多从机制,总线常采用RS485总线。在通讯过程中一般使用Modbus协议,由于受到RS-485工作方式的限制,使用Modbus协议的通讯系统在需要读取从机数据时,从机只有在接收到主机发送的满足从机操作条件的指令后才能做出相应的响应。因此在从机出现异常情况时,不能及时将异常信息反馈给主机。
该课题是基于RS485总线多锭位记录仪通讯系统研究,对提高总线实时性与利用率进行研究,采用了从机通过对总线是否处于空闲状态进行检测,使从机可以主动向主机发送报警信号的方案,即多主机通讯机制。根据方案的设计,对数据传输过程中校验码、报文格式、应答流程、防碰撞机制进行研究,利用RS485总线,当从机采集到锭位机出现断纱掉纱情况时,主动向主机发送锭位机报警信息,从而解决异常信息不能及时反馈的问题。经过探讨,利用对总线是否处于空闲状态的检测来提高RS485总线的实时性和利用率具有可行性,可以对相关实验进行测试研究。
关键词:RS485总线 总线状态检测 校验码 报文格式 防碰撞机制 应答流程
Abstract
At present, with the continuous rise of product demand, industrial production equipment is also increasing, increasing the difficulty of equipment management. Therefore, in order to facilitate the centralized management of multiple devices, a host is often used to manage multiple slave devices through the bus, that is, a master multiple slave mechanism, and the bus is usually RS485 bus. Modbus protocol is generally used in the communication process. Due to the limitation of rs-485 working mode, when the communication system using Modbus protocol needs to read the slave data, the slave can only make the corresponding response after receiving the instructions sent by the host computer that meet the slave's operating conditions. Therefore, when there is an abnormal situation in the slave machine, the abnormal information cannot be fed back to the host machine in time.
This topic is based on the RS485 bus multi-spindle position recorder communication system research, to improve the real-time performance and utilization of the bus research, the slave machine through the bus is idle state detection, so that the slave machine can actively send alarm signals to the host program, that is, the multi-host communication mechanism. According to the design of the scheme, the check code, message format, response process and anti-collision mechanism are studied in the data transmission process. The RS485 bus is used to send the ingot position machine alarm information to the host when the ingot position machine breaks and loses yarn from the machine to the ingot position machine, so as to solve the problem that abnormal information cannot be timely fed back. After discussion, it is feasible to improve the real-time performance and utilization rate of RS485 bus by detecting whether the bus is idle, and relevant experiments can be tested and studied.
Key words: RS485 bus bus state detection check code message format anti-collision mechanism response proce
目 录
摘要......................................................................................................................................................................I
Abstract...............................................................................................................................................................II
第一章 绪论 1
1.1 研究背景意义 1
1.2 国内外直捻机研究现状分析 1
1.2.1 常见轮胎帘子线直捻机 1
1.2.2 上位机监控系统缺点 3
1.3本课题研究内容 4
第二章 通讯系统整体设计 5
2.1 系统整体结构 5
2.2 硬件主从模块电路框图. 6
2.3 系统软件轮询应答流程 6
2.4 本章小结 7
第三章 Modbus协议相关理论及原理 8
3.1 Modbus协议 8
3.2 Modbus通信流程 9
3.3 Modbus RTU模式 10
3.4 CRC16循环冗余校验 11
3.5 本章小结 12
第四章 通讯系统硬件设计 13
4.1 RS485总线通讯电路设计 13
4.1.1 总线电路影响因素及信号反射分析 13
4.2 硬件部分模块芯片选型 14
4.2.1单片机模块 14
4.2.2 RS485 总线状态检测模块 14
4.2.3 HX711(AD转换)模块 16
4.3 硬件原理图设计 18
4.3.1总体设计 18
4.3.2 RS485 总线状态检测模块 18
4.3.3 HX711模块 19
4.4 本章小结 19
第五章 通讯系统软件设计 20
5.1 主机部分 20
5.2 从机各个模块设计 20
5.2.1 主进程 21
5.2.2 启动任务 21
5.2.3 从机应答流程控制 22
5.2.4 接收主机操作指令和返回应答数据包 23
5.2.5 从机主动发送报警信息 24
5.3 总线故障检测 25
5.4 本章小结 26
第六章 总结与展望 27
6.1 总结 27
6.2 展望 27
参考文献 28
致 谢 30
请支付后下载全文,论文总字数:21548字