Universal Robots Forum

Creating a variable in installation node and calling it in programnode urscript

Hello,

I’m writing an URCap which basically should have architecture which is explained below :

Installation Node-

  1. We are creating a variable which will return (get_actual_tcp_pose). we have to create 3 different variables and store 3 different poses.

Program Node -

  1. The variables which are created in installation node will be called in programnode (generateScript(ScriptWriter writer) … We have to initialise these variables in URscript in program node.

So my problem is,

  1. How can we create a variables in installation node which will store the actual tcp pose?
  2. We have tried to use getInstallation() which will pass variables from installation node to program node. But we are not able to crack it. Is there any way to pass variables from installation node to program node.
  3. How can we pass the variable in program node (generateScript(ScriptWriter writer) to initialize URScript.
    Best Regards,
    Rohan
1 Like

Is it required to be Variable-type objects?
Or could a possible approach be to use the “RobotPositionCallback” to get the user defined robot position, and then save these Poses directly in the installation DataModel and passing these to the ProgramNodes using “getInstallation()”.

Thanks for your quick response Jacob.
As per your suggestion we are on correct track.
Can you please share me a sample example or document related to RobotPositionCallback .

Check out the EllipseSwing sample on Github:

Thanks Jacob for your kind support.
We have used same approach and it is working fine.