# How to load programs via modbus

**URL:** <https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809>\
**Category:** Robot Communication\
**Created:** [October 9, 2023, 8:08am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809 "2023-10-09T08:08:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca-0](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@luca-0](https://forum.universal-robots.com/u/luca-0)\
**Post date:** [October 9, 2023, 8:08am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/1 "2023-10-09T08:08:28Z")

</div>

Im competely new to modbus, and i want to use a siemens logo to control my cobot.

is it possible to load different programs via the siemens logo?

please explain thouroughly

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [October 9, 2023, 8:25am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/2 "2023-10-09T08:25:06Z")

</div>

It’s not possible to load programs via modbus, I’m afraid. You’ll have to set up the PLC to connect to the robot’s dashboard server. I’ve not used a Siemens Logo before, so I don’t know if it’s possible in that PLC.

You can read more here about setting up the connection: [Protective Stop - Enable robot from PLC - #18 by v.laurent](https://forum.universal-robots.com/t/protective-stop-enable-robot-from-plc/23914/18)  
Here’s the article on the dashboard server: [https://www.universal-robots.com/articles/ur/dashboard-server-e-series-port-29999/](https://www.universal-robots.com/articles/ur/dashboard-server-e-series-port-29999/)

---

<div class="post-metadata">

**Author:** ![luca-0](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@luca-0](https://forum.universal-robots.com/u/luca-0)\
**Post date:** [October 9, 2023, 8:54am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/3 "2023-10-09T08:54:13Z")

</div>

Oh, thats sucks. I think that the LOGO can only be used via modbus and nothing else. I have limited time during my internship to complete my assignment and i only wanted the Logo to be able to change programs and read robot state. Im very new to all of this so i think i will have to go back to not using any outside controller and just do everything on the robot.

thanks anyway

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [October 9, 2023, 9:55am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/4 "2023-10-09T09:55:20Z")

</div>

Makes sense. 🙂 It can be a bit challenging setting up the dashboard server in a PLC.

Good luck with your project.

---

<div class="post-metadata">

**Author:** ![bartcreemers](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bartcreemers](https://forum.universal-robots.com/u/bartcreemers)\
**Post date:** [October 10, 2023, 3:07pm UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/5 "2023-10-10T15:07:54Z")

</div>

I think it is possible:

1. You can start a default program (Installation =\> Startup =\> Default program file). This is called “Main” for example.
2. In your Main program you make use of sub-programs (Program =\> Advanced =\> Subprogram).
3. With MODBUS I/O you can call a sub-program from your Main program.

I use this with a Unitronics PLC.

---

<div class="post-metadata">

**Author:** ![dasa](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@dasa](https://forum.universal-robots.com/u/dasa)\
**Post date:** [October 11, 2023, 5:44am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/6 "2023-10-11T05:44:39Z")

</div>

It is not possible to connect with a LOGO via any custom Socket communication to the robot (Dashboard Server).  
Therefore it is not possible to start or load different programs in that way.

As already mentioned before you could create a switch case in the Main program waiting for Job numbers.  
The robot will run thru the switch cases and comparing any GP modbus register to the cases.  
Each case is one program.

It has still got one limitation. You are not able to change to different installations.

You might take a look at the brief documentation and LOGO project how to use a LOGO in combination with UR.

> [@UR - Siemens Logo example and Documentation](https://forum.universal-robots.com/t/ur-siemens-logo-example-and-documentation/30346):
>
> Hello all, there is many of you asking yourself how to get Siemens Logo with UR connected. I have created for all of you a simple documentation: how to use Siemens Logo soft comfort connect with UR how to use Logo as Modbus Server with UR how to use UR as Modbus Server and Logo as Client how to use UR Modbus Register Please find the documentation and the example project at my Github repo.

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [October 11, 2023, 5:45am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/7 "2023-10-11T05:45:23Z")

</div>

That’s true. Good idea. 🙂  
You’ll have the limitation of not being able to use threads/events and other subprograms in the programs, but that’s not too bad, I reckon. They can be included in the main program maybe.

---

<div class="post-metadata">

**Author:** ![magnus.wallem](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@magnus.wallem](https://forum.universal-robots.com/u/magnus.wallem)\
**Post date:** [October 13, 2023, 10:53am UTC](https://forum.universal-robots.com/t/how-to-load-programs-via-modbus/30809/8 "2023-10-13T10:53:29Z")

</div>

You could still use threads, when a case is active set a variable to True, and in the thereads use a While loop when said case is true, otherwise the thread is dormant. Or perhaps even use Events for this purpose to avoid to many running threads doing nothing.
