CONST robtarget p100:=[[1201.59,1.447676E-05,1075.15],[1.391252E-07,0.1478094,-0.9890159,-2.908804E-08],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR robtarget ptmp:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
VAR robtarget ptmp_tool0:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
PERS tooldata MyTool:=[TRUE,[[31.792631019,0,229.638935148],[0.945518576,0,0.325568154,0]],[1,[0,0,1],[1,0,0,0],0,0,0]];
PERS tooldata MyToolNew:=[TRUE,[[21.9529,6.63931,237.327],[0.941921,-0.028375,0.324329,-0.0824075]],[1,[0,0,1],[1,0,0,0],0,0,0]];
PERS num dx:=10;
PERS num dy:=10;
PERS num drz:=10;
VAR num rx;
VAR num ry;
VAR num rz;
PROC main()
MyToolNew:=MyTool;
MoveL p100,v1000,fine,MyTool\WObj:=wobj0;
reCalTCP MyTool;
MoveL p100,v1000,fine,MyToolNew\WObj:=wobj0;
ENDPROC
PROC reCalTCP(inout tooldata tool_std)
waittime 0.5;
ptmp:=CRobT(\Tool:=tool_std);
ptmp.trans.x:=ptmp.trans.x+dx;
ptmp.trans.y:=ptmp.trans.y+dy;
rx:=EulerZYX(\x,ptmp.rot);
ry:=EulerZYX(\y,ptmp.rot);
rz:=EulerZYX(\z,ptmp.rot);
rz:=rz+drz;
ptmp.rot:=OrientZYX(rz,ry,rx);
ptmp_tool0:=CRobT(\Tool:=tool0);
MyToolNew.tframe:=PoseMult(PoseInv([ptmp_tool0.trans,ptmp_tool0.rot]),[ptmp.trans,ptmp.rot]);
ENDPROC
PROC rModify()
MoveL p100,v1000,fine,MyTool\WObj:=wobj0;
ENDPROC