计算机应用 ›› 2015, Vol. 35 ›› Issue (2): 309-312.DOI: 10.11772/j.issn.1001-9081.2015.02.0309

• 网络与通信 • 上一篇    下一篇

嵌入式控制结点群上的一种通信方案设计

周海洋, 车明   

  1. 天津大学 计算机科学与技术学院, 天津 300072
  • 收稿日期:2014-08-26 修回日期:2014-11-15 出版日期:2015-02-10 发布日期:2015-02-12
  • 通讯作者: 周海洋
  • 作者简介:周海洋(1990-),男,天津人,硕士研究生,主要研究方向:嵌入式单片机系统; 车明(1964-),男,天津人,副教授,硕士,主要研究方向:嵌入式系统、计算机自动控制系统、无障碍人机交互。
  • 基金资助:

    国家科技支撑计划项目(2012BAJ24B04-4)。

Communication scheme design for embedded control node cluster

ZHOU Haiyang, CHE Ming   

  1. School of Computer Science and Technology, Tianjin University, Tianjin 300072, China
  • Received:2014-08-26 Revised:2014-11-15 Online:2015-02-10 Published:2015-02-12

摘要:

为解决现行RS485组网方式限制了通信节点数及网络扩展的问题,基于RS485总线提出了一种嵌入式控制结点群的组网方式及控制协议。通过在主控器与叶子节点间加入中继器,将485总线支持的节点数扩展到2.7万个,建立一对多控制的嵌入式结点集群。针对该网络特点,对Modbus协议进行扩展,增加了中继层规约。与传统单纯增加物理地址长度的方式不同,新扩展协议采用局部寻址方式,打破了Modbus地址长度对子节点数的限制,并引入节点扫描和差错反馈机制,从而实现了主控器对各网络节点的可靠控制;同时,控制协议保持了原Modbus协议的简单性,还具有易移植、可扩展的特点,便于在单片机上实现。在采用扩展协议时,一层中继器的引入导致周转延迟增加10.36%,而两层中继器则将延迟率增加了69.9%,并使总延迟较原始Modbus系统增加2.4倍左右,但实际中采用的两层中继系统将平均延迟控制在了70 ms以下。结果表明,该方案在牺牲一定系统实时性能的前提下,实现了嵌入式节点的集群化管理。

关键词: RS485总线, 嵌入式结点集群, 中继层规约, 可靠控制, 集群化管理

Abstract:

Since the current network design of RS485 has limited the communication node number and scalability, a networking scheme for embedded control node cluster and a corresponding control protocol based on RS485 bus were proposed. By adding repeaters between the master and leaves, the networking scheme expanded the number of nodes on the RS485 bus to 27000, and constituted a cluster of embedded network nodes in one-to-many control mode. For this characteristic, the Modbus protocol was extended and the repeater layer stipulation was appended. Unlike traditional way that simply increases the length of the physical address, the new protocol used the method of local-addressing to break the restriction on the number of nodes which created by Modbus address length, and introduced the node scanning and error feedback mechanism. As a result, a reliable node control for the master controller was achieved. The control protocol not only keep the original simplicity of Modbus protocol, but also owns the features of portability and scalability, and it is easy to implement on a micro control unit. When the extended protocol was adopted, the turnaround delay increased by 10.36% with one layer of repeaters, while two layers of repeaters caused the delay increased by 69.9%. With two layers of repeaters, the total delay increased by 2.4 times than that of the original Modbus system. Nevertheless, the average delay in practical two-layer relay system was still controlled below 70 ms. The results show that the scheme can attain the goal of clustering management of embedded nodes at the expense of some real-time performance.

Key words: RS485 bus, embedded control node cluster, repeater layer stipulation, reliable control, clustering management

中图分类号: