0
$\begingroup$

First of all sorry if this forum is not the most adequate space for this type of question.

I am having a hard time establishing an Ethernet/IP connection between my UR3 and my computer, I am just using an Ethernet cable to directly connect the PC and the UR3.

My objective is to use this connection to send commands through to the UR3 and also to read data from the robot. I am planning to do this on python. I have tried to follow severel guides but to no avail, I am pretty sure that the mistakes I am making are when defining the adresses in the UR3.

I never managed to establish a connection between the PC and the UR3.

I always tried to establish the connection with my Wi-Fi off as it was told in many articles. I don't know if it helps but when I connect the Ethernet cable a not identified network would appear in my computer with the IP 192.168.73.50 (is that supossed to be my DNS server?)

The last setup I tried is the suggested in this guide, I know it is a guide meant for the UR3e but I am up to trying anything at this point really.

Setup window in UR3 console

The code I am using to test the connection is as follows:

import socket
import time

HOST = "192.168.1.100"
PORT = 30002

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.connect((HOST, PORT))

s.send(("set_digital_out(1,True)" + "\n").encode('utf8'))

time.sleep(2)

s.send(("movej([0, 0, 0, 0, 0, 0, a=1, v=1])" + "\n").encode('utf8'))

s.close()

I really am not well versed in networks so I don't really know what adresses I need to change to work with my project or if I need to do something on my PC. I did verify that the IP of the UR3 is set to the one that's in the image, but I don't know if I am supposed to use the same subnet mask/gateway/DNS server. Thank you for reading

$\endgroup$
4
  • $\begingroup$ Welcome to Robotics, Felipe. Your investigations should probably start with the authors of the tutorial you cited, if not with the manufacturer. It sure looks like your networking problem is not specific to robotics. You should probably ask for help somewhere else. For starters: typically, when using Ethernet cables, two networked devices are each connected to a switch, not to each other—contrary to the cited tutorial. Also, Python socket operations won't get anywhere until the tutorial's green checkmark indicates "Network is connected". $\endgroup$
    – r-bryan
    Dec 21, 2021 at 19:19
  • $\begingroup$ Hi, thank you for your input, I think I've got some new things to try tommorrow but if you wouldn't mind answering, is it impossible to connect them directly? Or simply just not the appropriate way? $\endgroup$ Dec 21, 2021 at 20:51
  • $\begingroup$ make sure that both devices are on the same subnet $\endgroup$
    – jsotola
    Dec 21, 2021 at 21:27
  • $\begingroup$ Conventional wisdom says "don't direct connect" although it's technically possible. If you go the latter route, you will become more well versed in networks, whether you want to put your time there or not. $\endgroup$
    – r-bryan
    Dec 21, 2021 at 22:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.