# RTDE vs Socket Communication

**URL:** <https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355>\
**Category:** URScript\
**Created:** [August 19, 2022, 10:43am UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355 "2022-08-19T10:43:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon\_17s](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jon\_17s](https://forum.universal-robots.com/u/jon_17s)\
**Post date:** [August 19, 2022, 10:43am UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/1 "2022-08-19T10:43:18Z")

</div>

Hi,  
I made some program to connect my UR to a PC. My UR need send some command to My Computer to get some data like yaw, pith, roll etc. Which method—RTDE or Socket Comms—is preferable?

Please clarify the circumstances in which I should use RTDE or Socket Comms.  
What are the benefits and drawbacks of RTDE or socket communications?

Thank you

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [August 19, 2022, 3:40pm UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/2 "2022-08-19T15:40:51Z")

</div>

Are you doing real-time control of the robot or just reaching out once in a while to get the data?

---

<div class="post-metadata">

**Author:** ![jon\_17s](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jon\_17s](https://forum.universal-robots.com/u/jon_17s)\
**Post date:** [August 19, 2022, 4:16pm UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/3 "2022-08-19T16:16:55Z")

</div>

I am doing real-time control of the robot.

My PC will act as an manager whom instructing the robot to move to some pose, doing a trans\_pose, repeat some flow, triggering UR I/O, etc.

But in order for my computer to know if the robot has reached a certain pose or what data robot needs, I need the robot to transmit certain commands or information to my PC.

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [August 19, 2022, 4:25pm UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/4 "2022-08-19T16:25:51Z")

</div>

Yea that sounds like what RTDE was intended for. I think it provides semi-reliable updates around 125Hz. Technically the robot does motion updates every 500Hz but I think it still works.

edit:  
[Description of update rate](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/#:~:text=At%20the%20moment%20the%20CON%20only%20supports%20one%20output%20recipe%20and%20the%20output%20frequency%20is%20configurable.%20For%20CB%2DSeries%20robots%20the%20frequency%20must%20be%20between%201%20and%20125%20Hz%20and%20the%20output%20rate%20will%20be%20according%20to%20floor%20(125%20/%20frequency)%2C%20while%20for%20e%2DSeries%20robots%20the%20frequency%20can%20go%20up%20to%20500%20Hz.)

---

<div class="post-metadata">

**Author:** ![jon\_17s](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jon\_17s](https://forum.universal-robots.com/u/jon_17s)\
**Post date:** [August 20, 2022, 1:10am UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/5 "2022-08-20T01:10:12Z")

</div>

Could you please explain to me, what the advantages and disadvantages using RTDE rather than socket comm?

Thank You

---

<div class="post-metadata">

**Author:** ![jon\_17s](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jon\_17s](https://forum.universal-robots.com/u/jon_17s)\
**Post date:** [August 20, 2022, 1:18am UTC](https://forum.universal-robots.com/t/rtde-vs-socket-communication/23355/6 "2022-08-20T01:18:25Z")

</div>

Also could the UR resetting the input register?  
I have some thread to get data from PC

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

I want to reset the input register so the robot not read it multiple times. I have been try to reset the input register in my PC after send the input register, but i don’t know how to make sure the data have been read by robot and can be reset by PC.
