# Connecting to a Universal Robot for read and write

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097>\
**Category:** Ignition\
**Created:** [April 15, 2025, 7:58am UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097 "2025-04-15T07:58:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 15, 2025, 7:58am UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/1 "2025-04-15T07:58:18Z")

</div>

Hi I am very new to Ignition and I am trying to set up communication between a Universal Robots UR5e and Ignition, Ignition would be used to create the user interface, before this I need to be able to pass data between the cobot and Ignition.

I reached out to UR and they suggested using Modbus, is this the best way?

I guess I need to setup registers on the cobot which ignition can read and write to, is this the way to go?

Have someone done this before, please advice

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 15, 2025, 9:05am UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/2 "2025-04-15T09:05:37Z")

</div>

I've done this, there are pre-defined registers on the cobot controller.

Best to make the cobot controller the Modbus Server.

> **[ModBus%20Server%20Data.pdf](https://s3-eu-west-1.amazonaws.com/ur-support-site/16377/ModBus%20Server%20Data.pdf)**
>
> 214.35 KB

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 16, 2025, 7:47am UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/3 "2025-04-16T07:47:45Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/706cb398b7695cee0400d8bf2f1c28e90b38181a.png)  
This is the communication system I am trying to implement. Steps 4, 7, 12 are variables from Ignition to cobot and **(1) can Ignition load and start a program using modbus?**

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/599a4197f42cf3c8937a8a3978a15bb9c3893942.png)  
The connection from Ignition has been successful

Since I am using the robot as server and the **(2) connection is successful, there is no setup required on the cobot end**, like "Modbus Client IO setup" on the cobot under Installations\>Fieldbus\>Modbus?

Matrix\_Engineering Thanks for the docx with adresses; **(3)so if I need to pass variables like diameter (float), should I use "General purpose 16 bit registers" 128 - 255 and does that mean I can pass atmost 128 variables (255 - 128)?**

**(4)And how should I configure the address in Ignition to read 128 and the Modbus Type is it "Holding register(UInt16)":**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b0cb132c835d34c0cdbd04f63293f4201302418.png)

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 16, 2025, 10:33am UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/4 "2025-04-16T10:33:40Z")

</div>

Tried:  
**(1)**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ffd808cfaad58c4a06f192402f0decce2aa65e40.png)

There is a program setup on the cobot which has "write\_output\_integer\_register(0, 300)" hoping this writes to general purpose register 128 (register 128 is referred as 0 in URscript)

and on Ignition tried reading/subscribing to the corresponding tag:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b63f7590b7d4c39462597dad08335f9e0a0ef1db.png)

**(2)**  
Also tried writing from ignition to register 128 and reading at cobot side using "temp = read\_input\_integer\_register(0)"

Ignition gives out error while writing:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/026f9926aa0e439457f6125502a000ac02051f3d.png)

Both didnt work out.

So I am using the right register and can the register 128 be used to read and write?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 16, 2025, 1:00pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/5 "2025-04-16T13:00:29Z")

</div>

Don't use the address mapping feature. Instead, create your own tags and manually enter the address.

For example, to get the e-stop status of the cobot controller:

`ns=1;s=[ur3]1.HRI262`

I used this coil to tell the cobot to run the program from the SCADA:

`ns=1;s=[ur3]1.C16`

I'm not sure about loading a user program, you'll have to dig more into the manual.

Additionally, in the driver settings under advancerd, you will want this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/44b83f1beadea931c4ac8ef4746e346c88cf10a7.png)

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 16, 2025, 2:07pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/6 "2025-04-16T14:07:12Z")

</div>

> [@Matrix\_Engineering](#):
>
> ns=1;s=[ur3]1.HRI262

Tried it:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff8dcf78e2b2706c041fb0e1a847a51432c3f3a8.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/d/1d82ce005c89489abe31691fce9d3aa268bf4803.png)

Also enabled zero based addressing and made sure the device name is correct:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0efe43a265a75cae24e1662eb360b3ae894abb79.png)

Should the data type be an integer?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 16, 2025, 2:08pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/7 "2025-04-16T14:08:51Z")

</div>

> [@mnizamudeen](#):
>
> Tried it:

No, you didn't. The OPC Item Path in your screenshot is missing the unit number before the dot.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [April 16, 2025, 2:11pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/8 "2025-04-16T14:11:11Z")

</div>

Also it's a status, make it a boolean.

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 18, 2025, 12:58pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/9 "2025-04-18T12:58:55Z")

</div>

Thanks guys, it worked.

---

<div class="post-metadata">

**Author:** ![Marcus\_Sysum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marcus_sysum/32/57944_2.png) [@Marcus\_Sysum](https://forum.inductiveautomation.com/u/Marcus_Sysum)\
**Post date:** [April 18, 2025, 5:39pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/10 "2025-04-18T17:39:12Z")

</div>

@mnizamudeen You will not be able to load a specific program through Modbus. There are some ways around this using case a statement in the main robot program that looks at a modbus register and calls the apropriate program. But Ur robot has the dashboard server which takes simple tcp commands. [Dashboard Server e-Series, port 29999 - 42728](https://www.universal-robots.com/articles/ur/dashboard-server-e-series-port-29999/)

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.inductiveautomation.com/u/mnizamudeen)\
**Post date:** [April 21, 2025, 12:36pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/11 "2025-04-21T12:36:34Z")

</div>

Thanks Marcis\_Sysum

I can setup a variable in the program and populate the variable over modbus to start the program but dashboard server seems like a better option, but how do I pass the dashboard server commands using Ignition.

Should I set up a TCP connection and then how?

---

<div class="post-metadata">

**Author:** ![Marcus\_Sysum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marcus_sysum/32/57944_2.png) [@Marcus\_Sysum](https://forum.inductiveautomation.com/u/Marcus_Sysum)\
**Post date:** [April 21, 2025, 2:01pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/12 "2025-04-21T14:01:10Z")

</div>

@mnizamudeen The easiest way to test the dashboard server is create a tcp device in ignition. Set it to packet based.  
click advanced properties and check the writable option it's false by default. Put a newline character for the writeback message Delimiter.  
The link I sent above has the list of commands. Just write your message to the writable tag for the tcp device.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/9/89660bc167309b2f98020d26aaa1773927c4c69a.png)  
Then when you hit enter the driver will write the message to the dashboard server. In this screenshot I am connected to ursim in a docker container.

---

<div class="post-metadata">

**Author:** ![jacob.cobb](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.cobb](https://forum.inductiveautomation.com/u/jacob.cobb)\
**Post date:** [June 18, 2025, 6:56pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/14 "2025-06-18T18:56:56Z")

</div>

I have set up modbus communication, but the value readout on the tag within ignition designer is '0'. The value for the same variable on the teach pendant is increasing, but the value is not being read by the tag.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 18, 2025, 7:15pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/15 "2025-06-18T19:15:23Z")

</div>

Show the address map for the robot and show the OPC path configuration for your tag that is not reading anything. Also, are there any errors/warnings in your gateway log?

---

<div class="post-metadata">

**Author:** ![jacob.cobb](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.cobb](https://forum.inductiveautomation.com/u/jacob.cobb)\
**Post date:** [June 18, 2025, 7:23pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/16 "2025-06-18T19:23:01Z")

</div>

Here are screenshots of those. There are no errors, just a zero value where there should be a number

 ![Address map](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/435e53fc3c332ab24189ec6cf5f1dcf536fc69f5.png)  
 ![Downtime OPC Image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c30c77bca7d8b75eddfaa6e12a4777b04889aab9.png)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 18, 2025, 7:27pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/17 "2025-06-18T19:27:31Z")

</div>

You are missing the leading unit Id and you also have the tag defined as a float, but are only reading a single modbus register. Try `[UR3 ModBus]1.HRF225`.

> **[Modbus Addressing | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/opc-ua/opc-ua-drivers/modbus/modbus-addressing#manually-create-an-address-for-a-single-tag)**
>
> Manually Addressing a Modbus Device

---

<div class="post-metadata">

**Author:** ![jacob.cobb](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.cobb](https://forum.inductiveautomation.com/u/jacob.cobb)\
**Post date:** [June 18, 2025, 7:32pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/18 "2025-06-18T19:32:29Z")

</div>

With that change I am still getting '0' unfortunately. If it helps, I'm converting a program variable value to modbus using the write\_port\_register(225,Downtime\_Output) thread script.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 18, 2025, 7:38pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/19 "2025-06-18T19:38:28Z")

</div>

Try adjusting the Ignition side register to `[UR3 ModBus]1.HRF224` or `[UR3 ModBus]1.HRF226`. you might be off by one register, though I would expect you to be getting a bogus value if you were off by one. Also, ensure `0-Based Addressing` is enabled in the Ignition configuration for your device.

Are you able to successfully read any of the robot status registers?

Universal Robot Docs for others to reference:

> **[Modbus Server - 16377 | Universal Robots Support](https://www.universal-robots.com/articles/ur/interface-communication/modbus-server/)**

---

<div class="post-metadata">

**Author:** ![Marcus\_Sysum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marcus_sysum/32/57944_2.png) [@Marcus\_Sysum](https://forum.inductiveautomation.com/u/Marcus_Sysum)\
**Post date:** [June 18, 2025, 7:43pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/20 "2025-06-18T19:43:06Z")

</div>

Enable zero based addressing in the advanced config. The ur robot is zero based

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 18, 2025, 7:44pm UTC](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097/21 "2025-06-18T19:44:12Z")

</div>

Wait I'm blind, you are missing `ns=1;s=` from your OPC path configuration on your tag. Try `ns=1;s=[UR3 ModBus]1.HRF225`. I'm surprised it didn't give you a configuration error.

[Next page](https://forum.inductiveautomation.com/t/connecting-to-a-universal-robot-for-read-and-write/105097.md?page=2)
