关注官方微信

中文.

Products

Products

Application Solution of Modbus TCP to RTU

Published Time: 2010-11-18 Author: Shanghai ZLAN Views: 7514

This paper describes how to use ZLSN2040 and NETCOM2040 to transform Modbus TCP to Modbus RTU.

1. Modbus TCP and Modbus RTU

Modbus is the standard protocol for communication between industrial devices. It is more commonly used in instruments. Different devices can communicate with each other after observing Modbus standards. Modbus originally used serial links, such as RS232, RS485/422, and then, with the development of the network, the Modbus TCP standard was introduced. The Modbus of serial link is divided into ASCII and RTU, and RTU has high transmission efficiency and is used more. So here basically take Modbus RTU as an example.

2. Modbus TCP to Modbus RTU.

With the popularity of Modbus TCP and Modbus RTU, more and more devices appear, and the need for Modbus TCP access to Modbus RTU is increasing. Modbus TCP has its own advantages because it can take advantage of existing network, Internet and other facilities, while large numbers of Modbus RTU devices already exist. With a unified Modbus TCP client software to access all Modbus devices, unified and centralized management will greatly improve the integration of the system.

The frame of Modbus RTU includes: address frame, function code, data, CRC check. The Modbus TCP packet contains: MBAP header, function code, data. These two formats must be transformed.

3. Solution of Modbus TCP to Modbus RTU

NETCOM2040 and ZLSN2040 can realize the Modbus TCP to Modbus RTU, both functions are similar, but one is a finished product the other is a small embedded core modules embedded into the user circuit, embedded module can reduce the user product volume also effectively reduce the cost. When using 2040 product the hardware connection is:

Connect the serial port of 2040 with the Modbus RTU device and connect the Ethernet port to the network. Modbus TCP software can then access the Modbus RTU device by accessing the IP address of 2040 (common port 502).

On software:
1) First confirm that the device is a 2040 product that supports Modbus TCP. Use ZLVircom software to search and find the device to edit the device. Confirm that the left hook of Modbus TCP to RTU in the device support function has been selected, indicating that the device supports Modbus TCP to RTU. As shown in the figure.

2) The transformation protocol should be selected as Modbus TCP, and the working mode is the TCP Server, and the port is 502. As shown above.
News report: ZLAN Modbus TCP to RTU products and its cooperation partner Sunway passed the Modbus compatibility test.
Application manual: about the usage of Modbus TCP to RTU function, please refer to CD: Document\Complete Application Cases\Modbus_RTU network upgrade\Part 1.5 “Communication based on Modbus TCP transforming to Modbus RTU”.