Page 40 of 56
King Pigeon Hi-Tech. Co., Ltd.
Ver 2.3
Industrial Ethernet Remote I/O Module
IoT Data Acquisition Module
2)
Write to multiple DO outputs of this device at the same time
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
0FH
Write multiple holding coils, use function code 15
DO register starting
address
2
00 00H
Register starting address
Write the number of DO
2
00 10H
Write the number of DO
Number of bytes to be
written
1
02H
16 DO needs 16 binary bits to represent, a total of 2
bytes need to be written
Data written
2
55 AAH
Send status data to control DO
16 CRC Verify
2
5D 0FH
CRC0 CRC1 low byte in front, high 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
0FH
Write multiple holding coils
DO register starting
address
2
00 00H
Register starting address
Number of bytes to
be written
2
00 10H
Indicates how many DOs have performed actions
16 CRC Verify
2
54 07H
CRC0 CRC1 low byte in front, high behind
Example: Simultaneously close the 16 DOs of this device, then:
Server send:
01 0F 00 00 00 10 02 55 AA 5D 0F
01= Device address;
0F= Write multiple holding coils;
00 00=DO register starting address;
00 10 = Control 16 DOs of this device at the same time;
00 00=Number of data sent;
55 AA= DO status data sent, each bit represents a DO status, 0 represents open, 1 represents closed; the first
byte 55H is converted into binary: 0101 0101, corresponding to DO1-DO8 status from low to high ; The second
byte AAH is converted into binary system: 1010 1010, corresponding to the state of DO9-DO16 from low to
high. The details are as follows:
DO8
DO7
DO6
DO5
DO4
DO3
DO2
DO1
0
1
0
1
0
1
0
1
open
closed
open
closed
open
closed
open
closed
DO16
DO15
DO14
DO13
DO12
DO11
DO10
DO9
1
0
1
0
1
0
1
0