ABB FlexLoader Vision Product Manual page 195

Table of Contents

Advertisement

The main loop is handled according to code shown below. This example shows
how to handle that parts occasionally are not found.
Product manual - FlexLoader Vision
3HAC051771-001 Revision: B
RUN_NEVER, RUN_NEVER,];
PERS bool ALLOW_AUTO_GRAB{4}:=[FALSE, FALSE, FALSE, FALSE];
! do initial image acquisition and pick of part
GrabImage CAMERA_NO_1;
RefPosInCam_1
WaitUntil bCoordReceived{CAMERA_NO_1}=TRUE;
SetNextTarget CAMERA_NO_1;
! handle that parts occasionally are not found.
WHILE nAction{CAMERA_NO_1} <= NO_DETAIL DO
! change camera settings if necessary
DiscardAndTakeNewImage CAMERA_NO_1;
WaitUntil bCoordReceived{CAMERA_NO_1}=TRUE;
SetNextTarget CAMERA_NO_1;
Incr nImageRetries{CAMERA_NO_1};
IF nImageRetries{CAMERA_NO_1} > MAX_IMAGE_RETRIES{CAMERA_NO_1}
THEN
! Create alarm or inform user in some other way
EXIT;
ENDIF
ENDWHILE
IF nAction{nCameraNumber}=CHANGE_BIN THEN
! TODO - Do something to take care of pallet change, can be
removed if not a pallet picker cell
ELSEIF nAction{nCameraNumber}=PICK_INTERLAYER THEN
! TODO - Do something to take care of interlayer, can be removed
if not a pallet picker cell
ELSEIF nAction{nCameraNumber}=PICK_INTERLAYER_AND_CHANGE_BIN THEN
! TODO - Do something to take care of interlayer AND pallet
change, can be removed if not a pallet picker cell
ELSE
PickCam_1;
RefPosOutCam_1;
! start process of post-pick processing
MoveRobotToCamera2;
RefPosInCam_2;
GrabImage CAMERA_NO_2;
WaitUntil bCoordReceived{CAMERA_NO_2}=TRUE;
SetNextTarget CAMERA_NO_2;
! handle that parts occasionally are not found.
WHILE nAction{CAMERA_NO_2} <= NO_DETAIL DO
! change camera settings if necessary
DiscardAndTakeNewImage CAMERA_NO_2;
WaitUntil bCoordReceived{CAMERA_NO_2}=TRUE;
SetNextTarget CAMERA_NO_2;
© Copyright 2014-2018 ABB. All rights reserved.
13 Robot integration
13.3.2 FlexLoader application functionality
Continues on next page
Continued
195

Advertisement

Table of Contents
loading

Table of Contents