基于RS485的多主机对等通信系统的设计与实现  被引量:2

Design and implementation of multi-host peer-to-peer communication system based on RS485

在线阅读下载全文

作  者:任瑶瑶 马金平 REN Yaoyao;MA Jinping(Hongshan College,Nanjing University of Finance and Economics,Nanjing 210003,Jiangsu,China;College of Mechanical Engineering,Shandong University,Jinan 250061,Shandong,China)

机构地区:[1]南京财经大学红山学院,江苏南京210003 [2]山东大学机械工程学院,山东济南250061

出  处:《山东大学学报(工学版)》2023年第5期156-164,共9页Journal of Shandong University(Engineering Science)

基  金:山东大学教育教学改革与研究资助项目(2022Y114);山东大学实验室建设与管理研究资助项目(sy20222304)。

摘  要:针对主从模式带来的通信延迟、冗余通信等问题,设计一种基于RS485多主对等通信方式,实现RS485通信线路上多主机对等通信功能,不需要主机轮询通信。对通信线路进行设计,在原有RS485通信线路基础上增加一条控制线路,用于检测通信线路的工作情况。移植uC/OS-Ⅱ实时操作系统到STM32F103C8T6控制板上,利用uC/OS-Ⅱ的实时多任务特性,实现通信线路检测、数据接收、数据发送及其他任务的同时运行,提高通信系统的工作效率。采用数据缓冲、数据队列、循环冗余校核(cyclic redundancy check,CRC)校验等方式,提高数据接收与发送的稳定性和可靠性,解决数据量增加带来的数据混乱、传输不稳定等问题。通过搭建试验系统,实现预期的通信功能,验证多主对等通信的可行性,为联网设备通信提供一种新方法。For the problem such as communication delay and redundant communication,a multi-parallel communication method was designed.The function of multi-host peer communication on the RS485 communication line was implemented,and the host polling communication was not required.The communication line had been designed,and a control line was added based on the original RS485 communication line to detect the operation of the communication line.The uC/OS-Ⅱreal-time operating system was trans-planted to the STM32F103C8T6 control panel,using the real-time mulitasking characteristics of uC/OS-Ⅱ,implementing commu-nication line detection,data reception,data transmission,and other tasks,and improving communication system efficiency.The data buffer,data queue,cyclic redundancy check,etc.,were utilized to improve the stability and reliability of data reception and transmission,solving problems,such as data confusion,transmission instability etc.when the amount of data increased.By building an experimental system,the expected communication function was implemented,and the feasibility of multi-parallel communication was verified.A novel method was provided for the communication of the Internet of Things devices.

关 键 词:RS485 多机通信 通信转发 通信协议 嵌入式系统 

分 类 号:TN919.6[电子电信—通信与信息系统]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象