基于CP341的Modbus RTU通信的设计与实现

Design of Modbus RTU Communication Based on CP341 and Its Implementatio

  • 摘要: 文章提出了一种基于CP341的Modbus RTU通信的设计方案,给出了硬件及软件的选择与配置,并详细介绍了CP341与智能传感器之间数据通信程序的设计。该方案基于S7-300 PLC CP341串口通信模块的ASCII通信方式,采用Step 7编程实现了S7-300 PLC与智能传感器之间的Modbus RTU通信,解决了智能传感器Modbus RTU通信协议解析、CRC-16循环冗余校验在S7-300 PLC中的实现、查询指令的发送及接收数据包的解析和存放等关键性问题。

     

    Abstract: The paper proposed a design scheme of Modbus RTU communication based on CP341,gave the selection and configuration of hardware and software,and introduced the design of data communication program between CP341 and intelligent sensor. The scheme uses Step 7 program to realize Modbus RTU communication between S7-300 PLC and intelligent sensor on the basis of ASCII communication mode of serial communication module of S7-300 PLC CP314,and resolves the key technologies such as analysis of Modbus RTU communication protocol of intelligent sensor,implementation of CRC-16 cyclic redundancy check in S7-300 PLC,sending of query instruction,and analysis and storage of receiving data packet.

     

/

返回文章
返回