Skip to main content
Submitted by Galil_JohnH on Wed, 12/05/2012 - 12:13
Ethernet daisy Chain

For users that need to expand their IO across multiple devices, Galil Ethernet based controllers have a built-in Master/Slave capability.  This means that if a system has an Ethernet based DMC motion controller yet needs to add one or more RIO units to expand the IO capability, the DMC controller can be set up to reference the RIO inputs and outputs automatically.  Likewise, if a system needs to have multiple RIO Pocket PLC units - any one of those units can be set up as the "Master" controller such that it automatically references the i/o of all of the slave units.  The only limits to this are  the number of Ethernet handles that the master RIO or DMC unit has available. (Note: use the TH command to see how many handles a particular product has available).

Here are the steps to get a Master/Slave system working with 4 RIO units (1 master and 3 slaves):

Step 1) Connect to each RIO unit with Galil software and assign an IP address.  A helpful nomenclature is to use the last 2 digits of the controller serial number as the last field of the IP address so its easy to remember what each units IP address is.

Step 2) use the following code-generator and input the IP address of each of the slave units:

Master With Multiple Slaves Generator

click "Generate Code".  Then copy/paste the dmc program code that is generated into the Galil software Editor when connected to the "Master" controller.  Download and Execute this code (XQ).

Step 3) In the response window, you should see the following text:

Set flag=x where x is 1-6

by looking at the code, you can see that the "flag" variable controls different types of i/o requests to the slave units.   As a simple test, set flag=1 in the terminal and this will cause output 1 on each of the slave devices to start blinking every 1 second.  Use the other included routines as a starting point for controlling the slave analog and digital  i/o for your system.

More details on setting up a Modbus slave device can be found in this article: