0006
Length Field
2 Bytes, number of following bytes
FF
Unit ID
1 Byte, FF = Master device
06
Function Code
1 Byte, 06 = Write single register
012E
Starting Address
2 Bytes, address of the first register
000F
Data
2 Byte, 000F indicates it counts from 15
5.2.7. Write DI Level Change Count (0x10)
You can write any value of 0x0000-0xFFFF to the register.
Write 0x000F to DO1 register, then it counts from 15, the command is as follows:
0x000100000009FF100130000102000F
Command
Field
Description
0001
Transaction ID
2 Bytes, identification of a Modbus Request/Response transaction
0000
Protocol ID
2 Bytes, 0000 = Modbus protocol
0009
Length Field
2 Bytes, number of following bytes
FF
Unit ID
1 Byte, 0xFF = Master device
10
Function Code
1 Byte, 10 = Write
0130
Starting Address
2 Bytes, address of the first register
0001
Quantity of Registers
2 Bytes, the number of required registers
02
Data Length
1 Byte, Data Length
000F
Data
2 Byte, 01 indicates COM and NO is close
In the response from the device we get:
0x 000100000006FF1001300001
Command
Field
Description
0001
Transaction ID
2 Bytes, identification of a Modbus Request/Response transaction
0000
Protocol ID
2 Bytes, 0000 = Modbus protocol
0006
Length Field
2 Bytes, number of following bytes
C2000-A1-SDD1010-AB3 User Manual
30 / 34
SinoCon Co., Ltd.
www.sinoconsys.com