Val 3 appro() function

  • Hi everyone.


    I have some trouble understanding the appro() function.


    point = appro(point,{0,0,0,0,0,0}) should give point back, so stay the same right? It does not so of rx,ry and rz. Somehow it turns them some 180° for some reason. Can somebody help me with that?

  • Lemster68

    Approved the thread.
  • Hello WolfgangE,


    It is still making calculations and rewrite the position in the shortest orientation change from 0,0,0. If you don't want to change your variable, you should consider not using the appro function. This won't generate any calculations on your point.

    The difference between theory and practice is greater in practice than in theory.

  • Thanks for your reply. I'm afraid I do not understand.

    What I really want is changing the TCP in length as well as in orientation. It does work with the length (translation) but not with the orientation (rotation). Thats why I used obove's example. If I want to change the TCP with {0,0,0,0,0,0} so stay it the way it is, it should stay the way it is but it doesn't. It does again properly with translation but not so with rotation.

  • Yes but how? The tool variable is in the coordinate system of the flange. Now I want to programmaticly change the TCP which is easy in the current TCP coordinatesystem but ultimately i have to give it in the flange coordinatesystem. So my idea was to make the new TCP as point in the current TCP coordinatesystem and transform it into the flange coordinatesystem and overwrite the tool variable with it.

  • You can modify your tool variable directly in your program. Reference the TRSF for the gripper and adjust as needed. You could enter the values directly or apply an offset, etc.

    Direct Entry: tlGripper.trsf={0, 0, 150, 0, 0, 0}

    Offset current Tool: tlGripper.trsf={0, 0, 150, 0, 0, 0}*{0,0,nOffset,0,0,0}

  • Thank you for your reply. I tried it out and I think, my not understanding is much more deep, sorry. If I try following tlGripper.trsf={187, 108, 344, -90, -120, -90}*{0, 0, 0, 0, 0, 0,} then the result is {187, 108, 344, 90, -60, 90} Why is here the rotation totally different? Or maybe it is not and I don't see it.

  • As I already wrote, it is still making calculations and rewrite the position in the shortest orientation change from 0,0,0. -90, -120, -90 is further away from 0 than 90, -60, 90. It's like saying 3/9 and 1/3. It's the same!

    You can ask A&W Restaurants about it.

    The difference between theory and practice is greater in practice than in theory.

  • Hello guys.

    An other solution is to create second tool inside the first one. In this case the coordinates are defined in the first tool system.

    I make that when I've a wear on the tool.

    If you want to calculate the second tool in the flange, use the Position(...) function !

    have a nice day...

Advertising from our partners