Ebyte E831-RTU(6060-4G) Manual page 22

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
Port 31687, corresponding to hexadecimal 7BC7; the protocol type (TCP, UDP) is stored in the protocol register, the
value 0x0001 corresponds to the TCP protocol, and the value 0x0000 corresponds to the UDP protocol. That is, when the
IP is 116.62.42.192, the port is 31687, and the TCP protocol is used, the unused IP or domain name register can be filled
with "0" or not filled. If you need to use the function code "0x10" to write the IP, domain name, port at one time ,
protocol type, then the unused registers must be filled with values to continuously write modbus registers. The
corresponding register values are as follows:
40100(0x0063)
IP or domain name
length
00 0D
Since the length of the IP or domain name register is greater than the length of the IP or domain name value, it is
necessary to consider the length of the IP or domain name when writing the IP register, that is, how many registers need
to be occupied. For example, write the above IP into the modbus register:
Modbus RTU protocol write Socket register:
01
Send
Functio
equipment
n code
ModBus
address
Receive
Device ModBus address
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
length
00 0D
40101(0x0064) -- 40121(0x0078)
IP or domain name value
31 31 36 2E 36 32 2E 34 32 2E 31 39 32 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00
10
00 63
00 18
register
address
length
01
10
function
code
IP or domain name value
31 31 36 2E 36 32 2E 34 32 2E 31 39 32
00 0D 31 31 36 2E 36 32 2E 34 32 2E 31 39
30
32 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 7B C7
00 01
number
of bytes
00 63
address
22
E78-470LN22S User Manual
40122(0x0079)
40123(0x007A)
server port
TCP protocol
7B C7
write value
00 18
register length
00 01
7B F0
CRC
check
code
30 1D
CRC
check
code

Advertisement

Table of Contents
loading

Table of Contents