Universal Robots Forum

URScript rpc_factory doesn't work

A computer (IP 172.16.16.100) is connected to the UR5 (IP 172.16.17.200, sofware 3.14). The UR5 have an OnRobot RG2 gripper with URCaps 5.6.0. All is up to date.
The PC send script via TCP/IP connection to URControl on port 30001.
All works fine, but the URScript on_xmlrpc = rpc_factory(“xmlrpc”, “http://localhost:41414”) doesn’t work.
I tried to replace localhost by 172.16.17.200 without any succes.
This URScript command is a copy of a program made with polyScope and it works well when the script is ran with PolyScope.

Is there an issue with the last version of URControl ?

Where does the RPC factory reside, the PC or the robot? Is this the OnRobot RPC factory?

Hello,
This is the OnRobot RPC factory. So normally this RPC is in the Robot

Hi,

are you just sending the following script command: on_xmlrpc = rpc_factory(“xmlrpc”, “http://localhost:41414”)
Or is it embedded within a bigger Script Function?

If it is just this one line, it will be executed and the program stops immediately afterwards. By integrating it in a Script Function with additional commands you can check, if it works.

sko

Hi,

This script command is embedded within a bigger Script function.
If I send the complete program with this line commented, I can see in UR log “Program xxx started” other instruction and “Program xxx stopped”.
But if I uncomment the line, nothing happen in the UR log.

That’s why I think that the URControl doesn’t understand this script function

Hi,

first make sure the URCap is installed on the robot and the port is correct.
I tried it myself with a sample Daemon on my local robot. It seems that the choosen * " * in your command were the issue.

on_xmlrpc = rpc_factory("xmlrpc", "http://localhost:41414") should work for you.

sko

The URCaps is well installed and the port is correct.
I did a program with polyscope to open and close the gripper, the program work.
I take this program script, modify the beginning and the end to be in the standard for the URControl. But it doesn’t work due to this line.

I tried with your line (copy/paste) but it’s the same result.

Where can I find a sample Daemon to try it on my robot ?

For my test I used the getControllerTime - Sample. Alternatively, the MyDaemonSwing - Sample should work the same.