Handling data sent over TCP/IP

Hi,
I’m going to communicate with a medical device with TCP/IP using a UR3e, and will recieve the response in:

"XML fragments sent using the ASCII character set. A command consists
of a “command” element followed by a name attribute and one or more parameter attributes:

Example:
<response command=“AssumeControl” code=“0” message=“Success” />

I assume I should use socket_read_ascii_float(); to recieve the data. I then want to read the “0” to find out if the command was successful. How do I handle the data read in the UR program?

/Tor

You’ll probably have to use socket_read_string

read ascii float requires data to be formatted a specific way:

You’ll probably have to use the URScript string parsing functions to seperate out your value. Some combinations of these should do it: