Universal Robots Forum

[socket sever-client] issue of few string send over socket


I expect server side would receive 4 text message seperately while robot move from a waypoint to another waypoint. However,my server receive one-off text message after program end.

It is meaningless to receive all message after program end. In my project,I have to keep state of robot while robot move.
How to receive messages separately while robot move?



Try inserting socket_send_byte(13) after the send string command.
Byte 13 is the CR char in the Ascii table.
You could also try to use sending NL (byte 10).

We use socket_send_string all day long and never have an issue where the robot sends all at once. Without a return character though the string received just keeps being added to the previous string, unless the server handles it in their socket protocol. We do not use a return with our code as our server knows how to handle the different bits being sent and breaks them for us.

Hi mbush,
After further check,this issue because of software SocketTest v3.0.0
display those string at once after connection close. I change to others
socket server tool,it display string separately as expected. SocketTest is
tool on UR training course.

Lou Willie
Software Engineer
Kurve Automation Pte Ltd

SocketTest is a very simple and freeware tool, that is useful for simple testing or debugging.
Hence why we use this during trainings.
For actual application, another tool or custom code should be used.