Chengdu Ebyte Electronic Technology Co.,Ltd.
E831-RTU(8080T-485) User
Manual
18
Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
binary 0000 0101 , and 8 bits represent the digital input value, which are DI8 , DI7 , DI6 , DI5 , DI4 , DI3 , DI2, DI1.
Modbus RTU protocol to read digital inputs:
sen
d
01
02
00 10
00 08
78 09
Device
ModBus address
functi
on code
Switch start
address
Number of
read switches
CRC check
code
tak
e over
01
02
01
05
61 8B
Device
ModBus address
functi
on code
returns the
number of bytes
digital input
value
CRC check
code
4.3 IO Features
4.3.1 Pulse count and count clear
The device supports 3 pulse counting methods, rising edge counting, falling edge counting and level counting. This value can
be written into the (0x0053) register by writing the corresponding
The value is set. When writing 0 , it means rising edge counting, writing 1 means falling edge counting, and writing 2 means level
counting. For example, when counting on rising edge is selected, it will count only when DI detects that it is a rising edge of level, and
other functions are similar.
In addition, the device also supports input count filtering function, and the signal must be maintained for several adoption cycles
before it can be confirmed. The default value is 15,15 sampling cycles to be confirmed, the range is 1~20 , the value can be set by
writing the corresponding value to the (0x0054) register, and the sampling cycle is 1ms. Note that this function only supports level
counting. The pulse count will not be saved after the power is turned off.
Count clearing also supports manual clearing and automatic clearing functions: automatic clearing after the input count is read, or
manual clearing, which can be set. If it is automatically cleared, the register value will be cleared after
each read. If it is manually
cleared, it will either reach the maximum count of 65536 and clear, or write the register to clear it. Register to (0x0055)
Writing 0 means manual clearing, and writing 1 means automatic clearing. Note that when it is set to automatic clearing,
manual clearing has no effect.
4.3.1.1 Read pulse count value
Function code: 03, read holding register
Address range: 40049 (0x0030)~40056 (0x0037)
Description: The maximum value of pulse count is 65535 Example:
DI1 has detected 16 pulses currently, DI2 has detected 3 pulses currently, read the digital input count value of DI1 and DI2,
and read the pulse count value by Modbus RTU protocol:
sen
d
01
03
00 30
00 02
C4 04
Device
ModBus address
functi
on code
initial address
number of
reads
CRC check
code
t
ake
over
01
03
04
00 10
00 03
BB F7
Device
ModBus address
funct
ion code
retur
ns the
number of
bytes
DI1
count value
DI2
count value
CRC
check code
4.3.1.2 Manual reset pulse count value
Function code: 06, write hold register address range: 40065 (0x0040)
Description: The lower four bits of the register value represent the counts of DI6, DI5, DI4, DI3, DI2, and DI1 respectively.
Writing "1" means the count is cleared and the pulse count is restarted. example: