Articles Download Safety & Security Forum myUR Go to Main Site

Universal Robots A/S
Energivej 51
DK-5260 Odense S

T: +45 8993 8989
sales@universal-robots.com

 
  • Articles
  • Download
  • Safety & Security
  • Forum
  • myUR
  • Go to Main Site
  • Support
  • Articles
  • Modbus slave addresses - 16369

Modbus slave addresses - 16369

Using Modbus slave addresses .

Last modified on Sep 30, 2024

Using Modbus slave addresses.

Examples are valid for:

CB2 Software version: prior to 1.4
CB2 Software version: 1.8.16941
CB3 Software version: 3.1.17779
e-Series Software version: All versions

Note that older or newer software versions may behave differently.

There might be circumstances in which it is essential to be able to set specific slave addresses (slave number, slave ID) for the Modbus signals that you have set up by e.g. following the guide Set up Modbus communication - 16357

Since the slave address is not always needed, it is set to a default value of 255. In case you need the slave address for some signal to be set differently follow the steps below, depending on the SW version you are working with:

SW versions higher than 1.4

The “Show advanced options” check box on the Modbus client setup was introduced in the Polyscope SW version 1.4. Since then the Modbus slave address of each signal can be configured from there, just changing the default address 255 to the desired value on the corresponding box. As an example you might added an output signal named "out1" with IP address "154.140.1.12" and signal address "203", using the slave address “25”.

Advanced Settings

SW versions lower than 1.4

If you are working with a SW version lower that 1.4 then you must follow the following steps:

  1. Add the Modbus signal to your installation, specifying its IP address, signal address, signal type and name. When this is done, the signal connection will use slave address 255. As an example you might added an output signal named "out1" with IP address "154.140.1.12" and signal address "203".

Signaladdedexample1

  1. Make a new empty robot program.
  2. Select the Advanced tab from the Structure menu.
  3. Press "Script Code", and select the Command tab.
  4. In the text field, enter the script command "modbus_add_signal()", which takes arguments as described in the script manual found here. When using the script command to add Modbus signals, you have the opportunity to specify a custom slave address. If e.g. you want to change the slave address of your signal to 25, enter 25 as the second argument to the command. All other arguments must then match exactly the values you set up under step 1

Signaladdedscriptcommand

  1. Push the "Play" button to run this little program that you just made.
  2. Now the signal will instead use the specified slave address as opposed to the value of 255 which was used when the signal was initially set up.
  3. In case you have more than one signal, you want to change the slave address of, you should add multiple script command lines in the small program, one for each signal to be changed.


NOTE:

Each time a robot program is run, the Modbus signals are reset. This means that if you have followed the steps above in order to change a slave address, and a program is then started, each signal will then again use the default slave address value of 255.
Therefore, it is important that you add the same script command lines as presented above to the very beginning of all robot programs in which you use Modbus signals which need a certain slave address value.

Related articles

UR MODBUS Slave Setup - 20579
Modbus Register and Digital I/O - 19252
Modbus Server
Modbus client troubleshooting
Modbus TCP Client Setup
Modbus communication - 16357
logo

Product

  • UR3e Robot
  • UR5e Robot
  • UR10e Robot
  • UR16e Robot
  • UR20 Robot
  • UR+ Products

Company

  • About us
  • Contact us
  • Careers We're hiring
  • UR merchandise

Training / Resources

  • Academy
  • Technical Resources
  • Articles
  • FAQ

Insights

  • Blog
  • Case stories
  • Content library
  • News centre
  • Podcast
  • Webinars & Events

Get in touch

  • Ask an Expert
  • Schedule a no-cost assessment
  • Find a distributor
  • Customer support

Connect with us

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com
  • Copyright @ Universal Robots 2025
  • Cookie policy
  • Privacy policy
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com

Copyright © Universal Robots 2025

Cookie policy
Privacy policy