APP下载

非确定时序的多设备异波特率串行通信的研究

2016-03-17赵国军

计算机应用与软件 2016年2期
关键词:电梯设备

景 程 赵国军

(浙江工业大学特种设备制造与先进加工技术教育部重点实验室 浙江 杭州 310014)



非确定时序的多设备异波特率串行通信的研究

景程赵国军*

(浙江工业大学特种设备制造与先进加工技术教育部重点实验室浙江 杭州 310014)

摘要RS485是一种常规的通信总线,多设备通信一般采用主从式通信。但具体应用时,有些从设备对主设备询问的应答时间不确定,且应答时间无法更改。为此选取了一个主设备和三个从设备组成的模型进行研究,其中三个从设备分别具有不同的特性:能定时应答主设备询问和固定波特率的从设备,能定时应答主设备询问和波特率可设的从设备,以及非确定时间应答主设备询问和波特率可设的从设备。在此基础上提出三种通用的非确定时序的主从式多设备通信协议,并搭建平台进行了测试。结果显示传统的轮询通信协议在现场应用时难以满足实时性要求高的场合,采用插值异波特率通信协议能提高非确定时序的主从式多设备通信的效率,而且避免某些从设备误收数据,同时该通信协议可以适用于其他本身不能自动仲裁的现场总线通信。

关键词非确定时序主从式RS485

RESEARCH ON MULTI-DEVICE SERIAL COMMUNICATION IN DIFFERENT BAUD RATES WITH NON-DETERMINISTIC TIME SEQUENCE

Jing ChengZhao Guojun*

(Key Laboratory of Special Equipment and Advanced Manufacturing Technology, Ministry of Education, Zhejiang University of Technology, Hangzhou 310014, Zhejiang, China)

AbstractRS485 is a conventional communication bus, the multi-device communications generally use master-slave communication. But in specific applications, there are some slave equipments whose response time to master equipments’ inquiries are uncertain, and their response time cannot be changed. Therefore, the paper selects a model which consists of one master equipment and three slave equipments for studying, in it three slave equipments have different features respectively: the one makes timing response to master equipment’s inquiry and has fixed baud rate, the other makes timing response to master equipment’s inquiry but its baud rate can be set, and another one responds to master equipment’s inquiry in non-deterministic timing and its baud rate can be set as well. Based on this model we propose three common non-deterministic timing master-slave multi-device communication protocols, and build a platform to test them. Result shows that the traditional polling communication protocol is difficult to satisfy the occasions with high real-time performance demand when on-site applying, and to use interpolation different baud rate communication protocol can improve the efficiency of master-slave multi-device communication with non-deterministic timing, and prevents some of slave equipments from mistakenly receiving data, meanwhile the protocol can be applied to other field bus communication which cannot automatically arbitrating by themselves.

KeywordsNon-deterministic timingMaster-slaveRS485

0引言

RS485总线因其物理结构实现简单、传输距离远、传输速度较快、抗干扰能力强被广泛应用在工业控制领域[1]。RS485在应用层一般采用命令/应答方式,在多机主从式通信时需设计良好的通信协议[2]。武汉理工大学提供了一种改进的RS485主从通信方式,即把普通轮询改为多播轮询(一问多答),主设备发出的询问,各从设备根据设置的应答时间依次应答[3]。……

登录APP查看全文

猜你喜欢

电梯设备
谐响应分析在设备减振中的应用
帝奥电梯
基于VB6.0+Access2010开发的设备管理信息系统
基于MPU6050简单控制设备
被困电梯以后
电梯不吃人
500kV输变电设备运行维护探讨
电梯惊魂
乘电梯
如何在设备采购中节省成本