![Galil Motion Control RIO-47 series
RIO-47100 User Manual Download Page 23](http://html1.mh-extra.com/html/galil-motion-control/rio-47-series-rio-47100/rio-47-series-rio-47100_user-manual_558776023.webp)
Modbus
An additional protocol layer is available for speaking to I/O devices. Modbus is an RS-485 protocol
that packages information in binary packets that are sent as part of a TCP/IP packet.
Modbus/TCP requires an Ethernet connection between master and slave. Modbus/TCP also requires
that all slaves communicate with their masters over port 502. See the IH command to setup port
communication for the RIO.
The Modbus protocol has a set of commands called function codes. As a Modbus Class 1 device, the
RIO-47xxx supports the 10 major function codes:
Function Code
Modbus Description
1
Read Coil Status
2
Read Input Status
3
Read Holding Registers
4
Read Input Registers
5
Force Single Coil
6
Preset Single Register
7
Read Exception Status
15
Force Multiple Coils
16
Preset Multiple Registers
Table 3.2: Supported Modbus function codes and descriptions.
All modbus function codes listed in Table 3.2 are supported by the RIO when it operates as a master
(client) or when it operates as a slave (server).
Note: The remainder of this chapter uses the '$' symbol to signify that numbers are in hexadecimal
notation.
As a Modbus Master
The RIO-47xxx provides three method of Modbus communication as a master:
1. The first method of Modbus communication uses standard Galil commands. The following
commands support Modbus:
@IN[], @AN[], @OUT[], SB, CB, OB, and AO
See the RIO command reference individually for each command on how to address a Modbus
slave.
2. The second method uses the MB command that requires the user to enter a select a few key
parameters and allows the controller to build the Modbus packet. The formats vary depending
on the function code that is called. For more information refer to the MB command in Command
Reference
3. The final method allows the user to send raw Modbus packets. This gives the user complete
control over the creation of their Modbus packet including transaction identifiers, protocol
identifiers, length field, Modbus function code, and data specific to that function code.. To send a
raw Modbus packet the user must set the MB command with a function code of –1. For more
information refer to the MB command in Command Reference
The following sections provide a full description of each method.
Chapter 3 Communication ▫ 23 RIO-47xxx Rev 1.0r