Page 50 of 57
King Pigeon Hi-Tech. Co., Ltd.
Ver 3.0
GSM/SMS/GPRS/3G/4G
Cellular IoT M2M RTU
Content
Bytes
Data
(H: HEX)
Description
Device Address
1
01H
01H Device, according to setting address
Function Code
1
0FH
Write multi holding coil
DO Register Address
2
00 00H
Range: 0000-0003, stands for DO0-DO3
Active Relay Qty
2
00 04H
Qty: 0-4, stands for how many relays already actived
16CRC Verify
2
54 08H
CRC0 CRC1 low byte in front, high behind
Example: Close device 4 DO at same time, then:
Server send:
01 0F 00 00 00 04 01 0F 7E 92
01H= Device address; 0FH= Control multi relay; 00 00H= Relay DO0 starting address; 00 04H= Control 4 relays;
01H= Send data qty; 0FH= Data sent converter to binary 0000 1111 high 4 byte invalid, low 4 byte 1111 sort to
match DO3 DO2 DO1 DO0, 1 stands for close relay, 7E 92H CRC verify.
Device answer:
01 0F 00 00 00 04 54 08
01H= Device address; 0FH= Control multi relay; 00 00H= Relay DO0 starting address; 00 04H= Actived 4 relays;
54 08H CRC verify.
If need to control multi relays at same time, only need to change "Relay Starting Address", "Control Relay Qty",
"Write Data" and calculate "CRC Verify" again.
Read device DIN status:
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
02H
02 read input coil DIN status
DIN Register
Address
2
00 00H
Range: 0000-0003, stands for DIN0-DIN3
Read DIN Register
Qty
2
00 04H
Read qty of DIN status
16CRC Verify
2
79 C9H
CRC0 CRC1 low byte in front, high behind
Receiver Return Data Format:
Content
Bytes
Data
(H: HEX)
Description
Device
Address
1
01H
01H Device, Range: 1-247, according to setting address
Function
Code
1
02H
02 read input coil DIN status
Return
Bytes Qty
1
01H
Range: 0000-0003, stands for DIN0-DIN3