Home› Programming
Discussion
Back to discussions page
rafaelrojas
Posts: 7 Apprentice
program with XMLRPC in Universa Robots (UR3). |
1.2K views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
9 comments |

in Programming
I'm implementing a XMLRPC. The server is my computer with IP

Any idea about the reason of the problem? it is not possible to implement a callback for the XMLRPC ??
192.168.1.5 and listening at port 5000
. On the side of the UR3 robot, I have implement the XMLRPC in urcript language. During the program execution I got the error "Type error: a list cannot contain this data type: Variable String" when the XMLRPC is performed. The same error can be reproduced with the following simple code:proxy = rpc_factory( "xmlrpc" , "http://192.168.1.5:5000" ) proxy.getss("/")<br>I have confirmed that the UR3 controller sends the correct XMLRPC to my server which sends the following answer
<methodResponse> <params> <param> <value><array><data> <value><int>1</int></value> <value><string>hello</string></value> <value><array><data> </data></array></value> </data></array></value> </param> </params> </methodResponse>The answers is correctly received by the robot's controller, I have confirmed it with Wireshark. Here is a screenshot of the error

Any idea about the reason of the problem? it is not possible to implement a callback for the XMLRPC ??
Best Answer
-
matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,261 Handy
Unfortunately, not if you are returning a list, it cannot contain anything other than numbers or poses. We have a feature request in to UR to support strings and Boolean in lists but it has not been released at this time.
Are you using a commercial xmlrpc server? We have our own that we use and just make sure that we aren't returning any types that are not accepted.
Another thing to understand, variables are statically typed in URscript so once a variable is declared you cannot change the type of data being stored in a variable dynamically. For instance, if you declare variable "x" as 1 you cannot later change the value to "blue" without throwing a type error.
i would like to know how to create and run a xmlrpc server on universal robot