Function 04 – Read Input Register
Returns the contents of hold registers (3X references) in the slave device. A typical function 04
command and response follow.
Command Usage
Address
Function
Addr HI
Addr LO
Data HI
Data LO
Response Message
Address
Function
Register Number
Data HI
Data LO
Error Check
Function 05 – Force Single Coil
Forces the state of a single coil (digital output) to either the ON or OFF state. A typical function 05
command and response follow.
Command Usage
Address
Function
Addr HI
Addr LO
Data HI
Data LO
Data Values
Response Message
Address
Function
Addr HI
Addr LO
Data HI
Data LO
Error Check
One Byte Slave Address
One Byte Function Number
Starting Register Address HI Byte
Starting Register Address LO Byte
Typically ZERO
Number of registers
One Byte Slave Address
One Byte Function Number
Number of data bytes
HI Byte (8-bits)
LO Byte (8-bits)
Two Byte CRC
One Byte Slave Address
One Byte Function Number
Coil Address HI Byte
Coil Address LO Byte
Force Data HI
Force Data LO
The proper values are either 0xFF00 to enable (Turn ON) a bit or
0x0000 to disable (turn off) a bit.
One Byte Slave Address
One Byte Function Number
Coil Address HI Byte
Coil Address LO Byte
Force Data HI
Force Data LO
Two Byte CRC
Returns four bytes typically.
Same value as in command above.
Same value as in command above.
Same value as in command above.
Same value as in command above.
15