Universal Robots Forum

Close all TCPIP Sockets

Hello everyone,
Is there a way to close all TCPIP sockets from the robot side when it is serving as the server for ASCII text messages? I am opening a socket using an Allen Bradley PLC on the robot side to send ASCII text strings to for an error recovery sequence. I leave the socket open for all the strings and then close it at the end of the sequence.

I am having a strange error occur where it appears that the robot continues to execute the commands that were sent which would suggest that those commands are buffered. This is also happening after the PLC has closed the socket connection which would suggest that the commands are buffered on the ROBOT side. Also, the commands are being executed in a greater number (i.e. we send 1 PLAY command, and the robot executes 15 of them) than were actually sent to the robot which sometimes causes a NO CONTROLLER fault.

I believe that closing the socket from both side (the PLC and the robot) would properly clear the buffer and stop the excessive PLAY executions.

If anyone has any ideas on how to close all sockets (since obviously the socket I am using is opened on the PLC and therefore does not have a name on the robot side) from the robot, I would greatly appreciate your advice.