Home › Programming
Discussion
Back to discussions page
VT_340
Posts: 24 Apprentice
Change TCP configuration via URScript - Possible? |
781 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
10 comments |

in Programming
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
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
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.
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.
Is it really that easy that the first three arguments are the offset? Or is this somehow different?
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.
http://www.facebook.com/UweStahl/videos/1345601428822131/
Thanks for your help.
Thanks!
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.
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.