摘要
针对与相应控制器配套的远程AI都具有自己通信模式,相对封闭,并且成本相对较高的问题,设计一款基于Modbus通信协议的远程AI模块。模块以STC15W4K32S4单片机为核心,RS 485为通信电路,Modbus-RTU为通信协议,实现与控制器的通信。文中介绍该模块的硬件整体结构设计,重点介绍从站的Modbus通信软件设计,最后进行模块与上位机Modbus通信实验。实验结果表明,该模块可实现对模拟量数据的采集并通过Modbus协议与上位机进行通信,而且该模块只需要一些简单的设置,便可实现通信。
In allusion to the problem that the remote AI matched with the corresponding controller has its own communica-tion mode which is relatively close and has high cost,a remote AI module based on the Modbus communication protocol is de-signed. The module realizes the communication with the controller by taking the STC15W4K32S4 single chip microcomputer as the core,the RS-485 as the communication circuit,and the Modbus-RTU as the communication protocol. The overall hardware structure design of the module is introduced in this paper. The Modbus communication software design of the slave station is em-phatically introduced. An experiment for Modbus communication between the module and upper computer was carried out. The experimental results show that the module can realize the acquisition of analog quantity data and communication with the upper computer by using the Modbus protocol,which needs only some simple settings to realize communication.
作者
赵阳光
魏霞
ZHAO Yangguang;WEI Xia(School of Electrical Engineering,Xinjiang University,Urumqi 830001,China)
出处
《现代电子技术》
北大核心
2019年第6期179-182,共4页
Modern Electronics Technique
基金
新疆维吾尔自治区青年科学基金(2011211B12)~~
关键词
远程AI
模块结构设计
软件设计
通信
控制器
数据采集
remote AI
module structure design
software design
communication
controller
data acquisition