Read Digital Di Input; Read Switch Do Output Status - Ebyte K61-DL20 User Manual

Switch value transmission module
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
01
Receive
Device ModBus address
Description: Function code 03, the ModBus address of the query device is 0x10, that is, 0001 0000.
10
Send
Device ModBus
address
10
Receive
Device ModBus address

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:
01
Send
Device ModBus
address
01
Receive
Device ModBus
address

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:
Chengdu Ebyte Electronic Technology Co.,Ltd.
Copyright ©2012–2020,
06
00 4D
Function code
Address
03
00 4D
Function code
Address
03
02
Returns the number of
Function code
bytes
02
00 10
Function
Analog starting
code
address
02
01
Function
Returns the number
code
of bytes
00 10
Write value
CRC check code
00 01
Write value
CRC check code
00 10
Write value
CRC check code
00 01
Number of reads
CRC check code
01
Switch input value
CRC check code
User Manual
18 11
D4 11
45 8B
B8 0F
60 48
50

Advertisement

Table of Contents
loading

Table of Contents