针对当前Modbus协议在智能配电系统中的广泛应用和配电系统网络化的发展趋势,设计了一种协议转换单元用于实现Modbus协议在RS485总线网络和以太网2种组网之间转换.转换单元以STM32和W5300为硬件基础,充分利用其片上资源,完成Modbus-RTU和Modbus-TCP协议报文转换,方便电网中基于RS485总线的设备接入以太网.通过引入心跳检测机制,保证了TCP连接的稳定性.协议转换单元结构简单,成本低廉,提高智能配电系统组网的方便性、灵活性,工程应用前景广阔.%Aiming at the extensive use of Modbus protocol in intelligent distribution system and the networking trend of distribution system,this paper designed one kind of converting unit for Modbus protocol conversion between RS485 network and Ethernet.This unit uses STM32 and W5300 as hardware basis.By taking full use of on-chip resources,the unit can fulfill the transforming from Modbus-RTU to Modbus-TCP,providing convenience for the equipments,which are based on RS485 network,imported into the Ethernet.The stability of TCP is ensured by the introduction of heartbeat detection mechanism.The unit is of simple structure and low cost.It can improve the convenience and flexibility of the intelligent distribution system and can get a wide use in engineering applications.
展开▼