Problem running example_control_loop.py on UR3

Hello!

The school I work in recently acquired two UR3 robots. I tried connecting to them using Python on Windows 11 but I’ve come across a problem.

First, I allowed local (and later remote) ports 30001, 30011, 30002, 30012, 30003, 30004, 30013, 80, 502, 2222, 29999, 34964, 40000, 40002, 44818, 49152 through Windows Firewall (both in inbound and outbound rules). I found a list of all ports before port 80 in the documentation, then I found another larger list (document: Overview of the client interfaces - I would link but it’s on another laptop) so I added the remaining ports, just in case.

The record.py script works without an issue, and the example plotting script produces output that makes sense, so I assume I’ve managed to get these up and running without an issue.

However, when trying to run example_control_loop.py the code does… nothing. It doesn’t give any prints until I forcibly stop it with CTRL+C. Then, according to the output, the code hangs on the following line:

File “C:\Users\Robot-1\Desktop\UR - Real Time Data Exchange\examples..\rtde\rtde.py”, line 340, in __recv_to_buffer
readable, _, xlist = select.select([self.__sock], , [self.__sock], timeout)

When Ethernet/IP Adapter is set to running, I get an error ValueError: Input parameter is already in use. I solved this by turning Ethernet off in robot setup (which doesn’t prevent record.py from working), but then I have the problem of the script not actually doing anything instead of raising an exception.

I haven’t made almost any modifications. I was testing something, so I added a line at rtde.py to print the port it’s using, other than that, I modified ROBOT_HOST variable from “localhost” to “192.168.1.15” which is the address of the robot I set in the options (and which works for record.py).

I even tried completely disabling Windows Defender firewall, but still no luck…

Can I please get some advice on how to proceed with this issue?

Thanks and kind regards!

Marko

Could be that RTDE only run on Windows 10 Pro x64 (No info on Win 11)

/Henning

1 Like

I will try it tomorrow on a Windows 10 laptop again and report back. I also have Zorin OS installed with Python 3.8 so if that doesn’t work I can test it there too, but I’m a linux newbie so I don’t know if I’ll be able to allow comms through listed ports, but I will do my best!

Thanks

Hello!

It seems I didn’t have much luck compared to Windows 11.
My new attempt was done on Windows 10 Pro, so I assume I’m the one doing something wrong.

I tried taking a few pics of related options and the code I’m using.
When the logging is turned on, the code hangs after the “RTDE synchronization started” line.

All robot and internet settings can be found here: Imgur: The magic of the Internet
I tried turning the firewall off completely again, but no luck. Playing around with ports, I do receive responses from the robot but since it’s the incorrect port, nothing happens. I only get errors of faulty packets in the script (or something similar to it).

I took a pic of the control unit just in case some connection is preventing me from sending commands to the robot.
I tested it on both robots. The behavior is identical on both, data can be read using record.py, but I can’t use control loop example.
I hope enough info is provided.

I also tried setting DNS server to 8.8.8.8 in the robot settings just so it matches Windows settings given that Windows didn’t allow 0.0.0.0, but no luck.

The robot is running URSoftware 3.15.8.106339 and the script says Controller version: 3.15.8.0. Perhaps version mismatch could be the issue?

Thanks for your time!

Marko

Hi Marko

I went through a lot of similar problem before I got RTDE up and running.

A have made a “How to RTDE” document on how to set up hardware and connection.

You will find it here:

SimpleStudent have some very nice videos on how to set up the program:

/Henning

1 Like

Thanks for the reply, forbech!

I don’t have access to the robots during the weekend but I’ll try it first thing monday. Thank you!