Universal Robots Forum

How to insert socket function in the robot program tree

Hi, i was trying to insert a socket function in URScript using the programNodeFactory API, but on going through the documentation i found that the programNodeFactory api does not have socket functions. My motive is to insert socket commands programmatically into the urscript on the click of a button.
I am just a beginner at urcap programming so any help would be appreciated.

Look into the installation api and the function model. You could create functions that can be used in your program tree, functions are written in URScript through the generateScript function of the installation contribution.

You could make your own simple program node, that expose socket functionality, and then insert this as a URCap node.
We have not exposed the “Script”-command in the API as built-in, as it is better practice to wrap the desired functionality in a simple program node, and insert this where required.

1 Like