Ebyte E831-RTU(8080T-485) User Manual page 18

Data acquisition module
Table of Contents

Advertisement

Modbus RTU protocol write digital output:
01
Transmis
Device ModBus
sion
Address
01
Receivin
Device ModBus
g
Address
4.2.2. Read switch value DI input
Function code: 02,Read(switch value)input status
Address range: 10017(0x0010)~10023(0x0017)
Description: The device defaults to dry contact input. When DI and DIG are short-circuited, the read
value should be 1. When DI and DIG are not short-circuited, the read value should be 0.
Example:
Read 8 digital input values. DI input terminal DI1 and DIG are short-circuited, DI2 and DIG are
not short-circuited, DI3 and DIG are short-circuited, DI4 and DIG are not short-circuited, The read
digital input value is 0x05, corresponding to the binary bit 0000 0101. The 8 bits represent the digital
input value, which are DI8, DI7, DI6, DI5, DI4, DI3, DI2, DI1 in order.
Modbus RTU protocol read digital input:
01
Transmis
Device ModBus
sion
Address
01
Receivin
Device ModBus
g
Address
0F
00 11
Switch
Function
value
code
address
0F
00 11
Switch
Function
value
code
address
02
00 10
Function
Switch value
code
initial address
02
01
Function
Return bytes
code
numbers
00 02
01
Write
Bytes
switch value
numbe
numbers
rs
00 02
Write value
00 08
Read switch value
numbers
05
Digital input value
03
62 95
Write
CRC
value
parity code
84 0F
CRC parity code
78 09
CRC parity code
61 8B
CRC parity
code

Advertisement

Table of Contents
loading

Table of Contents