摘要
为实现标准电力通信规约MODBUS到工业物联网标准规约MQTT的灵活转换,解决工业电力电子设备与物联网云平台通信互联问题,对MODBUS和MQTT协议的通信过程进行研究,设计了一种基于MODBUS与MQTT协议转换自动化的嵌入式智能系统。该系统采用ARM Cortex-A9嵌入式架构的Freescale i.MX6主控芯片开发应用程序,通过CP210x UART驱动模块和WIFI无线模块进行通信硬件层连接,支持远距离数据传输。本方案选择以C函数加动态库的软件接口编程方式分别实现MODBUS协议模块和MQTT协议模块,并设计采用双线程及数据格式转换实现了异步协议数据的透明转换,提高了系统运行效率。经过仿真试验验证,系统稳定可靠,设计满足设计技术规范要求。
In order to realize the flexible conversion from MODBUS of standard power communication protocol to MQTT of industrial Internet of Things, and solve the problem of communication between indus-trial power electronic equipment and Internet of things cloud platform, this paper studies the communication process of MODBUS and MQTT protocol, and designs an embedded intelligent sys-tem based on the automation of MODBUS and MQTT protocol conversion. The system uses the Free-scale i.MX6 master chip of the ARM Cortex-A9 embedded architecture to develop applications, and the MODBUS and MQTT protocol communication hardware layer connections are realized using the CP210x UART drive module and WIFI wireless module to support long-distance data transmission. Then the interface programming method of C function plus dynamic library is selected to realize Modbus protocol and MQTT protocol. The transparent conversion of asynchronous protocol data was realized by adopting the dual thread and data format conversion, which improves the operation ef-ficiency of the system. The design has been verified by the simulation, the system is stable and re-liable, and the simulation result meets the requirements of design specifications.
出处
《计算机科学与应用》
2023年第12期2295-2304,共10页
Computer Science and Application