We have a flexpicker using vision detection and modelling for detection of items to be picked. The camera is the Cognex CDC50 and 8100D framegrabber. Is their any way of providing two signals to our plc from either the cognex parrallel I/O or through rapid and S4C I/O when inspected items are accepted or rejected.
The simplest way to achieve this is to check the type number in RAPID and pulse an output on the robot controller.
The Pick procedure in the RAPID template could then look something like:
PROC Pick(num Index)
VAR num PickType:=2; // 2 is rejected type
InCoordRout:=TRUE;
WObjPick:=ItmSrcData{Index}.Wobj;
WHILE PickType = 2 DO
GetItmTgt ItmSrcData{Index}.ItemSource,PickTarget;
PickType:=PickTarget.Type;
IF PickType = 2 THEN
AckItmTgt ItmSrcData{Index}.ItemSource,PickTarget, TRUE;
PulseDO doReject; // Pulse for each reject
ENDIF
ENDWHILE
PulseDO doAccept; // Pulse for each accept
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;
TriggL RelTool(PickTarget.RobTgt,0,0,-ItmSrcData{Index}.OffsZ),LowSpeed,ItmSrcData{Index}.Ack,z20,GripperWObj:=WObjPick;
InCoordRout:=FALSE;
ENDPROC
This would generate a pulse on doAccept and doReject for each accepted and rejected item that is passing by the robot.
It assumes that the user also distributes both accepted and rejected items in the position source.