www.digi.com
  Advanced Search
Product Selector
     
  Technical Support
Drivers

Firmware Upgrades

FAQs

Product Documentation

Cabling

Support Tools

Legacy Products

About Digi Support

Knowledge Base

Online Support Request

FTP Site



Related Links
Inside Out Networks


 
Solutions Partners Support and Training Corporate Info Where to Buy Order Where to Buy Site Map Contact Us
Home > Support >kbase >
Digi One RealPort IA Modbus Multi-Master Configuration
Digi One RealPort IA Modbus Multi-Master Configuration Digi One RealPort IA Modbus Multi-Master Configuration

 

NOTE: This document shows how to set up a simple two-master to one-slave Modbus configuration using the Digi One RealPort IA.  Although this document deals with Modbus., the Digi One RealPort IA provides support for various other IA protocols such as DF1, Compoway/F, FINS, and Hostlink.  Please consult Digi documentation for details on which protocols provide multi-master support.

Modbus Master-Slave Relationship:

First, in Modbus, each master has a corresponding slave: 

In some cases a device can act as a master.  For example a PLC could be a slave to another master PLC.  Modbus/TCP maintains this relationship.  If two device servers are used to tunnel Modbus over Ethernet, the following relationship applies: 

Notice that a master always communicates to a slave.

What is Multimaster and why would I need it?

The diagrams above show a single master to single slave relationship.  Digi’s multi-master implementation allows two (or more) host devices, or masters, to communicate with one or more slaves at the same time.  Generally when one host is connected to a device, the port is locked and must be disconnected before another host can communicate with the device. 

Digi’s multi-master configuration allows the device server to act like a traffic cop by allowing traffic from multiple hosts to communicate with the slave device.  This is a special feature not found in other product lines.

FOR EXAMPLE: When monitoring a PLC using HMI software, which requests data periodically through the Digi One IA, the PLC program occasionally needs to be updated. Often an engineer in a different area does the update. Now, the PLC configuration can be updated without needing to take down the connection to the HMI software.

How does Multimaster work?

Let’s first take a look at a sample multi-master setup: 

                                          
                                                             

The Digi One IA slave understands how to “queue” queries and responses in the correct order.  This is the order taken in the diagram above:
1.    PC sends a query (#1) to the PLC.
2.    Digi One IA accepts and forwards query #1 to the PLC
3.    HMI Panel sends a query (#2) to the PLC.
4.    Digi One IA holds the query #2 from the HMI Panel.
5.    PLC responds to query #1 from the PC.
6.    Digi One IA returns response #1 to the PC.
7.    Digi One IA releases query #2 and forwards it to the PLC.
8.    PLC responds to query #2 from the HMI.
9.    Digi One IA returns response #2 to the HMI.
 

Using Digi One IA as Either Master and/or Slave:

Unlike the PC shown above, some masters may not have Modbus/TCP or even Ethernet capabilities.  A Digi One IA can be used as a Master in this case as shown in the diagram above. 

The HMI Panel (which could be any Modbus serial master device) has a serial port, but not Ethernet.  In this case a Digi device server is used to “convert” serial to Ethernet.  If both (or all) masters are Ethernet based, the slave setup is still identical to this example.

 You now have an idea how multi-master works.  Let’s take it a step further with a real example using the diagram above. 

Setup the Digi Device Servers:

This example steps though setting up the Digi One IA in a simple multi-master configuration.
NOTE:
Refer to the Digi Configuration and Administration Guide for more details.

First, you must assign the Digi devices IP addresses.  There are several ways to accomplish this:

  • Digi Port Authority Remote
  • DHCP or RARP
  • ARP/Ping
  • Command line via the serial port

Digi Port Authority Remote comes on the Access Resource CD.  It's discovery tool is the easiest way to assign the Digi One IA an IP address.  Digi Port Authority Remote is also a great tool  for troubleshooting and diagnostics.  To assign an IP address:

  1. Load Digi Port Authority Remote from the Access Resource CD or it can be downloaded from http://supportold.digi.com    
  2. Start Digi Port Authority Remote by going to Start>Programs>Digi>Digi Port Authority Remote.
  3. Make sure ADDP is selected as the Discovery Protocol.
  4. Click Discover.
  5. One of two things will happen next, depending on configuration:
    1. If the Digi One IA cannot find a DHCP server and the unit has never been used, which means the Digi should have an IP of 0.0.0.0., a box indicating that an IP Address has not been assigned to the Digi One IA device will appear.  At this time you can assign an IP address, subnet mask and default gateway.



    2. Digi Port Authority Remote will discover all configured Digi devices on the local network and list their IP addresses as in the window below:



      F
      rom this screen you can select the appropriate device and then click Configure to open a browser window for further configuration or you can select Monitor to monitor the device.

Configuring the Slave (PLC) Side (10.10.11.48):

 

1.    Open a browser window, point to the IP address of the Digi One IA, and login as root (or use Digi Port Authority Remote as shown above).

2.    A screen like this should appear:

           
       3.    Select Setup Wizards > Industrial Protocols > Next.

4.    Select the proper serial port settings.

5.    Select Modbus RTU (or Modbus ASCII if applicable) as the Serial IA Protocol.

6.    Select Slave for this device.

7.    The final screen should appear as:

8.    Press Finish to commit the changes.

That’s it for the slave device server – it is now ready to for use.  Simply point your Modbus TCP master application(s) at the IP address 10.10.11.48 to access the slave device. 

You can now test a single master to the slave by setting up the Modbus master connected directly to Ethernet (i.e. a Modbus master application on a PC).  Go to the next section to set up the serial based Modbus master via a second Digi One IA device server.

Configuring the Digi One IA Master Unit: 

 

To set up the master, follow steps 1-5 above used to set up the slave - than continue with the following: 

6.             Select Master.

7.         Point to the IP address of the Slave.

8.             Select Modbus/TCP as the destination protocol.

9.             Select the Modbus ID of the slave device (called Protocol Address).  For this example select Allow All Addresses.
NOTE:
You could limit it to talk to Modbus IDs 100-120.

10.        Select No to finish the wizard, as there is only one Modbus/TCP slave (the Digi One IA). 
NOTE:
It is possible for one master to address up to eight slave servers (see below).
 

11.  When done, a screen like this should appear:

12.    Click Finish to complete the setup.

Test the Units:

You should now be able to use the Modbus masters – one using serial and the other Ethernet TCP/IP to talk to the Modbus slave unit.  Please see http://www.digi.com/ia/faqs/ for more details.  See also http://supportold.digi.com/support/techsupport/hardware/portserver/Modbus_Slave.htm for details on setting up a single Modbus slave.

Multimaster – Multi-slave Configuration:

As noted previously, it is possible to have multiple masters and multiple slaves.  In fact, you can have multiple slaves connected to one Digi One IA RealPort using multi-drop serial configurations.  In this case, the Modbus ID (Protocol Address) plus Digi IP address are used to distinguish which slave is the target for the query or command. 

Expanding on our previous drawing: 

 

Slave Configuration:

The slave configuration is identical to the setup used above for the single slave / multimaster.

Digi One IA Master Configuration:

Follow the steps outlined above to set up the master, with these exceptions: 

        9.          Protocol Address:  For 10.10.11.48, if you want to talk to only PLC1, enter 1 as the start and the end in the Protocol Address
                range (assuming PLC1 is assigned Modbus ID 1). 
                NOTE: If you wish to speak to both PLCs, then select All Addresses (or 1-2).

         

      10.         Select Yes, Configure Another Route and go through the setup for 10.10.11.49. 

NOTE: Changes to port configurations can be made from the Web UI by selecting Configure > Port > Industrial Protocols. 
Here you can add routes to additional slaves, change configurations or delete routes.

Also note a master can be set to communicate with only certain slave devices on the same Digi One IA slave.  For example, if 10
PLCs are attached to 10.10.11.48, they have Modbus IDs 1-10.  The Master at 10.10.11.47 can only access IDs 1-5 and 9. 
You would add two routes to 10.10.11.48 as:

Description

Destination

Protocol

Address

Slave One 1-5

10.10.11.48

Modbus/TCP

1-5

Slave One 9

10.10.11.48

Modbus/TCP

9

Slave Two

10.10.11.49

Modbus/TCP

All

When you finish configuring 10.10.11.49 select No to complete the setup.  Remember to select Finish to commit the changes.  You should now be able to test the configuration.

The above Master settings only apply to the Digi One IA device.  Configuration settings for Modbus PC-based software will vary depending on which software you use.  Please consult that product’s documentation for details.

 

 

solutions | partner programs | corporate info | support and training | where to buy
site map | contact us | press releases |
events | promotions | advertising

Copyright © 1996-2001 Digi International. All rights reserved.