WebRelay Users Manual
5.3.6 Write Single Coil – Modbus Function Code 05 (0x05)
Control the relay
Request
Start Address (2 bytes): 0x0000 (Relay)
Output Value (1 byte): 0x00 (OFF), 0xFF(ON)
Padding (1 byte): 0x00
Response
The response mirrors the requested state, 0x00 or 0xFF.
Errors
Single Coil Write Error Function Code (1 Byte): 0x85
Exception codes (1 Byte): 0x01 – Function not supported.
0x02 – Address out of range.
0x03 – Padding value.
Xytronix Research & Design, Inc. Page 67