Problem with calculation of a wobj

Hi !

I have a problem with my calculation of a robholding workobject. I’m using a Visionsystem to localize and find the origin of the wobj.

It looks like this in the start of the calculation.

PERS tooldata tGripare:=[TRUE,[[0,0,175],[0,1,0,0]],[3,[8.5,-41.3,136.7],[1,0,0,0],0,0,0]];

!Workobjekt side 1,(robhold):
PERS wobjdata wobjSida1:=[TRUE,TRUE,“”,[[-0.494935,10.8764,342.85],[0.501318,-0.497505,0.498674,0.502488]],[[0,0,0],[1,0,0,0]]];

!Berakna grund workobjekt sida 1. (VA?nstra tornrad ovanifrA?n)
!Kopiera koordinater frA?n verktygsdata;
wobjSida1.uframe.trans:=tGripare.tframe.trans;
!Kopiera orientering frA?n verktygsdata tool0
wobjSida1.uframe.rot:=tool0.tframe.rot;
!FA?rskjut i X-led frA?n tool0
wobjSida1.uframe.trans.x:=wobjSida1.uframe.trans.x+(-1.53);
!FA?rskjut i Y-led frA?n tool0
wobjSida1.uframe.trans.y:=wobjSida1.uframe.trans.y+(11.35);
!FA?rskjut i Z-led frA?n tool0
wobjSida1.uframe.trans.z:=wobjSida1.uframe.trans.z+(168);
!Rotera utifrA?n tool0
wobjSida1.uframe.rot:=OrientZYX(90,90,0);

And after I have made this calulation, I do several of OrientZYX becuase to get good accuarcy witxh X,Y and Angle coordinats from the visionsystem . I get a constant fault by 0.3 degrees angle and I have get closer to zero.

Does anybody know a better calculation for a Robhold workobject. I know that OrientZYX is not that perfect. I made a own to get some more decimals.

Best regards

Christian