Function Code 7 ($07) – Read Exception Status
Description
Modbus function code $07 is a request to read the 8 exception status outputs. This will read digital outputs 0-
7 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 $07
_MW results in $87
_MW1
contains
$01
or
$02
When using the MB command with Modbus function code $07, response data will be stored in the array
referenced in the command line.
Ways to use function code 7 with Galil commands:
1.
MB command in raw packet mode
2.
MB command with Modbus function code 7.
Operating as a slave
The RIO will accept a read exception status request. The RIO will respond with function code $07, and will
return 1 byte of output data ranging from $00 to $FF, with each bit representing the state of a digital output
(1 or 0). The LSB of the output data byte is digital output 0, and the MSB of the output data byte is digital
output 7.
RIO-47xxx
Chapter 3 Communication
●
31