摘要
分析Modbus协议的ASCII模式通信,设计ASCII信息帧的结构,采用C#语言中的SerialPort控件实现Modbus协议的串口通信软件,经过和C805lF330单片机开发板的多次运行测试,结果表明主-从机通信过程稳定性好,ASCII信息数据传输安全可靠,实现了Modbus协议的主从式通信。
The article analyzes ASCII model communications of Modbus protocol,designs the structure of ASCII information frame,and realizes serial port communications software of Modbus protocol of SerialPort control in C# language.After a number of operating tests with C8051F330 monolithic processor development board,results show the host-slave communication process is stable,ASCII information data transmission safe and reliable,thus realizing the host/slave communication of Modbus protocol.