Right, so when I rotate the custom made tool around the 6 joint axis on IRB140, the tools wobbles slightly, +/- 2mm. Im asuuming it wasnt calibrated properly, so i attemped to calibrate the tool myself. My knowledge of rapid leaves much to be desired, so bear with me. I assume im supposed to use MToolTCPCalib instruction. I downloaded the rapid reference manual, thats where the information comes from. It says:
! Created with actual TCP pointing at the world fixed tip
CONST jointtarget p1 := […];
CONST jointtarget p2 := […];
CONST jointtarget p3 := […];
CONST jointtarget p4 := […];
PERS tooldata tool1:= [TRUE, [[0, 0, 0], [1, 0, 0 ,0]], [0.001, [0, 0, 0.001], [1, 0, 0, 0], 0, 0, 0]];
VAR num max_err;
VAR num mean_err;
…
! Instructions for createing or ModPos of p1 - p4
MoveAbsJ p1, v10, fine, tool0;
MoveAbsJ p2, v10, fine, tool0;
MoveAbsJ p3, v10, fine, tool0;
MoveAbsJ p4, v10, fine, tool0;
…
MToolTCPCalib p1, p2, p3, p4, tool1, max_err, mean_err;
I am assuming i was supposed to do the TCP tool definition, so thats just what I did
MODULE TCP_tool1
! Points are read in order of declaration.
! Please do not change the order of points!
LOCAL PERS robtarget pTCP_Point1:=[[718.6306,-23.57929,406.5191],[0.0362259447574615,0.108118996024132,0.990880310535431,-0.0717929005622864],[-1,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point2:=[[721.2054,79.89567,378.8111],[0.0618657991290092,0.181467846035957,0.964149653911591,-0.183459743857384],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point3:=[[713.3063,-76.05508,410.2771],[0.0371105186641216,0.247863233089447,0.968054473400116,-0.00755795557051897],[-1,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point4:=[[721.0968,157.8051,338.5417],[0.0214728564023972,-0.0150154381990433,0.957947432994843,-0.285744905471802],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point5:=[[721.0959,157.808,338.5412],[0.0214735139161348,-0.0150179238989949,0.957946717739105,-0.285747170448303],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point6:=[[701.7413,146.4487,343.5256],[0.216235786676407,0.654233872890472,0.705377757549286,-0.166320011019707],[0,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS robtarget pTCP_Point7:=[[745.514,-131.2294,410.2462],[0.0327133722603321,-0.763697028160095,0.644024610519409,0.03047901019454],[-1,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
ENDMODULE
Then i just input the robtarget coordinates from module TCP_tool1 into module with MToolTCPCalib instruction, lets call in TCP_calibration, tweak the code, and done. Or am i missing something? Because i recieve a syntax error, “wrong number of components in the initializer”. All help is appreciated, because im seriously confused.