# Reading return values

**URL:** <https://forum.universal-robots.com/t/reading-return-values/1893>\
**Category:** Robot Communication\
**Created:** [April 17, 2018, 10:02am UTC](https://forum.universal-robots.com/t/reading-return-values/1893 "2018-04-17T10:02:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon83012695](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@anon83012695](https://forum.universal-robots.com/u/anon83012695)\
**Post date:** [April 17, 2018, 10:02am UTC](https://forum.universal-robots.com/t/reading-return-values/1893/1 "2018-04-17T10:02:51Z")

</div>

Hi!

I’m currently using port 30003 for realtime data, and would like to use the URScript function get\_inverse\_kin. Question is:

How do I get the function-calls return-data? What interface do I need to use?

Thanks!

---

<div class="post-metadata">

**Author:** ![anon90783502](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon90783502](https://forum.universal-robots.com/u/anon90783502)\
**Post date:** [April 17, 2018, 12:17pm UTC](https://forum.universal-robots.com/t/reading-return-values/1893/2 "2018-04-17T12:17:37Z")

</div>

Here is a list of available interfaces [Remote Control Via TCP/IP - 16496](https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/remote-control-via-tcpip-16496/)

Try to send the urscript commands terminated in ‘\n’ character.

---

<div class="post-metadata">

**Author:** ![anon83012695](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@anon83012695](https://forum.universal-robots.com/u/anon83012695)\
**Post date:** [April 17, 2018, 12:27pm UTC](https://forum.universal-robots.com/t/reading-return-values/1893/3 "2018-04-17T12:27:20Z")

</div>

I know how to call URScript functions, I do that on port 30003, however I do not know how to or where to recieve the results of a function call. All interfaces only send back the current robot state, not the answer to the function call. Or am I missing something?

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ajp/32/471_2.png) [@ajp](https://forum.universal-robots.com/u/ajp)\
**Post date:** [April 18, 2018, 2:44pm UTC](https://forum.universal-robots.com/t/reading-return-values/1893/4 "2018-04-18T14:44:55Z")

</div>

Hi eric,

You haven’t missed anything, you need to take additional steps to make the returned values accessible. If you put your get\_inverse\_kin() command within a function you can then either open a socket to send the results back to your server or write them into one of the general purpose registers that you can then access through the RTDE.
