Reading Digital Di Input - Ebyte E831-RTU(6060-4G) Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
ID
Function code 0x0F Write DO2, DO3 digital output, make NC2, COM2 open, NO2, COM2 close; make NC3, COM3
open, NO3, COM3 close. The write value should be 0x03, corresponding to binary bits 0000 0011
Modbus RTU protocol write switch output:
send
Device
address
receive
Device
address
Modbus TCP protocol write switch output:
00 01
Send
Transport
ID
00 01
Receive
Transport
ID

4.2.2 Reading digital DI input

Function code: 02, read (switch value) input status
Address range: 10017(0x0010)~10022(0x0015)
Description: The device defaults to dry contact input. When DI and COM are short-circuited, the read value should be 1;
when DI and COM are not short-circuited, the read value should be 0.
example:
Read the 6-channel switching value input value, DI input terminal DI1, COM1 short circuit, DI2, COM2 not short circuit,
DI3, COM3 short circuit, DI4, COM4 not short circuit, DI5, COM5 not short circuit, DI6, COM6 not short circuit catch.
The read digital input value is 0x05, corresponding to binary 0000 0101, and the six lower six bits represent the digital
input value, which are DI6, DI5, DI4, DI3, DI2, DI1 in sequence.
Modbus RTU protocol to read digital input:
send
Device ModBus address
Receive
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
ID
01
0F
ModBus
Function
switch
code
address
01
0F
ModBus
function
code
00 00
00 08
01
Protocol
length Unit ID
ID
00 00
00 06
Protocol ID
length
01
02
function
code
01
02
00 11
00 02
Number
write switches
00 11
switch
write value
address
0F
00 11
function
switch
code
address
01
0F
function
Unit ID
code
00 10
Switch start addressNumber
switches
01
18
E78-470LN22S User Manual
01
03
of
number
write
of bytes
value
00 02
84 0F
CRC check code
00 02
Number
of
number of
write switches
bytes
00 11
switch address Number of write switches
00 06
of
read
CRC check code
05
62 95
CRC check
code
01
03
write
value
00 02
F9 CD
61 8B

Advertisement

Table of Contents
loading

Table of Contents