Receive register data from primary/secondary client

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.

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.

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 that are related to register values.

The RTDE interface however does have explicit support for register values and can be extracted fairly easily using the RTDE Python client library.

@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.

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 a few months ago. It uses URScript within a running program to send a string to a Python server.