How to Offset positions with tool features

Hi There.

I have created a program with my UR10e that picks metal clips, there are 18 pick positions.

Then these get placed into another product by the UR10e, there are about 40 place positions depending on what product variant.

I have 3 of these metal clips, 3 different lengths. I have now taught 1 of the variants, I am wondering if it is possible to change the feature by the the length difference, and wondering if this will offset the positions correctly?

I have used the robot tool as the feature for the positions, if this can be done is there a way to do this on the fly when the program is running? Otherwise it will need to be a different installation file for each variant? As the tool and features are set up under installation.

Hope I have explained that okay, thanks

Scott

Hey Scott,

I can’t say this is the perfect solution, but how I have handled something similar is using variable waypoints. You can use URScript, subprograms, or just assignment nodes to do calculations based on inputs. Then, using that, you can calculate a waypoint based on a few things.

If you already have a feature that defines the place plane, this is much easier, as you can use that as a basis and then program in the variable based on said origin. Feel free to elaborate, but lets say you have a grid of place positions. Based on inputs, you want to pick one of the positions or calculate its position. Depending on complexity, it might be easiest to do this in URScript, but basically you simply end with a variable with a pose vector which looks like “p[x,y,z,rx,ry,rz]”

This is the easiest way I know to have variable locations without using something like palletizing or a massive set of if statements and waypoints. That being said, this way comes with big downsides too. Namely, variable waypoints can’t be moved to outside the program (as far as I know).

Again, feel free to elaborate or show pictures or illustrations and I can go into more detail.

1 Like

You can change the values of features in your program. It doesn’t update the installation features values but it changes in the program running. Each time you start and stop the program it will reset to the installation initial value.

It works fairly well, but if you ever want to teach points you will be working in the installation features values. So you can only teach for the first location.

I have a separate script file included in my program and from there I use the below commands (2 examples) of ways to offset features or set the xy coords directly.

CurBladeStack = pose_add(BladeBlanks,p[Xcoord/1000.0,Ycoord/1000,0,0,0,0])


    Cur_A_Tray[0] = -1.0095
    Cur_A_Tray[1] = -0.6795
1 Like

Thanks both.

Mattd that is exactly what I need, if I could offset my feature by 20mm then all the programming would be common.

I’ve taught these points with the feature as the tool, rightly or wrongly. So how do I in script change the feature, it would need to change in Y only.

Your Feature is just a Pose so you can just change it’s values directly in the program. The script you’re asking for is pretty much exactly what @mattd provided:

yourFeature = pose_add(yourFeature_const, p[0, yourYOffset, 0, 0, 0, 0])

Just note that when writing the script, you ASSIGN the version of yourFeature from the “Variables” dropdown, and the “yourFeature_const” comes from the POSE dropdown. The other note here is to be aware that this shift is taking place with respect to BASE. If you need to shift with respect to some other arbitrary coordinate system, you would need to modify the equation.

1 Like

Thanks Eric,

I think I understand now. So if my feature is called: RH_Clip

The script would be:

RH_Clip = pose_add(RH_Clip_const, p[0, Yoffset, 0, 0, 0, 0])

Yoffset would be a variable being driven from the PLC depending on the clip the robot needs to pick and place.

I will try this next week.

Yes. As always, the robot sees everything in METERS so just make sure your Yoffset variable is in the correct units or else convert it.

Hi Eric,

Tried this today but I do not have any variables which relate to the tool feature, all I have in POSE is tool and base. I have a feeling I have set something up incorrectly at the start.

Right, you won’t see any variables for Tool or Base. That’s because you can’t change these programmatically. In the case of Base, this is 100% fixed. The Tool on the other hand is always changing, since the Tool’s location is changing.

If you’ve taught everything against the Tool as the Feature, I think your only real option for shifting everything would be to programmatically change the TCP. Which you can do with the “set_tcp(pose)” function. This can get messy because UR doesn’t provide good methods for manually changing your TCP for things like jogging.

If it MUST be taught to the Tool for other functionality, then I guess that’s what I would do. However, consider re-teaching everything against a normal Plane Feature that you can define in the Installation. This can give you a lot more flexibility.