Based on contributions by How-to, Mark.jensen, Ihsan.
Before you can talk to a UR robot from Python (over a TCP/IP socket or with RTDE), your PC and the robot controller need valid IP addresses on the same network. This article shows where to find the robot’s IP address and how to make sure your PC’s IP address is in the same range.
What you need
- A UR robot and a PC/laptop, connected directly with an Ethernet cable or through the same network switch
- Access to the Polyscope teach pendant
- Administrator/network access on your PC to change its IP address
Steps
1. Understand IPv4 addressing
An IP address identifies a device on a network. It usually looks like 192.168.0.xx, where the last number (0–255) can be assigned freely as a static address. Two devices can only talk to each other over a plain Ethernet link if they are on the same subnet (the first three numbers matching, e.g. both 192.168.0.x).
2. Find the robot’s IP address
On the teach pendant, tap the UR logo in the top-left corner of the Polyscope interface. The robot’s current IP address is shown there.
Check: the sources describe how to view the robot’s IP address this way, but not the exact menu path to set/change a static IP on the robot controller itself. On most Polyscope versions this is under Settings → System → Network — staff should confirm this for the lab’s robots and add it here if needed.
3. Set your PC’s IP address in the same range
Make sure your PC’s IP address is within the robot’s IP range, e.g. if the robot is 192.168.0.10, your PC should be something like 192.168.0.xxx on the same subnet.
Confirm your PC’s current IP address from a terminal:
ipconfig
(On macOS/Linux the equivalent commands are ifconfig or ip a.)
If your PC’s IP address is not on the same subnet as the robot, change it in your OS network settings (set a static IPv4 address matching the robot’s subnet) before continuing.
Common mistakes
- PC and robot on different subnets — the most common reason a socket or RTDE connection silently fails to open.
- Mixing up which IP address belongs to which device in your code. Several example scripts in the UR how-tos label an IP as “your device’s IP” when it is actually the IP the other device should connect to — double-check which address goes where before copying a script.
Related
- How to find and set the IP address for connecting a PC to a UR robot — set up a basic TCP/IP socket connection
- How to find and set the IP address for connecting a PC to a UR robot — control the robot from Python with RTDE
Rewritten and consolidated (Sept 2026) from the original student how-to’s: Find or set the Universal Robot IP address, How to control a UR robot from python using RTDE, Create TCP/IP connection between your PC and a Universal robot.