Have the problem with the tool rotation. I use the gripper to pick the square part, angle variation set from -180 to 180, if angle between the parts greater than 180 degrease, pipe will rotate around the head.
I find some code on this forum and have few questions:
Z,PickTarget.RobTgt.rot - it?_Ts this the same value what is in Vision Analyzer?
Can someone explain about all this values please? Thanks
nRotZ1:=0;
nRotZ2:=0;
nRotZ3:=0;
nAngleZ:=EulerZYX(,PickTarget.RobTgt.rot);
IF nAngleZ>-135 and nAngleZ<-45 THEN
!nothing todo
ELSE
nRotZ1:=-130;
nRotZ2:=-70;
nRotZ3:=-180;
ENDIF
TriggLConc,RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZRz:=nRotZ1),MaxSpeed,ItmSrcData{Index}.VacuumAct1,z5,tGripWObj:=WObjPick;
MoveLConc,PickTarget.RobTgt,LowSpeed,z1Inpos:=ItmSrcData{Index}.TrackPoint,tGripWObj:=WObjPick;
GripLoad ItemLoad;
MoveL RelTool(PickTarget.RobTgt,0,0,-60Rz:=nRotZ2),LowSpeed,z1,tGripWObj:=WobjPick;
TriggL RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZRz:=nRotZ3),LowSpeed,ItmSrcData{Index}.AckT2:=PickDone,z5,tGripWObj:=WObjPick;
ENDPROC