48
For example:Client may creat the transaction identifier in sequence from 0x0001(0x00(H)
0x01(L)).
Protocol Identifier:It is used for intra-system multiplexing. The MODBUS protocol is
identified by the value 0x00.
Length:The length field is a byte count of the following fields, including the Device ID and
data fields.
For example: If a client want to read severial holding registers(function code 0x03),then
the length will be 0x0006(Byte) including device ID(1Byte),function code (1Byte),start
address(2Byte),number of registers(2Byte
Device ID:This field is used for intra-system routing purpose. It is typically used to
communicate to a MODBUS or a MODBUS+ serial line slave through a gateway between
an Ethernet TCP-IP network and a MODBUS serial line. This field is set by the MODBUS
Client in the request and must be returned with the same value in the response by the
server. For example: If the device ID of the meter is 1, then the byte of device ID should
be 0x01.
All Modbus/TCP ADU are sent via TCP on registered port 502.
In this case we will use the TCP communication tool to show that how to establish a
connecting from the computer to power meter. In this scene power meter is as a server. Make sure
the setting of Ethernet parameters in meter are same as following:
IP:192.168.8.220
Port:502
Device ID:0x01
The PC is as a client, with the IP address (for example:192.168.8.110 ) which must be in the same
subnet with the IP of the power meter. To read 0x000A holding registers from the address of
0x0000, take the following steps
1. Double click to open ‘sokit.exe’ ,and switch to the lable page of ‘Client’.
2. Fill in the IP(192.168.8.220) and the port(502) of the network multi-functional power
meter(server),and click the button of “TCP connect”.
3. In ‘Buf 0’,fill in the frame([00 01 00 00 00 06 01 03 00 00 00 0A], hexdecimal characters)
including ‘[]’ to send,and click the button of ‘Send’.