![background image](http://html.mh-extra.com/html/king-pigeon/s175/s175_user-manual_1969937042.webp)
Page 42 of 55
King Pigeon Hi-Tech. Co., Ltd.
Ver 1.3
GSM/SMS/GPRS/3G/4G
Cellular IoT Gateway
(H: HEX)
Transaction ID
2
00 00H
Identification of Modbus requests/responses
transactions
Protocol Identifier
2
00 00H
00 00: Modbus protocol
Data Length
2
00 05H
The length of subsequent data
Device Address
1
01H
01H Device, Range: 1-247, according to setting address
Function Code
1
01H
Read holding coil type, function code 01
Return Data Length
1
02H
Range: 0000H-0003H
Returning Data
2
73 01H
Example: Start from address 64,read 10 Boolean mapping data value, then:
Server send:
00 00 00 00 00 06 01 01 00 40 00 0A
00 00= Transaction ID; 00 00 = Protocol Identifier,00 00 stands for Modbus protocol; 00 06 = The length of
subsequent data; 01= Device address;01 = Read holding coil; 00 00 = Read Boolean data start from address 64;
00 0A = Serial to read 10 Boolean status;
Device answer:
00 00 00 00 00 05 01 01 02 73 01
00 00= Transaction ID; 00 00 = Protocol Identifier,00 00 stands for Modbus protocol; 00 05 = The length of
subsequent data; 01= Device address; 01 = The function code of reading Boolean; 02= Return Data Length; 73
01= Return 10 Boolean status. High byte stands for low address data, low address stands for high address.
According to Modbus protocol, fix 73 01H real value to be 01 73H, converter to Binary as below:
Register
mapping
address
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
73
72
Value
0
0
0
0
0
0
0
1
Register
mapping
address
71
70
69
68
67
66
65
64
Value
0
1
1
1
0
0
1
1
The address value higher than 10 digits will be seen as invalid.
8.5.2 Modify Boolean Mapping Address Data
If control slave’s relay status which connected to Ethernet, need to add slave in salve list of configurator. Write
command 15 for mapping, when mapping address value modified, will write to Ethernet matched slave
address.
Master Send Data Format:
Content
Bytes
Data
(H: HEX)
Description
Transaction ID
2
00 00H
Identification of Modbus requests/responses
transactions
Protocol Identifier
2
00 00H
00 00: Modbus protocol
Data Length
2
00 06H
The length of subsequent data
Device Address
1
01H
01H Device, Range: 1-247, according to setting address
Function Code
1
05H
Write single holding coil, function code 05H