![Galil Motion Control RIO-47 series
RIO-47100 Скачать руководство пользователя страница 27](http://html1.mh-extra.com/html/galil-motion-control/rio-47-series-rio-47100/rio-47-series-rio-47100_user-manual_558776027.webp)
Function Code 3 ($03) - Read Holding Registers
Modbus function code $03 is a request to read holding registers. The default configuration is to
respond to this command with analog input register information.
Function code 3 has very different behaviors depending on the configuration commands set. A
synopsis and brief list of commands that effect how the RIO responds to function code 3 is in Table
3.5 below:
Command
Description
MV
Swaps the response of function code 3 and 4
MI
Configures if the RIO will respond with a 16-bit integer or a 32-bit float
ME
Enables a master to write and read to arrays to array locations of an RIO slave
Table 3.5: Important configuration commands for Function Code 3
The RIO will accept different starting address ranges for a read holding registers request depending
on the state of the MI command:
MI 0 is set (register data is 16-bit integer [counts])
Address range: $0000-$000E
Quantity of Registers: up to $0008
MI 1 is set (register data is 32-bit floating [volts])
Address range: $0000-$0007
Quantity of Registers: up to $0010
The RIO will respond to a request with function code $03 followed with a byte count (in hex) as
calculated:
Equation 3.3:
Where,
Number of Analog Inputs
is equal to the number of analog inputs the
master is trying to query
n
=
1
if MI 0 is set
n
=
2
if MI 1 is set
The RIO will respond with the register value data the size of the byte count field calculated in
Equation 3.3 above.
Function code 3 also has a secondary capability: The ability to read from array data on the RIO
1
. Up to
1000 elements are available. Each element is accessible as a 16-bit unsigned integer (Modbus register
1xxx)
or
as a 32 bit floating point number (Modbus registers 2xxx). This capability is enabled by
setting the ME command, see the RIO Command Reference for further details.
1
Only RIO firmware revisions Rev D and later support this capability ME.
Chapter 3 Communication ▫ 27 RIO-47xxx Rev 1.0r
Byte count
=
2
×(
Number of Analog Inputs
×
n
)