Universal Robots Forum

Ethernet connection and Comandtransfer above Socketserver

Hey Guys.

My Question is: How can I make a stable Ethernetconection for an E-series Cobot, that will work in an lokal Network with only 2 to 5 Divices (PC, Controler…) . My Problem is that i can not change my IP Adress at my Workinglaptop.

And then I do not understand how to Programm an Socketserver, which can save some Inputs for a short time. It is beacause the Divice that will be connectet is not only on this one spot, so it will disconnect offten and only reconnect to the socketserver to send and get some informations, and after that, he will disconnect again.

For an Example: did anyone have experiences with the work of an Cobot with an Funktiontester that test elektronikstuff?

Thanks for your attantion.

I am quite new but I’d give it a try.
In order to make an Ethernet connection stable with devices going on/ff, you need to check at both ends that the connection has not been lost and if so, close the socket and re-start it again.
So, I think that the most logical thing to do is that your device cannot get out of the network while it is exchanging data with the robot.
Then, close the sockets on both sides and fully re-open them when the device is back in the network, so you basically have to play with the socket.open() and socket.close() on both sides.

For example, let’s say that your robot runs a program, and that you want the device to exchange data through TCP. Then, the device sends a “END_TCP” string when it is about to disconnect, so the UR can close the socket. And then everything is on a while loop, so the UR aims to re-open the connection again until the device is back:

global DEVICE_IP=""
global DEVICE_PORT=30009
while True:
	// start communication
	# repeat until communication successfull
	while not open:
	# exchange data
	exchanging_data = True
	while exchanging_data:
		if fromDevice=="END_TCP":
			exchanging_data = False
			toDevice="some data here"
        # finish when device sends "END_TCP" to robot

Apart from that, the problem statement is not very clear: I assumed you meant an Ethernet connection that would use TCP with the UR, but did you actually mean that or that the device uses another approach? Like Dash Server, PROFINET or MODBUS?