Universal Robots Forum

MoveL Offset Relative to Waypoint

I would like to make a move relative to a waypoint. The offsets will be setup as variables. The idea is to call a moveL command referencing the waypoint then adding the offset to that waypoint.

Waypoint_1 is set and calibrated
Variable: Offset_1 = [10,50,0,0,0,0]
MoveL Relative to Waypoint_1 with Offset_1

I don’t believe there is a way of doing this in polyscope commands, you would have to use URScript.
Use the script file from you program which contains Waypoint_1, to find it’s coordinates, then write something like:

offset_waypoint = p[waypoint_1[0]+offset_1[0], waypoint_1[1]+offset[1], ...., waypoint_1[5]+offset_1[5]]

Then you can call a moveL on offset_waypoint

There are a couple of ways of finding the script file of a program.if you are using URSim, then simply open the .script file from the robot’s programs folder in a text editor.
If you’re on a real robot, then open a blank program, add a “Script Code” command, press “Edit” then “Open” and you’ll see the script files of all your programs.