Page 36 of 55
King Pigeon Hi-Tech. Co., Ltd.
Ver 1.3
GSM/SMS/GPRS/3G/4G
Cellular IoT Gateway
8.4.1 Read Boolean Mapping Address Data:
Master Send Data Format:
Content
Bytes
Data
(H: HEX)
Description
Device Address
1
01H
01H Device, Range: 1-247, according to setting address
Function Code
1
01H
Read holding coil type, function code 01
Boolean Register
Starting Address
2
00 40H
Range: 0040H-007FH, address refer to
Mapping Register Address”]
at manual bottom
Read Register Qty
2
00 0AH
Range: 0001H-0040H, total 64 address for Boolean
mapping
16 CRC Verify
2
BD D9H
CRC0 CRC1 low byte in front, high byte in behind
Receiver Return Data Format:
Content
Bytes
Data
(H: HEX)
Description
Device Address
1
01H
01H Device, according to the data Master send
Function Code
1
01H
Read holding coil
Return Byte Length
1
02H
Return Data Length
Returning Data
2
73 01H
16CRC Verify
2
5D 0CH
CRC0 CRC1 low byte in front, high behind
Example: Start from address 64, read 10 Boolean mapping data value, then:
Server send:
01 01 00 40 00 0A BD D9
01= Device address; 01= Read holding coil; 00 40=Read Boolean data start from address 64; 00 0A = Serial to
read 10 Boolean status;
BD D9= CRC verify.
Device answer:
01 01 02 73 01 5D 0C
01= Device address; 01= Read holding coil; 02= Return Byte 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.
5D OC =CRC verify.
8.4.2 Modify Boolean Mapping Address Data: