Connecting Raspberry Pi to the UR3e

Hi! I am relatively new to UR3 robots and was wondering how to connect the robot and the Raspberry Pi. I was able to connect the Arduino and the robot using the analog inputs but I want to connect the Raspberry Pi and the robot using digital pins. I want to send the signal from the Pi to the robot. I tried connecting the Raspberry Pi using GPIO and the robot’s digital IO. The Raspberry Pi’s output is not enough to have HIGH input for the robot. Is there any way to connect the Pi to robot’s Digital IO ?

Is it really necessary to connect it to the standard I/O? Raspberry PIs usually come with an Ethernet port.

I would rather use an Enthernet cable and a program using TCP or XML-RPC. These linked examples come with URScript, Python and C++ code.

Thank you so much for your response and suggestions. I see that from those web pages, I can move the robot with Raspberry Pi. I am trying to send any kind of signal from the robot to tell Raspberry pi to start the procedure and a signal from Raspberry Pi to the robot to tell the robot to move in a certain way. At first I was thinking of sending a voltage to Raspberry Pi GPIO and programming Raspberry Pi so that it starts the process as soon as it receives that voltage and when the procedure ends, raspberry pi would send a voltage to the robot that signals it to move in a certain place. Can I do something similar with the ethernet cable?

Hello, I am also connecting the Raspberry Pi to the UR3e Robot through Ethernet connection. Is there any documentation that I can follow to see how to connect it?

@mnsipatel13
Regarding connecting the Raspberry Pi to the robot using GPIO the voltage wouldn’t be high enough to register but you could use a relay between the Pi and the 24V/Input Signal to get the functionality. Essentially think of using a push button connected to the 24V and one of the Digital Inputs when closed the 24V connects and the Digital Input goes HIGH. In this case you would replace the puch button with a relay that you would activate from the Raspberry Pi to establish the connection. Below is screenshot from our Manual regarding Digital Inputs from a button:

@kadan2
Unfortunately there’s no documentation from UR’s side on connecting a Raspeberry Pi to the robot via Ethernet. Only recently did people start to do so. There might be articles/videos on the internet showing this but I’m not aware of any directly.
That said you can find an overivew of our Client Interfaces (via Ethernet) here: Overview of client interfaces - 21744

From here you can determine how you want to communicate with the robot from the Raspberry Pi. You can do Socket Communication over one of the Primary/Secondary Interfaces, if you download a Modbus libarary (for Python, C, or C++) you could use Modbus, or one of the other interfaces again depending on your need and how you plan on coordinating the communication.

Hope this helps give you guys some directions!

And also for @kadan2 , I don’t work with Raspberry Pi, but I do use another computer to connect to the robot, and it runs Python scripts, so I assume it would be the same code? Here there are some options you can try:

1. Send the URScript program to the robot

There is a special TCP/IP interface on the robot that takes URScript messages when the robot is set on remote control. Here is the UR documentation, here is some basic tutorial, and here is how to send a full URScript program.

2. Have a program running on the robot, request point

Have the robot running a program on its own and use the XML-RPC on the robot side to request the point whenever it needs to move. The example on my previous answer is literally just that.