Force Single Coil (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 Slave Address
(11 hex = address17 )
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 Slave Address
(11 hex = address17 )
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.
Home •
FAQ •
Enron •
Download •
Purchase •
Contact
Copyright © 2024 Simply Modbus. All rights reserved
|