Home Programming

Discussion

Left ArrowBack to discussions page
VT_340VT_340 Posts: 24 Apprentice
Hi!

I am wondering about that it is not easily possible to change the TCP-Offset via URScript?! 
Is there any trick how to manage that? Basically I want to have the same trajectory with different tool-geometries. In the Dashboard you can set this easily in the configuration tab, so I thought this is possible via URScript as well? If not my whole project will fail, as I always thought this is easily manageable.

Thanks in advance.

A.B

Comments

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    @VT_340 you can use this script function, set_tcp(pose),  to change the tcp by passing in a pose representing the offset in x, y z and the rotation of the tcp around x, y and z

    Here is an example of the script code from one of our production programs that has 3 TCP's, this is the script that was generated from the .urp polyscope file but it shows you how its used.

    . set_tcp(p[-0.11324,0.0,0.11216,0.0,-0.757,0.0])
      set_payload(2.0, [0.0, 0.0, 0.1])
      set_gravity([0.0, 0.0, 9.82])

    The set_payload has 2 arguments, the mass in kg, in this case 2, and the CoG in meters from the tool flange

     The set_gravity is telling the system the magnitude of gravity in each of the axes, in this case the robot is mounted normally (base parallel with the ground) so all of the gravity is acting in a single axis, Z.

  • VT_340VT_340 Posts: 24 Apprentice
    Hey it's matthew again who gives me advice. great! Thank you!


    Is it really that easy that the first three arguments are the offset? Or is this somehow different?



  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy

    It is just that easy, there is the TCP configuration from the installation tab on the robot screen, you can see that these settings match the information in the set_tcp() method. Just remember the X,Y,Z in the pose are in meters, and the rotations are in radians.

  • VT_340VT_340 Posts: 24 Apprentice
    edited July 2017
    It works now. Sponge suspension is not working, thats the reason why the line is not comletly gone.

    http://www.facebook.com/UweStahl/videos/1345601428822131/

    Thanks for your help.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    Great work, that's really cool. 
  • VT_340VT_340 Posts: 24 Apprentice
    Well now I ran into another problem: When the TCP is set to a new value, the robot goes there immediately and a way too fast which leads to a jerk violation stop. Any idea how to do that?

    Thanks!
  • T800_412T800_412 Posts: 51 Apprentice
    edited August 2018
    Here is an example of the script code from one of our production programs that has 3 TCP's, this is the script that was generated from the .urp polyscope file but it shows you how its used.

    . set_tcp(p[-0.11324,0.0,0.11216,0.0,-0.757,0.0])
      set_payload(2.0, [0.0, 0.0, 0.1])
      set_gravity([0.0, 0.0, 9.82])
    Which TCP is set to this value? I am trying to do something similar here, but getting a TCP disagreement error which then the unit wants me to reinitialize.

    Scenario is to use TCP1 p[0,0,240,0,0,0] and then move the TCP to a feature point. Using the Find Surface function (formerly rq_linear_search) move down in Z until contact is made. Then, switch to TCP p[0,0,0,0,0,0] (tool flange setting), then get actual TCP pose. The Z height then gives the actual TCP offset desired (The bottom of the thing in the gripper). Lastly, use the set command to switch to TCP2, then do the set_tcp(p[0,0,Z_offset,0,0,0])

    The idea here, is to then use TCP2 for subsequent move commands, knowing that the actual bottom of the gripped object is being moved where needed, regardless of variations in thickness of objects.



  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    @T800_412 when you use the script command you’re not changing any of the taught TCP’s, rather you are just setting the TCP to what you want it to be.  We have a program right now with 5 TCP’s but none of them are taught in the installation tab. When we want one we just issue the script command and move on with life. 

    I did see an error, at least in the message above, you have TCP1 set to p[0,0,240,0,0,0], remember all pose number for x,y,z are in meters so you are trying to set the TCP to 240 meters in z, not 240 mm in Z. Also the rotations are in radians, not degrees. 

    So once you find your object there is no need to use the set command to switch to TCP_2, just use the script command and set it to what you want it to be. 
  • T800_412T800_412 Posts: 51 Apprentice
    Thank you @matthewd92
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    You’re welcome 
  • mpatelmpatel Posts: 4 Apprentice
    @VT_340 you can use this script function, set_tcp(pose),  to change the tcp by passing in a pose representing the offset in x, y z and the rotation of the tcp around x, y and z

    Here is an example of the script code from one of our production programs that has 3 TCP's, this is the script that was generated from the .urp polyscope file but it shows you how its used.

    . set_tcp(p[-0.11324,0.0,0.11216,0.0,-0.757,0.0])
      set_payload(2.0, [0.0, 0.0, 0.1])
      set_gravity([0.0, 0.0, 9.82])

    The set_payload has 2 arguments, the mass in kg, in this case 2, and the CoG in meters from the tool flange

     The set_gravity is telling the system the magnitude of gravity in each of the axes, in this case the robot is mounted normally (base parallel with the ground) so all of the gravity is acting in a single axis, Z.

    Hi Matthew,

    I am dealing with a similar problem. I chnage the TCP in z-axiz for 175 mm and now the program works find with the MoveJ, however the pick and place point for the parts now shifted 175 mm in the z axis. How can i solve this problem?

    Thanks in advance.

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    You taught the points relative to the tool flange, so now that the TCP is correct the robot is moving the point from the tool flange to the end of the TCP. 

    In your moves you can always choose tool flange as the relative TCP to use instead of the actual TCP. Otherwise you will need to correct the points in the program. There’s not a quick and easy way to do that without writing code that is applied to every program and you would then need to use script moves instead of Polyscope move and waypoint nodes. 
  • mpatelmpatel Posts: 4 Apprentice
    Thank you @matthewd92

    We had on going issues with our robot with C4AXx communication errors in the joint and then robot stop initialize one day. We sent the robot to UR for the evaluation and they found the C153Ax repatating errors in the log history. UR point out that could be the one of the reason that lead this situation.

    In our application, Robot is pick a part, perform the teflon tape wrapping operation done by the machine ( at this point robot push against the rod to activate the machine, I am using simple moveL command here.- this is the point when i get the C153Ax errors). After this robot change the part orientation on the fixture and place the part in the bin. 

    As per UR recommendation and other articles, the robot settings - TCP, the payload must be accurate to avoid any damage to the joints/ Robot. 
    The main reason for the change TCP setting is to avoid C153Ax error, path deviation. during the operation. What is tell us when we use the tool flange in the program waypoints and use new TCP settings as a default. If i change the TCP settings and use the same program waypoint referencing the tool flange during  the program, would that avoid damaging the joints?

    Thank you in advance. 
      
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    That I’m not certain of but you would still be setting the COG correctly and my thought would be that’s more important than the TCP per se. If you set the TCP and still didn’t have the COG correct you would still see protective stops. 

    How are you calculating the COG?  We generally our CAD system to get as accurate as we can on setting the COG. Depending on the load we are handling we will even change it on the fly to compensate for part or no part. 
  • mpatelmpatel Posts: 4 Apprentice
    Hi @matthewd92

    I am using the Robotiq 2F-85 gripper. The part adds only 50 grams in total weight. so the change in the COG is very small. That allows me to use the same COG during the program. How can we select the reference point/ relative to "tool flange / TCP / feature", when teaching the new waypoints in the program? 

    Thank you for your help.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,170 Handy
    It’s under the move node in your program. I’m not near a robot currently but you will see TCP above feature when you click on the move node. 
Sign In or Register to comment.
Left ArrowBack to discussions page