No rotation Program [PickMaster 3]

Hello, I don’t want to rotate object. just Pick and place are needed.

PROC Pick(num Index)
Coordinated;
WObjPick:=ItmSrcData{Index}.Wobj;
GetItmTgt ItmSrcData{Index}.ItemSource,PickTarget;
PickTarget.RobTgt.orient:=SafePos.orient; <–doesn’t work

PROC Place(num Index)
Coordinated;
WObjPlace:=ItmSrcData{Index}.Wobj;
GetItmTgt ItmSrcData{Index}.ItemSource,PlaceTarget;
PlaceTarget.RobTgt.orient:=SafePos.orient; <–does not working

Below is working

PickTarget.RobTgt.rot:=SafePos.rot;

PlaceTarget.RobTgt.rot:=SafePos.rot;

but when placing, gripper is rotating.
What I want is just placing without rotation. Do you have any idea?

In the vision model you have the possibility to de-select “enable angle variation”. I don’t remember the exakt phrase but something like that. Provided that the pick and place work areas have the same orientation no rotation will be made. If the areas have different orientation you can overcome this by adjusting the angle difference in the place pattern for instance.

//Daniel

Try to force Quaternions in Pick and Place, like this:

In PROC Pick

GetItmTgt ItmSrcData{Index}.ItemSource,PickTarget; &n bsp;
PlaceTarget.RobTgt.rot.q1:=0;
PlaceTarget.RobTgt.rot.q2:=0;
PlaceTarget.RobTgt.rot.q3:=1;
PlaceTarget.RobTgt.rot.q4:=0;

AND PROC Place

GetItmTgt ItmSrcData{Index}.ItemSource,PlaceTarget; & nbsp;
PlaceTarget.RobTgt.rot.q1:=0;
PlaceTarget.RobTgt.rot.q2:=0;
PlaceTarget.RobTgt.rot.q3:=1;
PlaceTarget.RobTgt.rot.q4:=0;

JK,

Using the orientation of the SafePos will force axis 4 to go to zero angle relative to the conveyor. See code example below how the orientation of axis 4 can be adjusted.

PROC Pick(num Index)
VAR num nAnyAngle:=180;
Coordinated;
WObjPick:=ItmSrcData{Index}.Wobj;
GetItmTgt ItmSrcData{Index}.ItemSource,PickTarget;
PickTarget.RobTgt.rot:=SafePos.rot;
PickTarget.RobTgt:=RelTool(PickTarget.RobTgt,0,0,0Rz:=nAnyA ngle);
TriggLConc,RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index} .OffsZ),MaxSpeed,ItmSrcData{Index}.VacuumAct1,z20,GripperWO bj:=WObjPick;
MoveLConc,PickTarget.RobTgt,LowSpeed,z5Inpos:=ItmSrcData{I ndex}.TrackPoint,GripperWObj:=WObjPick;
GripLoad ItemLoad;
TriggL RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowS peed,ItmSrcData{Index}.Ack,z20,GripperWObj:=WObjPick;
UnCoordinated;
ENDPROC

!=======================================

PROC Place(num Index)
VAR num nAnyAngle:=0;
Coordinated;
WObjPlace:=ItmSrcData{Index}.Wobj;
GetItmTgt ItmSrcData{Index}.ItemSource,PlaceTarget;
PlaceTarget.RobTgt.rot:=SafePos.rot;
PlaceTarget.RobTgt:=RelTool(PlaceTarget.RobTgt,0,0,0Rz:=nAn yAngle);
MoveLConc,RelTool(PlaceTarget.RobTgt,0,0,-ItmSrcData{Index} .OffsZ),MaxSpeed,z20,GripperWObj:=WObjPlace;
TriggLConc,PlaceTarget.RobTgt,LowSpeed,ItmSrcData{Index}.Va cuumRev1T2:=ItmSrcData{Index}.VacuumOff1,z5Inpos:=ItmSrcDa ta{Index}.TrackPoint,GripperWObj:=WObjPlace;
GripLoad load0;
TriggL RelTool(PlaceTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),Low Speed,ItmSrcData{Index}.Ack,z20,GripperWObj:=WObjPlace;
UnCoordinated;
ENDPROC

Roger,

About the example you wrote: I think you’re suggesting to determine nAnyangle experimentally.
I think it’s possibile to calculate nAnyangle converting the baseframes quaternions into Euler angles. But conveyor baseframes quaternions are stored in the system parameters. Is there any trick to read them in the RAPID code?

Thanx,
Claudio

Hello Claudio,

This is how to read the baseframe orientation of a conveyor,

VAR orient Cnv1Orient:=[1,0,0,0];
VAR num Cnv1Angle:=0;

ReadCfgData “/MOC/SINGLE/CNV1”,“base_frame_orient_u0”,Cnv1Orient.q1;
ReadCfgData “/MOC/SINGLE/CNV1”,“base_frame_orient_u1”,Cnv1Orient.q2;
ReadCfgData “/MOC/SINGLE/CNV1”,“base_frame_orient_u2”,Cnv1Orient.q3;
ReadCfgData “/MOC/SINGLE/CNV1”,“base_frame_orient_u3”,Cnv1Orient.q4;
Cnv1Angle:=EulerZYX(,Cnv1Orient);