摘要
分析了Modbus协议规范;以MSP430单片机为例,介绍了一种在单片机上实现Modbus通信协议的软件设计方法。该方法将通信流程分解为接收、收转发、发送、发转收4个独立过程,合理分配Modbus报文的接收、校验、解包、打包、响应等任务,实现了Modbus协议的模块化编程。
The paper analyzed Modbus protocol specification,introduced a software design method of Modbus communication protocol realized by single-chip microcomputer taken MSP430 as example.The method divides communication process into four process: message reception,message receiving to send,transmission,sending to receive,and reasonably assigns communication tasks including message receiving,checking,unpacking,packing and responding,which realizes modular programming of the Modbus protocol.
出处
《工矿自动化》
北大核心
2013年第4期87-90,共4页
Journal Of Mine Automation
基金
山西省科技重大专项项目(20111101026)
关键词
MODBUS协议
串行通信
报文接收
校验
解包
软件设计
Modbus protocol
serial communication
message receiving
message checking
message unpacking
software design