# getRobotRealTimeData usage

**URL:** <https://forum.universal-robots.com/t/getrobotrealtimedata-usage/4293>\
**Category:** Java\
**Created:** [May 14, 2019, 9:02am UTC](https://forum.universal-robots.com/t/getrobotrealtimedata-usage/4293 "2019-05-14T09:02:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon76834596](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@anon76834596](https://forum.universal-robots.com/u/anon76834596)\
**Post date:** [May 14, 2019, 9:02am UTC](https://forum.universal-robots.com/t/getrobotrealtimedata-usage/4293/1 "2019-05-14T09:02:00Z")

</div>

Hello,  
I’m trying to record a trajectory in real time using the UrCaps Sample “getRobotRealTimeData”.  
The problem is that it seems that reading a snapshot from the Real Time Client at every update (I’ve tried several schedule, 500ms,400ms,etc …) is taking too much ressources to process quickly enough.  
I wanted to know if it was possible to restrain the Data read from the real time client.  
Thank you.  
Edit : i’m using sdk 1.2.41 and i’m limited to this one.

---

<div class="post-metadata">

**Author:** ![sko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sko/32/573_2.png) [@sko](https://forum.universal-robots.com/u/sko)\
**Post date:** [May 14, 2019, 11:55am UTC](https://forum.universal-robots.com/t/getrobotrealtimedata-usage/4293/2 "2019-05-14T11:55:46Z")

</div>

Hi,

in the example URCap _getRobotData_ with every request the socket is opened and then closed again. This is suitable for the scope of the example, but would take too much time for record a trajectory in the needed precision. You could let the recording run on a daemon process to save the data continuously.

But for acquiring real time data I would recommend using the RTDE-Interface. This is a more modern protocol for reading from/writing on the UR. The corresponding support article can be found here: [https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/](https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/)

You can try implementing the example in a separate python daemon on your URCap and communicate via XML-RPC with the robot program. The _MyDaemonSwing_ URCap example can give you a basis for this.

---

<div class="post-metadata">

**Author:** ![anon76834596](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@anon76834596](https://forum.universal-robots.com/u/anon76834596)\
**Post date:** [May 14, 2019, 1:44pm UTC](https://forum.universal-robots.com/t/getrobotrealtimedata-usage/4293/3 "2019-05-14T13:44:38Z")

</div>

Thank you very much, indeed the way I worked wasn’t suitable for my purpose.  
I’ll examinate the communication with xml-rpc and daemon.
