![Galil Motion Control RIO-47 series
RIO-47100 User Manual Download Page 21](http://html1.mh-extra.com/html/galil-motion-control/rio-47-series-rio-47100/rio-47-series-rio-47100_user-manual_558776021.webp)
When the RIO acts as the master, the
command is used to assign handles and connect to its slaves.
The IP address may be entered as a 4 byte number separated with commas (industry standard uses
periods) or as a signed 32 bit number. A port number may also be specified, but if it is not, it will
default to 1000. The protocol (TCP/IP or UDP/IP) to use must also be designated at this time.
Otherwise, the board will not connect to the slave. (Ex:
=
151
,
25
,
255
,
. This will
open handle #2 and connect to the IP address 151.25.255.9, port 179, using TCP/IP)
Once the
command is used to connect to slaves, the user can communicate to these slaves by
sending commands to the master. The
command is used for this purpose, and it has the following
syntax.
=
"command string"
Here "command string" will be sent to handle h. For example,
=
"XQ"
command to the slave/server on handle A. A more flexible form of the command is
h= field1,field2,field3,field4 ... field8
where each field can be a string in quotes or a variable.
When the Master/client sends an
command to a Slave/server, it is possible for the master to
determine the status of the command. The response
4
will return the number 1 to 4. 1
indicates waiting for the acknowledgement from the slave. 2 indicates a colon (command accepted)
has been received. 3 indicates a question mark (command rejected) has been received. 4 indicates
the communication timed out.
If a command generates multiple responses (such as the
command), the values will be stored in
0
n
where n is the last field. If a field is unused, its
See the Command Reference for more information on the
The RIO can communicate through its different channels, which can be tightly controlled. When a
device queries the RIO, it will receive the response unless it explicitly tells the RIO to send it to
another device. When a command that generates an unsolicited response is part of a downloaded
program, the response will route to whichever port is specified by the
Ethernet handle or the RS232 port). If the user wants to send the message to a port other than what
is specified by the
{Eh}
or
{P1}
to the end of the command (Ex.
{EB}
"Hello"
will send the message "Hello" to handle #2 and
{P1}
"Hello"
will send it to the
serial port).
Handling Communication Errors
A reserved automatic subroutine, which is identified by the label
, can be used to catch
communication errors. If an RIO has an application program running and the TCP communication is
lost, the
routine will automatically execute. The
Multicasting
A multicast may only be used in UDP/IP and is similar to a broadcast (where everyone on the network
gets the information) but specific to a group. In other words, all devices within a specified group will
receive the information that is sent in a multicast. There can be many multicast groups on a network
and are differentiated by their multicast IP address. To communicate with all the devices in a specific
multicast group, the information can be sent to the multicast IP address rather than to each
individual device IP address. All Galil devices belong to a default multicast address of 239.255.19.56.
This multicast IP address can be changed by using the
command.
Chapter 3 Communication ▫ 21 RIO-47xxx Rev 1.0r