< All Topics

Universal Robots Experior Setup

Setup VirtualBox and establish connection

  1. Install URSim and virtual box, follow this guide from Universal Robots. 
  2. In order to communicate with the robot, a connection needs to be made between the host PC and the virtual machine, and this can sometimes be a bit tricky. Connection to the virtual machine can be done in many ways. One way is to setup a network bridge to share the network from the virtual box and your current network:
    1. Create a network bridge between your current connected network and the VirtualBox ethernet connection. This can be done in adapter settings in “Windows”.
    2. Go to settings for the virtual box created in the step above. Then choose network settings, create a “network bridge” connection and use Microsoft’s default.

Configure URSim

  1. Open virtual machine
  2. Launch the URSim program
  3. Click accept safety settings
  4. Click create program
  5. In the bottom left hand corner, click the round red or green button. 
  6. On the new screen, start up the robot, so that the “robot in normal mode” tab is green, and the robot pops up on the right. Exit this tab. Now go to the move tab in the top left corner, and move the Robot around to confirm that is initialized correctly.
    1. In the right hand corner go to settings
    2. Then go to System -> Remote Control, and enable remote control
    3. Go to System -> Network and confirm that the IP of the robot is the same as the virtual machine. This should also be the same as your host machine, if the bridge is connected.


4. (optional) To ensure that you have a connection to the robot, you should be able to run the Python script in the bottom of this file (remember to change the IP address to the IP of the URsim which can be found under Settings -> System- > Network in URsim).
The script should turn on the IO pin 2 of the URsimulation. This can be confirmed in the IO tab of the URSim in the virtual host. If it does not, try turning on simulation in the IO tab of URsim.
If you get a connection error with a bridged connection it might be because the host computer is using the ports that the UR controller is using. This can be resolved by changing the host computer’s IP address to a different one, in the same span as the Virtual machine.

Setup UR in Experior

Once you have a virtual machine running with URsim, and you have extracted the UR .dll’s into your Experior installation folder, you are ready to run the Universal Robot inside Experior

When shutting down URSim in the virtual machine, you don’t automatically shut down the simulated controller, which is running in a separate process in the background. To shut this process down you need to run the following commands in the virtual machine:
Find the PID of the URController:

sudo lsof -i -P -n | grep LISTEN

Shut down the process with 

sudo kill <PID number>


# Echo client program
import socket
HOST = "" # The remote host
PORT = 30002 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
output = 'set_digital_out(2,True)' +'\n'
data = s.recv(1024)
print ("Received", repr(data))
Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Previous Startup guide for Codesys and Experior