# RTDE programming help for UR3e (beginner help)

**URL:** <https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805>\
**Category:** Robot Communication\
**Created:** [June 7, 2022, 8:51am UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805 "2022-06-07T08:51:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon22203897](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@anon22203897](https://forum.universal-robots.com/u/anon22203897)\
**Post date:** [June 7, 2022, 8:51am UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/1 "2022-06-07T08:51:43Z")

</div>

Hi, I current have the UR3e, and am able to control it via the Teach Pendant. I have looked into the RTDE functionalities and would like to get this working so that I can code the movements of the robot through Python on my laptop, however I’m not completely sure where to get started. How do connect my robot to my laptop (I think it is via TCP/IP, but I’m not entirely sure how to actually do that)? And how would I be able to program some basic movements of the robot through Python?

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [June 7, 2022, 2:14pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/2 "2022-06-07T14:14:29Z")

</div>

Hello,  
This tutorials might help you.

[Universal Robot RTDE tutorial #1 (Where to start the journey) - YouTube](https://www.youtube.com/watch?v=N2nh3iG7kvo&t=199s)

---

<div class="post-metadata">

**Author:** ![anon22203897](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@anon22203897](https://forum.universal-robots.com/u/anon22203897)\
**Post date:** [June 7, 2022, 3:28pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/3 "2022-06-07T15:28:36Z")

</div>

Thanks! I’m still very new to this and confused about how the actual connection is made. Would you be able to expand upon that? In the zip file from the UR website, there is a example\_control\_loop.py file, which contains ROBOT\_HOST and ROBOT\_PORT attributes. Is this all that is needed for the connection? Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [June 8, 2022, 7:11am UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/4 "2022-06-08T07:11:26Z")

</div>

Port and IP is enough from example\_control\_loop.py.  
But also, You have to connect it from the Teaching Pendant.  
Go to Hamburger Menu\>\>\>Settings\>\>\>Network\>\>\>DHCP and apply.  
Afterwards you’ll be connected. Possibly you will also need to upload license.  
If you don’t connect the robot directly to the computer and you go via router, you have to go into router settings and open a port there.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/b/bc47518945c31ee727b3bb50e4dec22633a1b4d3.png)

---

<div class="post-metadata">

**Author:** ![anon22203897](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@anon22203897](https://forum.universal-robots.com/u/anon22203897)\
**Post date:** [June 8, 2022, 4:36pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/5 "2022-06-08T16:36:51Z")

</div>

Thanks for the information! When I try to run this after connecting the Teaching Pendant with DHCP, I get a Protective Stop error saying Fieldbus input disconnected. Any ideas as to what is causing this?

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [June 9, 2022, 9:43am UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/6 "2022-06-09T09:43:49Z")

</div>

I’m not sure honestly, I have never had the same case before.  
When I connected I also had several problems, but I don’t remember every step.  
For the beginning I would recommend to upload license file in Robot Registration field, take the robot IP from cmd and send command to that IP.

---

<div class="post-metadata">

**Author:** ![anon76877199](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anon76877199](https://forum.universal-robots.com/u/anon76877199)\
**Post date:** [June 9, 2022, 1:09pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/7 "2022-06-09T13:09:56Z")

</div>

You should enter real IP of the robot. FieldBus is not the interface you need.  
Click on the menu button right top and open “About” window. It will display you actual IP address

 ![VirtualBox_URSIM_09_06_2022_16_06_57](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/d/d20e0dc0a06e4df6701e7f57495b770b10429230.jpeg)

---

<div class="post-metadata">

**Author:** ![anon22203897](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@anon22203897](https://forum.universal-robots.com/u/anon22203897)\
**Post date:** [June 9, 2022, 1:23pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/8 "2022-06-09T13:23:36Z")

</div>

So I would set this IP address as the static address in the Network settings?

---

<div class="post-metadata">

**Author:** ![anon76877199](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anon76877199](https://forum.universal-robots.com/u/anon76877199)\
**Post date:** [June 9, 2022, 1:47pm UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/9 "2022-06-09T13:47:01Z")

</div>

This is address from the DHCP, but DHCP is configured to make it permanent.  
You may configure static IP

---

<div class="post-metadata">

**Author:** ![dickyaji1771](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@dickyaji1771](https://forum.universal-robots.com/u/dickyaji1771)\
**Post date:** [February 25, 2024, 1:58am UTC](https://forum.universal-robots.com/t/rtde-programming-help-for-ur3e-beginner-help/21805/10 "2024-02-25T01:58:07Z")

</div>

my series is CB, is it still 30004 instead of 30002 as a port?
