Modbus Communications

Created by Rico Stodt, Modified on Fri, 18 Feb, 2022 at 10:51 AM by Rico Stodt


Physical Connection

The ethernet cable must be connected to the robot’s external ethernet port.  It can then be run directly to the device, or to a network switch to which the device is also connected.  The most common configuration is to a dedicated  switch on an isolated manufacturing network.  The benefit of using a switch is that it is possible to also connect a computer to open Intera Studio.

      ***Note: Do not use the ethernet port on the inside of the robot controller cover.  This port is not active.  Also, do not use the spare port on the Moxa IO device inside the robot controller cover.

Configuration on Sawyer

In Intera Studio, click on the “Device Editor” icon in the toolbar, then click the “+” symbol to add a device, then choose “MODBUS”.  In the next screen, provide the following information:

  • A name for the device (can be anything you choose excluding most symbols)
  • The IP address of the device.
  • A prefix for inputs and a prefix for outputs.  The prefixes can be anything you like, and are just there to help you identify which signals are inputs and which are outputs.  You may want to make this align with the convention of your PLC.
  • A range for the inputs and outputs.


IP Addressing

Make sure the IP addresses and subnet masks of the devices are compatible with the robot. If you don’t get a green status symbol next to the device, consult your IT staff for recommendations on IP address settings. You can change the IP address, and subnet mask on the robot via the Field Service Menu (FSM).  We will discuss the line range for some specific examples later in this document.


Once the device is created, you must then create the signals associated with that device.  The signals are similar to variables in that they are the name that you will use in the logic to refer to that value.


Version 5.1 of Intera supports two different Modbus functions:  

  • 2 - Read discrete inputs
  • 15 - Write multiple coils (Modbus uses the term “coil” to refer to a discrete output.)

Allen Bradley Micro850

In order to use Modbus on this device, the Modbus mapping in the PLC must be explicitly set using the programming software Connected Components Workbench.  This is found in the Controller section, under “Modbus Mapping”.  Before setting up the mapping, the appropriate Modbus ranges must be known.  This is found in the user manual for the PLC.  According to Appendix B in the Micro850 user manual, the range of possible addresses for coils is 000001 to 065536 and the range for discrete inputs is 100001 to 165536.

This means the bits you want to set from the robot (outputs or coils), will need to be mapped in the range 000001 to 065536, and bits you want to read (inputs), will need to be mapped in the range 100001 to 165536.

Go to the Modbus Mapping section of the Connected Components Workbench and associate the variables you want to the robot to read and the ones you want it to write.  Here are a couple of key pieces of information when setting up the Modbus mapping in the PLC.

  • IMPORTANT:  You must have at least 32 contiguous coils (or outputs) configured in the Modbus mapping, or the writing of outputs from the robot will not work at all.  You may have more than 32, and they do not have to end on byte or word boundaries (for example, you can map 33 bits).  Note that this is a change from Intera version 3, which used a different Modbus function code.  So if you are upgrading from Intera 3, make sure you have at least 32 contiguous bits configured between 000001 and 065536.  This does not apply for the discrete inputs where any length range will work.  
  • All of the bits in a range must be mapped contiguously.  For example, if you map bits to Modbus addresses 000001 and 000032, it will not work.  Bits 000002 to 000031 need to also be mapped.

In Intera Studio, the Modbus Range for outputs and inputs starts at 0, therefore they are offset by 1 for outputs and by 100001 for inputs.  So for outputs, 0 on the robot corresponds to 000001 in the PLC.  Here is an example of how the addresses match up if you wanted to map the first 8 inputs and 8 outputs.

*You still need to configure 000001 to 000032 in the Modbus mapping, but you don’t have to include those in the range on the robot.

  • The robot will write values for all the bits in the output range constantly, even if there is no signal configured for that bit, and not just when a value changes. 
  • The task on the robot doesn’t need to be running for the Modbus communications to happen.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article