Function Code 6 ($06) - Preset Single Register
Description
Modbus function code $06 is a request to write to a single register. This will write all 16 digital outputs of an
RIO configured as a slave.
Operating as a master
The function code of the response can be queried with the _MW command. If an exception occurred, the
exception code of the response can be queried with _MW1.
Example:
Normal Response
Exception Response
_MW results in $06
_MW results in $86
_MW1
contains
$01
or
$02
Ways to use function code 6 with Galil commands:
1. MB command in raw packet mode
2.
MB command with Modbus function code 6
Operating as a slave
The RIO will accept a preset single register request with a starting address of $0000. The register values can
range from 0x0000 to 0xFFFF and correspond to a binary representation of the 16 digital outputs. The RIO
will respond with a Modbus packet that is identical to the packet it received.
RIO-47xxx
Chapter 3 Communication
●
29