Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
26
Figure 16 Communication via Virtual Serial Port
4.7 Modbus TCP test
By default, serial and network data is transmitted transparently. If you need to
implement the Modbus TCP to RTU, requires selecting
“transfer protocol” for
"Modbus TCP
RTU" in the Settings dialog, as shown in figure 20. At this point,
the device port is automatically changed to 502. At this point, the user's Modbus
TCP tool is connected to port 502 of IP of serial port server, and the Modbus TCP
instruction sent will be converted into RTU instruction output from the serial port.
For example, the serial port server network port receives the Modbus TCP
instruction of 00 00 00 00 00 06 01 03 00 00 0a, then the serial port outputs the
instruction of 01 03 00 00 00 0a c5 cd. Note: the serial port may send several 01
03 00 00 00 0a c5 cd instructions, because the default Modbus adopts the storage
mode, which will automatically poll to query. It'll show you how to switch to
non-storage.