E850-DTU(4440-GPRS) datasheet
Copyright ©2012–2018
,成都亿佰特电子科技有限公司
20
4.3 IO special function
4.3.1 Pulse count and count clear to zero
The pulse count will not be saved after power off, and the pulse level maintenance time must be
more than 10ms to be effective. The switch input changes from the disconnected state to the closed
state and maintains the closing time of 10ms or more, and then becomes to disconnected state,
completing a pulse count.
Read pulse count value
Function code: 03
,
Read hoding register
Address: 40049 (0x0030)~40052 (0x0033)
Note: The maximum value of the pulse count is 65535
For example
:
DI1 has detected 16 pulses at present, DI2 has detected 3 pulses at present, and reads DI1 and
DI2 switch input count values.
Modbus RTU protocol read pulse count value:
Send
01
03
00 30
00 02
C4 04
Device ModBus
address
Function
code
Start address
Read number
CRC code
Receiv
e
01
03
04
00 10
00 03
BB F7
Device ModBus
address
Function
code
Bytes
returned
DI1 count
value
DI2 count
value
CRC code
Modbus TCP protocol read pulse count valu:
Send
00 01
00 00
00 06
01
03
00 30
00 02
Transmi
ssion
identifie
r
Protocol
identifier
Length
Unit
identifie
r
Functi
on
code
Start address
Read number
Receiv
e
00 01
00 00
00 07
01
03
04
00 10
00 03
Transmis
sion
identifier
Protocol
identifier
Length
Unit
identifie
r
Functi
on
code
Bytes
returned
DI1 count
value
DI2 count
value
Clear to zero pulse count value
Function code: 06
,
Writing hoding register