Simply Modbus logo
← Previous: Read Coil FC01

Modbus Write Single Coil (FC05)

Function Code 05

Request

This command is writing the contents of discrete coil # 173 to ON
in the slave device with address 17.

11 05 00AC FF00 4E8B

11: The SlaveID (11 hex = address 17 )
05: The Function Code 5 (Force Single Coil)
00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex).
             ( 00AC hex = 172 , + 1 offset = coil #173 )
FF00: The status to write ( FF00 = ON,  0000 = OFF ) 
4E8B: The CRC (cyclic redundancy check) for error checking.

Response

The normal response is an echo of the query, returned after the coil has been written.

11 05 00AC FF00 4E8B

11: The SlaveID (11 hex = address 17 )
05: The Function Code 5 (Force Single Coil)
00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex)
FF00: The status written ( FF00 = ON,  0000 = OFF ) 
4E8B: The CRC (cyclic redundancy check) for error checking.


← Previous: Read Coil FC01