Chengdu Ebyte Electronic Technology Co.,Ltd
E851-RTU(4440-ETH) User Manual
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
16
4.2. Basic functions of IO
4.2.1. Switch DO Output
4.2.1.1 Read Switch DO Output
Function code: 01, read coil status
Address range: 00017 (0x0010) ~ 00020 (0x0013)
Explanation: When equipment relay passive output and coil is not powered on, relay NC port and COM port are usually
closed, NO port and COM port are often open, with a value of 0; when coil is energized, the phenomenon is opposite,
relay NC port and COM port are disconnected, NO port and COM port are closed, with a value of 1. Query relay status
by instruction.
Example:
Read the 4-way switch output state, assuming a return value of 03, corresponding to the binary bit 0000 0011, the lower
four bits and four bits represent the switch output state, which in turn is DO4, DO3, DO2, DO1.
Modbus RTU protocol reads switching output:
Transmit
01
01
00 10
00 04
3C 0C
Device ModBus address
Function code
Switch start address
Read switch quantity
CRC check code
Receive
01
01
01
03
11 89
Device ModBus address
Function code
Return bytes
Switch output value
CRC check code