RobotStudio event

Creating temporary tool relative to a existing tool.

Options
Hello
I have a tool:
PERS tooldata tGripper:=[TRUE,[[0,-241.92,195.917],[0.991444861,0.130526192,0,0]],[20.9, [-5.1, -4.7, 53.5],[1, 0, 0, 0], 0.064, 0, 0.769]];
The tool is angled 15 degrees on the x-axis.
The gripper holds a product of variable length.
I want to create an new TCP (ex. tGripperWithProduct) at the end of the product.
If the tool had no angle it would be easy to just adjust tGripper.tframe.z.
And in my case here, with only one angle to consider, I have used basic trigonomety to solve this.
I have written a function that returns the displaced tool. With "startingtool" and productlength as arguments. It works for this scenario.

But what if the tool is angled on more than one axis?
Is there an existing function to solve this in rapid?

Comments

  • PerSvensson
    Options
    use RelTool to move relative to used tool no need for recalculating the tcp. Take a look in the documentation regarding RelTool
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • Slokko
    Options
    Oh. Ok.
    So the reltool position is calculated after the reorient. Not the other way around?
    If i write 
    MoveL RelTool (p1, 0, 0, -100 \Rz:= 25), v100, fine, tool1;
    tool calculation is rotated 25 degrees and then moved 100mm backwards its z-axis
    NOT calculated 100 mm backwards and THEN rotated 25 degrees?

  • John_Verheij
    Options
    First the translation is performed and then the rotation. The rotation is in Z-Y-X order.

    You can also see this with a small example. For example you have this robtarget:

      PERS robtarget p123 := [[0,0,0],[1,0,0,0],[0,0,0,0],[9e9,9e9,9e9,9e9,9e9,9e9]];

    Then perform a translation of 100 m in the Y- direction and a 90 degrees rotation around the Z-axis. If the rotation is performed first, then the translation will be in the X-direction (instead of the Y-direction).

      p234 := RelTool(p123,0,100,0\Rz:=90);

    The output robtarget shows that first the translation and then the rotation is applied.

      PERS robtarget p234 := [[0,100,0],[0.707107,0,0,0.707107],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

  • Slokko
    Options
    Ok. So. The workaround would be...
    RelTool(RelTool(p123,0,0,0\Rz:=5),0,0,-100)
    Then the reorient would be calculated first, right?

    Not very pretty but should work.

  • John_Verheij
    Options
    Yes, that is correct. You can also define your own function in which you apply the correct order of rotations and translations.