
Page 38 of 56
King Pigeon Hi-Tech. Co., Ltd.
Ver 2.3
Industrial Ethernet Remote I/O Module
IoT Data Acquisition Module
Function Code
1
01H
Read the holding coil, function code 01
Register starting
Address
2
00 00H
Initial address
Write value
2
00 10H
Number of reads
16 CRC Verify
2
3D C6H
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
01H
Read hold coil
Boolean Mapping
Register Address
2
02H
Return Data Length
Write value
2
05 C3H
Returned input coil status
16 CRC Verify
2
FA FDH
CRC0 CRC1 low byte in front, high behind
Example: At the same time query the 16 DO status of this device, the device address is 1,then:
Server send:
01 01 00 00 00 10 3D C6
01= Device address;
01= Read DO function code;
00 00=DO register starting address;
00 10 = Read 16 DO data continuously;
3D C6 = CRC verify.
Device answer:
01 01 02 05 C3 FA FD
01= Device address;
01= Read DO function code;
02= Return Byte Length;
05 C3= The returned DO status data, each bit represents a DO status, 0 represents open, 1 represents closed;
the first byte 05H is converted into binary: 0000 0101, corresponding to DO1-DO8 status from low to high;
second The byte C3H converted into binary is: 1100 0011, 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
0
0
0
0
1
0
1
open
open
open
open
open
closed
open
closed
DO16
DO15
DO14
DO13
DO12
DO11
DO10
DO9
1
1
0
0
0
0
1
1
closed
closed
open
open
open
open
closed
closed
FA FD = CRC verify.
If you want to read the state of a certain DO or certain DO states, you only need to modify the "register starting
address" and "read register quantity", and then recalculate the CRC check. The returned data is analyzed as
described above..