13 Robot integration
13.3.5 FlexLoader assistance and utility functionality
Continued
RAPID example tool handling
The following example is typical use of the tool handling system.
Continues on next page
202
\MaxValue:=4000);
! define if pressure supervision signal is to be used
IF bHasAirPressureSensor=TRUE THEN
SetUpAirPreassureControl "diAirPressureOK";
ENDIF
! Do initialization of tools
ClearTools;
SetupTool GRIPPER_1, \tToolData:=tGripper1,
\SignalName:="doOpenGripper1"
\HighSignalFunction:=OPEN_GRIPPER \WaitingTime:=0.5;
SetupTool CALIBRATION_TOOL_1,\tToolData:=tCalibTool1;
SetupTool GRIPPER_2, \tToolData:=tGripper2,
\SignalName:="doOpenGripper2"
\HighSignalFunction:=OPEN_GRIPPER \WaitingTime:=0.5;
! Do initialization of tool loads
ClearToolLoads;
SetupToolLoad RAW_PART\Weight:=5\COGFromTCP:=[0,0,100];
SetupToolLoad MACHINED_PART\Weight:=4\COGFromTCP:=[0,0,90];
! Open grippers and override default wait time (0.5s)
ToolAction\Tool:=GRIPPER_1\Release\WaitingTime:=0.1;
ToolAction\Tool:=GRIPPER_2\Release\WaitingTime:=0.1;
! Set gripper 1 to active, store the tooldata for gripper 1 in
tTool,
! this will also update gripload for robot
tTool:=SetActiveTool(GRIPPER_1);
! Grip a raw part with current active tool, also updates gripload.
ToolAction\Grip\PartType:=RAW_PART;
! Grip a MACHINED_PART with gripper 2
ToolAction\Tool:=GRIPPER_2\Grip\PartType:=MACHINED_PART;
! Do something if total load mass is more than 8 kg
IF getCurrentLoadMass() > 8 THEN
! Do work
ENDIF
! Do a release for gripper 1 if there is a RAW_PART in it
IF getToolLoadType(GRIPPER_1)=RAW_PART THEN
! It is also ok to define exactly which gripper should perform
action
ToolAction\Tool:=GRIPPER_1\Release;
ENDIF
! If you have reason to think someone opened gripper in manual
© Copyright 2014-2018 ABB. All rights reserved.
Product manual - FlexLoader Vision
3HAC051771-001 Revision: B