# Receive register data from primary/secondary client

**URL:** <https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139>\
**Category:** Robot Communication\
**Created:** [April 26, 2023, 6:34pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139 "2023-04-26T18:34:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johogee](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@johogee](https://forum.universal-robots.com/u/johogee)\
**Post date:** [April 26, 2023, 6:34pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139/1 "2023-04-26T18:34:56Z")

</div>

Is there a way to receive register data from the robot using the primary or secondary client interface? I have sent data to a register but have not yet been able to receive register data.

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [April 26, 2023, 7:40pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139/2 "2023-04-26T19:40:53Z")

</div>

Yeah you should just be able to do a read register command like this one: read\_input\_integer\_register(address) to read an input register for example.

Edit:

I should clarify I’ve only done this via sockets called through a URCAP (either over the primary or secondary interface). Not sure what the implementation looks like otherwise.

---

<div class="post-metadata">

**Author:** ![smarmstr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/smarmstr/32/4896_2.png) [@smarmstr](https://forum.universal-robots.com/u/smarmstr)\
**Post date:** [April 26, 2023, 7:50pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139/3 "2023-04-26T19:50:00Z")

</div>

Not over the primary client interface to my knowledge. I’ve used this interface frequently and I’m not familiar with any variable defined in their [specification](https://s3-eu-west-1.amazonaws.com/ur-support-site/16496/ClientInterfaces_Primary.pdf) that are related to register values.

The [RTDE interface](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/) however does have explicit support for register values and can be extracted fairly easily using the [RTDE Python client library](https://github.com/UniversalRobots/RTDE_Python_Client_Library).

---

<div class="post-metadata">

**Author:** ![johogee](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@johogee](https://forum.universal-robots.com/u/johogee)\
**Post date:** [April 27, 2023, 2:13pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139/4 "2023-04-27T14:13:42Z")

</div>

@smarmstr thanks for the reply. I have come to the conclusion that RTDE is the best method for robot status states and transfer of data. I’m working on a robot program using URscript to transfer ascii values, convert them to letters than concatenate them to a string.

---

<div class="post-metadata">

**Author:** ![smarmstr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/smarmstr/32/4896_2.png) [@smarmstr](https://forum.universal-robots.com/u/smarmstr)\
**Post date:** [April 27, 2023, 3:21pm UTC](https://forum.universal-robots.com/t/receive-register-data-from-primary-secondary-client/28139/5 "2023-04-27T15:21:11Z")

</div>

That sounds useful.

Strange as it is, straight out of the box, these interfaces don’t have a good way to send user defined strings from the robot to the client.

_-Edit_  
Actually, I forgot I wrote [this](https://gist.github.com/Shawn-Armstrong/001c14d8496f1362dace27bd6e1535e1) a few months ago. It uses URScript within a running program to send a string to a Python server.
