[Solved] Connection UR10 to PLC not working

We’re trying to connect the UR10 with the PLC with the UR command “socket_open(ip, port, socket_name)”. This is the same way we’ve successfully established a UR - Cognex connection and a UR - Raspberry Pi connection before. The UR10 is the client and the other device is the server.

But when trying this with the PLC, we get the UR error message: “Not able to open socket PLC to host: 192.168.0.3 at port: 4999 : Connection timed out”

We’ve tried several different ports, restarting the UR and the PLC, checked all physical connections (cables), but we keep running into this error.

This is the UR script:
DTC_connect_to_PLC.script (327 Bytes)

This is the TRCV_C block we’re using in the PLC:

Does anyone have suggestions how to solve this error?

The connection parameters seems to be OK, but check the following things:

  1. Did you have a look at the getting started manual and the explained configuration steps in there?
  2. Is the Connection ID unique in the project?
  3. Is the “CONNECTION TO UR” DB created via the shown parameter menu on the screenshot or did you create it yourself manually? Can you upload a screenshot of the DB here?
  4. After changes of the parameters you need to stop and start the PLC. Did you do that?
  5. Sometimes stopping and starting is not enough. You can try to do a factory reset of the PLC to see if that solves the problem. Go online in the PLC, open the entry of your PLC in the project tree and go to online & diagnostics -> functions -> reset to factory settings.
  6. What is the status code of the TRCV_C block? It’s important that you get the stored status value as explained in the getting started manual:
    Store_error_status

The UR script seems to be OK and I don’t expect any problems with that.

We solved this issue by using only a connection block instead of a TRCV_C block.