Design of multi-host communication protocol module of RS485 based on class token ring
-
摘要: 针对现有煤矿安全监控系统的RS485总线采用主控机对子通信节点轮询呼叫方式存在实时性差、无法实现即插即用功能、通信效率低的问题,设计了一种基于类令牌环的RS485多主通信协议模块。令牌信息包含在每个数据帧的帧头,RS485总线空闲4 byte时间内为帧结束标志,RS485总线空闲4~5 byte时间内为关键设备抢发时间,RS485总线空闲5~6 byte时间段为一般设备抢发时间;正常情况下通信节点按令牌顺序轮流与主控机交互数据,当设备有紧急情况需要抢先上传数据时,可在抢发时间内抢占RS485总线。测试分析表明,在RS485总线容量不大且信道干扰较小的情况下,该模块具有良好的使用效果。Abstract: In view of problems of bad real-time performances, no plug-and-play function and low communication efficiency existed in poll calling mode of main control computer for communication nodes used by RS485 bus of current coal mine safety monitoring and control system, a multi-host communication protocol module of RS485 based on class token ring was designed. Token information is included in frame head of each frame, it is frame end mark in 4 byte time of RS485 bus idle state, it is snatching sending time of key devices in 4~5 byte time of RS485 bus idle state, and it is snatching sending time of common devices in 5~6 byte time of RS485 bus idle state. Communication modes exchange data with main control computer by turns according to token order under normal condition. While one device needs snatch to send data under emergency condition, it can snatch RS485 bus in snatching sending time. Test analysis shows that the module has good application effect under conditions that RS485 bus has little capacity and channel interference.
点击查看大图
计量
- 文章访问数: 120
- HTML全文浏览量: 23
- PDF下载量: 3
- 被引次数: 0