Ebyte E831-RTU User Manual page 16

Hide thumbs Also See for E831-RTU:
Table of Contents

Advertisement

Function code 0x05 写 DO2 digital output,write value is FF 00;close D02 port,write value 00 00。
(NC2 and COM2 of DO2 are disconnected, and
NO2 and COM2 are closed) Modbus RTU
Protocol write digital output:
01
Send
equipment
ModBus
address
01
Receive
equipment
ModBus
address
The function code 0x0f is used to write the digital output of DO2 and DO3. The written value
should be 0x03, corresponding to the binary bit 0000 0011. (note that the starting address here starts
from DO2.)
Modbus RTU protocol write digital output:
01
send
equipment
ModBus
address
01
receive
equipment
ModBus
address
4.2.2.
Read switching value DI input
Function code:02,read (switching value) input status
Address range:10017(0x0010)~10020(0x0013)
Note: the equipment defaults to dry contact input. When DI and DI 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 four digital input values. DI input terminals DI1 and dig are short circuited, DI2 and DIG are
not short circuited, DI3 and DIG are short circuited, and DI4 and dig are not short circuited. The read
digital input value is 0x05, corresponding to the binary bits 0000 0101. The four bits represent the
digital input value, which are DI4, DI3, DI2 and DI1 in sequence.
Modbus RTU protocol read digital input:
01
Send
equipment
ModBus
address
01
Receive
equipment
ModBus
address
05
Function
Switching
code
address
05
Function
Switching
code
0F
00 11
Function
Switching
code
value
address
0F
00 11
Function
Switchin
code
g value
address
02
00 10
Function
Starting
code
address of
switching
value
02
Function
Return
code
bytes
00 11
FF 00
Write
value
value
00 11
FF 00
Write
value
value
address
00 02
01
Write
Bytes
quantity of
switching
00 02
Write
value
00 04
Read the
CRC check code
number of
switching
values
01
05
Digital
input
value
DC 3F
CRC
check
code
DC 3F
CRC
check
code
03
62 95
Write
CRC
value
check
code
84 0F
CRC
check
code
78 0C
61 8B
CRC
check
code

Advertisement

Table of Contents
loading

This manual is also suitable for:

4040r-485

Table of Contents