RTDE – Transfer strings and list

I am looking for help understanding how to transfer strings and list using RTDE. I have successfully transferred bit/boolean, float/double and integer data. Now I need to transfer strings and list.

I need to do this for one of our UR5 CB robots that is being used for machine tending. The machine the robot is tending requires the robot to offset its arm so a target can be within a 1.25mm window. I’ve accomplished this by telling the robot with a part number which is a string and material specifics which is a list/array to offset the arm correctly. So far, I have 65 part numbers program out of over 800 part numbers. The data is internal within the robot program. I am looking at making the data external, hence the transfer of data. This is to prove a concept before the next step which is pulling data from CAD and supplying it to the robot.

Thanks for any help.

As i know there is no way to transfer strings to through RTDE.
We managed to do something similar by just have the base program and just edit some values. Then we send the program to the robot in interpreter mode (this only allow to send 500 lines of UR Script but i find a workaround to send unlimited lines).

@benjamin.schmautz I just found where socket_send_string data is located. I found it in package type 20 message type 0 starting at byte 57 using the primary client interface port 30001. My next challenge is to send a string from my computer and have it received by the robot using URscript socket_read_string function.

You can send UR Script commands to the Robot via Socket Port 30001.
Just make sure you end every command with new line.

For example:
robot = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
robot.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
robot.connect((“192.168.1.11”, 30001))

robot.send(‘halt\n’.encode(“utf-8”))
raw_reply = self.get_reply()
print(raw_reply.decode(“utf-8”)