![Ebyte K61-DL20 Скачать руководство пользователя страница 51](http://html1.mh-extra.com/html/ebyte/k61-dl20/k61-dl20_user-manual_3844044051.webp)
Chengdu Ebyte Electronic Technology Co.,Ltd.
User Manual
Copyright ©2012–2020
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
50
Receive
01
06
00 4D
00 10
18 11
Device ModBus address
Function code
Address
Write value
CRC check code
Description: Function code 03, the ModBus address of the query device is 0x10, that is, 0001 0000.
Send
10
03
00 4D
00 01
D4 11
Device ModBus
address
Function code
Address
Write value
CRC check code
Receive
10
03
02
00 10
45 8B
Device ModBus address
Function code
Returns the number of
bytes
Write value
CRC check code
6.1.3 Read digital DI input
Function code: 02, read (switch value) input status
Address range: 10017 (0x0010) ~ 10020 (0x0013)
Note: The device defaults to dry contact input. When DI and GND are short-circuited, the read value should be 1; when
DI and GND are not short-circuited, the read value should be 0.
Example:
Read 1 channel switch input value, short-circuit DI1 and GND at the DI input terminal. The read digital input value is
0x01. The corresponding binary value is 0000 0001. Each bit represents the state of one digital input, and the lowest is
DI1.
ModBus RTU protocol reads digital input:
Send
01
02
00 10
00 01
B8 0F
Device ModBus
address
Function
code
Analog starting
address
Number of reads
CRC check code
Receive
01
02
01
01
60 48
Device ModBus
address
Function
code
Returns the number
of bytes
Switch input value
CRC check code
6.1.4 Read switch DO output status
Function code: 01, read coil status
Address range: 00017(0x0010)~00020(0x0013)
Note: When the equipment relay is passively output, and the coil is not energized, the NO port and COM port of the relay
are normally open, and the value is 0; Query the relay status by command.
Example:
Read the 2-way switching output status, assuming that DO1 and DO2 are closed, the return value is 03, which
corresponds to binary 0000 0011, and the lower four bits represent the switching output status, which are DO4, DO3,
DO2, DO1 in sequence.
Modbus RTU protocol to read switch output: