摘要
MODBUS协议在工业上具有广泛的应用,其在不同的操作系统和物理设备上均可实施通讯。该文介绍了Qt平台下,基于MODBUS串行通信协议的上位机软件设计,并且通过RS232串口,将其与单片机进行通信。还给出了MODBUS协议在RS232链路上的帧格式和帧接收完成的判定方法。Qt跨平台能力强,封装精简,该平台下编写的软件只需做简单的配置便可在多个操作系统下使用,适用于工业中多变的环境。
MODBUS protocol is widely used in industry,and it can be implemented in different operating systems and devices.This thesis introduces how to design the master software on the Qt platform based on MODBUS protocol,and shows the experiment that MCU communicates with the master software through RS232MODBUS frame format and the method that judges whether frame is received completely on RS232 is also given.Qt has clear structure,can easily cross different platform.If your software is written based on Qt,you only need do little platform configuration work so that the software can function well on other operation system.So the master software based on Qt is suitable for changeable industrial environment.
出处
《电子质量》
2018年第1期21-25,共5页
Electronics Quality