# Collation  \[PickMaster 3\]

**URL:** https://tech-community.robotics.abb.com/t/collation-pickmaster-3/546
**Category:** PickMaster
**Created:** [November 23, 2005, 2:44pm UTC](https://tech-community.robotics.abb.com/t/collation-pickmaster-3/546 "2005-11-23T14:44:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hawesr](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@hawesr](https://tech-community.robotics.abb.com/u/hawesr)
#### Post date: [November 23, 2005, 2:44pm UTC](https://tech-community.robotics.abb.com/t/collation-pickmaster-3/546/1 "2005-11-23T14:44:59Z")

</div>

IRB 340(s). We need to demo product collation on the product conveyor (similar to ABB sausage video). Is the standard approach to generate both a pick & a place work area on the same conveyor? Do we need 2 encoder cards for this?

---

<div class="post-metadata">

### Author: ![milun](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@milun](https://tech-community.robotics.abb.com/u/milun)
#### Post date: [November 23, 2005, 2:56pm UTC](https://tech-community.robotics.abb.com/t/collation-pickmaster-3/546/2 "2005-11-23T14:56:55Z")

</div>

The most simple and most efficient way to pick and place from the same conveyor is to define a pick and place workare that uses two encoder cards.

It should also be possible to use one WorkArea to Pick and Place from but this requires much more setup time and the process might stagger and lose efficiency.

---

<div class="post-metadata">

### Author: ![Erik\_S](https://avatars.discourse-cdn.com/v4/letter/e/58956e/32.png) [@Erik\_S](https://tech-community.robotics.abb.com/u/Erik_S)
#### Post date: [November 24, 2005, 8:40pm UTC](https://tech-community.robotics.abb.com/t/collation-pickmaster-3/546/3 "2005-11-24T20:40:41Z")

</div>

Hello Richard,

The application you were describing above can be achieved with only one  
encoder card, it requires a little bit more advanced RAPID-program  
modifications.

In PickMaster you must first start with selecting the work area to  
be of type “Other” in the PickMaster line file. This will allow you  
to change both vaccuum on, reverse and off times in the projects  
based on that line.  
Secondly, in the project, create two items. The item to be picked  
should be assigned type number 10 (as accepted). The item to be  
placed should be assigned type numer 20 (as accepted).  
It is also essential that these items are distributed to the  
corresponding work area in a position source (vision, predefined etc.).

Finally the RAPID-program must be modified as illustrated below.  
Please note that this example is taken from an IRC5 and hence the  
“OtherIndex{1}” should be replaced with “OtherIndex1” for S4C+  
systems.

The first modification in the RAPID program is in the PickPlace()  
procedure:  
SetupIndexes;  
InitTriggs;  
InitPickTune;  
PickRateInit;  
! The line below is added and will read out some conveyor data from the system  
ReadCnv;  
FirstTime:=FALSE;

The second modification in the RAPID program is the PickPlaceSeq() procedure. This  
modification will enable the sytem to both pick and place from the same  
work area.  
PROC PickPlaceSeq()  
Pick OtherIndex{1};  
Place OtherIndex{1};  
ENDPROC

The third modification is related to the Pick() procedure. The ItemType argument  
to the GetItmTgt-instruction will ensure that we pick only the targets intended  
to be picked. The QuickAck() function can be found in the attached module.  
It will ensure that the work area queue is performing its best.  
PROC Pick(num Index)  
Coordinated;  
WObjPick:=ItmSrcData{Index}.Wobj;  
! Type number 10 is for targets that should be picked  
GetItmTgt ItmSrcData{Index}.ItemSource,PickTarget ItemType:=10;  
TriggLConc,RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),MaxSpeed,ItmSrcData{Index}.VacuumAct1,z20,GripperWObj:=WObjPick;  
MoveLConc,PickTarget.RobTgt,LowSpeed,z5Inpos:=ItmSrcData{Index}.TrackPoint,GripperWObj:=WObjPick;  
GripLoad ItemLoad;  
IF QuickAck(Index, PickTarget) THEN  
MoveL RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowSpeed,z20,GripperWObj:=WObjPick;  
ELSE  
TriggL RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowSpeed,ItmSrcData{Index}.Ack,z20,GripperWObj:=WObjPick;  
ENDIF  
UnCoordinated;  
ENDPROC

Simirarly the Place() procedure must be modified.  
PROC Place(num Index)  
Coordinated;  
WObjPlace:=ItmSrcData{Index}.Wobj;  
! Type number 20 is for targets that should be placed  
GetItmTgt ItmSrcData{Index}.ItemSource,PlaceTarget ItemType:=20;  
MoveLConc,RelTool(PlaceTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),MaxSpeed,z20,GripperWObj:=WObjPlace;  
TriggLConc,PlaceTarget.RobTgt,LowSpeed,ItmSrcData{Index}.VacuumRev1T2:=ItmSrcData{Index}.VacuumOff1,z5Inpos:=ItmSrcData{Index}.TrackPoint,GripperWObj:=WObjPlace;  
GripLoad load0;  
IF QuickAck(Index, PlaceTarget) THEN  
MoveL RelTool(PlaceTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowSpeed,z20,GripperWObj:=WObjPick;  
ELSE  
TriggL RelTool(PlaceTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowSpeed,ItmSrcData{Index}.Ack,z20,GripperWObj:=WObjPlace;  
ENDIF  
UnCoordinated;  
ENDPROC

The attached module PPA\_UTILITIES must also be attached to the RAPID-program.  
[ppa\_utilities.zip](http://forums.robotstudio.com/webwiz/ppa_utilities.zip)

BR,

Erik
