
Chengdu Ebyte Electronic Technology Co., Ltd.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
21
Transmission
identifier
Protocol
identifier
length
Unit
identificatio
n
Function
code
Switch quantity
address
Write value
Function code 0x0F writes DO2, DO3 switch quantity output, making NC2, COM2 disconnected, NO2, COM2
closed; NC3, COM3 disconnected, NO3, COM3 closed. Write value should be 0x03, corresponding to binary bit 0000
0011
Modbus RTU protocol write switch quantity output:
Send
01
0F
00 11
00 02
01
03
62 95
Device ModBus
address
Function
code
Switch
quantity
address
Write switch
quantity number
byte
count
Write
value
CRC check
code
Receive
01
0F
00 11
00 02
84 0F
Device ModBus
address
Function
code
Switch quantity
address
Write value
CRC check code
Modbus TCP protocol write switch quantity output:
Send
00 01
00 00
00 08
01
0F
00 11
00 02
01
03
Transmiss
ion
identifier
Protocol
identificat
ion
length
Unit
identificat
ion
Functio
n code
Switch
quantity
address
Write switch
quantity
number
byte
count
Write
value
Receive
00 01
00 00
00 06
01
0F
00 11
00 02
Transmissi
on
identifier
Protocol
identificatio
n
length
Unit
identificati
on
Function
code
Switch
quantity
address
Write switch quantity
number
4.2.2 Read switch quantity DI input
Function code: 02, read (switch quantity ) input state
Address range: 10017(0x0010)~10022(0x0015)
Note: the device default dry contact input, DI and COM short, read value should be 1; When DI and COM are not
short, the read value should be 0.
Example:
Read the input value of 6 switch quantity, DI input terminal DI1, COM1 short, DI2, COM2 short, DI3, COM3 short,
DI4, COM4 short, DI5, COM5 short, DI6, COM6 short. The input value of the read switch value is 0x05, corresponding
to binary bit 0000 0101. The lower six bits represent the input value of the switch quantity , which is DI6, DI5, DI4, DI3,
DI2 and DI1.
Modbus RTU protocol Read Switch quantity Input
: