Preset Single Register (Function Code 06)

Query

This Function Code allows you to modify the contents of a Modbus 4x range in the slave. This code writes to one register only. Any holding register that exists within the controller can have its contents changed by this message. However, because the controller is actively scanning, it can also alter the content of any holding register at any time. The values are provided in binary up to the maximum capacity of the controller. Unused high-order bits must be set to zero.
When used with slave address zero (Broadcast mode), all slave controllers load the specified register with the contents specified.
TIP: Functions 5, 6, 15, and 16 are the only messages that are recognized as valid for broadcast. This is the structure of the message being sent out to the Modbus network. The following byte values are displayed in hexadecimal format.
The following example is a request to write the value ‘3’ to register 40002 in slave 11.
Node Address
Function Code
Data Start Bit High
Data Start Bit Low
Preset Data Register High
Preset Data Register Low
Error Check Field (2 bytes)
0B
06
00
01
00
03
CRC

Response

The response to a preset single register request is to retransmit the query message after the register has been altered.
Node Address
Function Code
Data Register High
Data Register Low
Preset Data Register High
Preset Data Register Low
Error Check Field (2 bytes)
0B
06
00
01
00
03
CRC
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal