Chengdu Ebyte Electronic Technology Co., Ltd.
E831-RTU (6060-ETH) User Manual
4.2 IO Basic Functions
4.2.1 Switching DO output
Read the switch DO output
Function code: 01, read the coil status
Address range: 00017 (0x0010) ~ 00022 (0x0015).
Description: The passive output of the device relay, the coil is not energized, the relay NC port and the COM port are normally closed,
the
NO port and the COM port are always open, and the value is 0; When the coil is energized, the phenomenon is reversed, the relay NC port is
disconnected from the COM port,
and
the NO port is closed with the COM port, and the value is 1. Query the relay status by command.
Example:
Reads the output state of the 6 switches, assuming that the return value is 03, corresponding to the binary bit 0000 0011,
and the six bits in the lower six bits represent the switching output state, in order of DO6
、
DO5
、
DO4
、
DO3
、
DO2
、
DO 1
。
Modbus RTU protocol reads the switching output:
Send
01
01
00 10
00 06
BD CD
Provision the
ModBus address
Functional
codes
The address
where
the switch starts
The number
of
read switches
CRC check digits
Receivin
g
01
01
01
03
11 89
Provision the
ModBus address
Functional
codes
The number of
bytes returned
The output value of
the on-off quantity
CRC check digits
The Modbus TCP protocol reads the switch output:
Send
00 01
00 00
00 06
01
01
00 10
00 06
Transmit
the logo
Protocol
identity
length
Unit
identificatio
n
Function
al codes
The address
where
the switch starts
The number
of
read switches
Receivin
g
00 01
00 00
00 04
01
01
01
03
Transmit the
logo
Protocol
identity
length
Unit
identificatio
n
Functiona
l codes
The number
of bytes
returned
The output value
of the on-off
quantity
Control the switch amount DO output