Documente Academic
Documente Profesional
Documente Cultură
RO BO TICS
YuMiLib
ABB Add-in
User and Reference Guide
YuMiLib
Document-ID: 3HDA000059A1554-001
Revision: 1.04
The information in this manual is subject to change without notice and should not be construed
as a commitment by ABB. ABB assumes no responsibility for any errors that may appear in this
manual.
Except as may be expressly stated anywhere in this manual, nothing herein shall be construed
as any kind of guarantee or warranty by ABB for losses, damages to persons or property, fitness
for a specific purpose or the like.
In no event shall ABB be liable for incidental or consequential damages arising from use of this
manual and products described herein.
This manual and parts thereof must not be reproduced or copied without ABB's written
permission.
The original language for this publication is English. Any other languages that are supplied have
been translated from English.
ABB AB
Robotics Products
Se-721 68 Västerås
Sweden
Table of Contents
This manual contains an installation guide, RAPID reference and user guide for
the YuMiLib Add-In buiavaliable for YuMi IRB14000
YuMiLib-1.00.0200.38 or higher
Usage
This manual is intended as a user guide for the YuMiLib Flexpendant App and
RAPID reference. It contains documentation of the RAPID syntax and
parameters for the YuMiLib instructions. Additional manuals including a general
RAPID reference, SmartGripper and FlexPendant guides are listed under
References.
Prerequisites
References
Revisions
Revisions Description
0.1 Sandra Collin
0.2 Sandra Collin
0.3 Sandra Collin
1.0 Sandra Collin, Maj Stenmark
1.01 Sandra Collin
1.02 New features in YuMiLib V1.00.02, Sandra Collin
1.03 Changes of YuMiLib V1.00.0200.38
new parameter \KeepOrientation in Locate,
user defined settings adapted, C. Goy
1.04 Changes of YuMiLib V1.00.0200.48
New user-defined settings
Improved MoveY description, C. Goy
Safety regulations
Before beginning to work with the robot, you must be familiar with the safety
information in Product manual - IRB 14000.
License agreement
1. ABB is the sole owner of the copyright and exploitation rights of the
software supplied with YuMiLib.
3. The license only entitles the user to use the software option YuMiLib on
a robot control. Licensee may not duplicate the YuMiLib or any part
thereof and make it available to third parties or use the software or parts
thereof on further robot controls. With the exception of creating a
security scanner solely for their own use in the original hardware.
2.1 Overview
Usage
The library provides automatic setup and calibration routines for robot system
and grippers, and step-by-step configuration guides and user support for
creating vision applications, and efficient pick-and-place and palettizing
applications that use the Smartgripper cameras, fingers and suction cups. It is
integrated into the Flexpendant, the RAPID editors and Robotstudio Integrated
Vision.
After installation, the functionality can be accessed through the YuMiLib menu
on the Flexpendant, in RobotStudio, the Program Editor window and Program
Data window on the Flexpendant or by calling the the routines directly from
RAPID programs.
Scope Content
• Camera Calibration
• MoveY – optimized YuMi motions
• Pick/Place operations
• Localization
• Indexed Pick/Place operations in a
tray
• Camera guided Pick/Place and tray
localization
In YuMiLib the
The welcome screen lets the user select actions for calibration, instruction
traning, task execution or program modification.
Basic/advanced mode:
In basic mode, the dialogues in the initialization guides will minimize the user-
specified input, using default values when possible. In advanced mode, the
dialogues provide all adaptable settings during initialization, for example for
creating fast pick and place motions that measures the pick and grip time.
Calibrate
The calibrate option displays shortcuts for executing calibration routines for the
camera(s) and TCP(s).
The TCP calibration will execute a series of motions where the robot touches
known points on its base and updates the tooldata for the fingers and suction
cups.
The camera focus is adjusted manually by rotating the focus ring after removing
the caps as described in the wizard on the Flexpendant. To calibrate the
camera(s) relative to the robot base, the robot executes a series of movements
while measuring the distance to the ABB logo of the other arm.
Train
When selecting the Train item from the YuMiLib welcome screen, the user will
be guided through configuration steps for teaching instruction parameters. The
idea of the App is to train instruction parameters and then transfer the code to
the user’s own RAPID program that contain the task level logic. The instructions
can be altered or removed and new instructions, declarations and routines can
be added as long as BeginnerProgramMain is the first routine in the module.
Each instruction has an initialization guide where the user trains the parameter
values to the routine.
Auto align
All instruction in the instruction list have the option to Auto align. Auto align
automatically aligns the gripper, suction cup or camera z-axis to the appropriate
axis of the base coordinate system when continuing by pressing OK.
Vision
The configuration guide can be used to identify up to four different objects and
will automatically calculate the ImagePlaneOffset (the distance in z-direction to
the parts).
The step-by-step configuration guide assists the user to train the object model
in the Integrated Vision tab in RobotStudio (32-bit). See more under Program
Execution for the Locate instruction.
Every time the hand cameras are used, the location of the located part is stored
in a temporary workobject called WObj_vision. This workobject is used to
specify relative motions in subsequent motions relative to the part. The vision
workobject is declared TASK PERS within the scope of the current task,
however, the user can share data between tasks by declaring persistent
variables in both tasks and assign/use it in both tasks:
Each robot arm has its own workobject WObj_FollowR and WObj_FollowL that
can be referenced by the other arm. This can be used while the reference arm
stands still, for example while holding a part. For programming of synchronized
motions, see the RAPID Reference Manual - Instructions, Functions, and Data
Types.
Vision-related instructions have the option to create the image plane (and
thereby also WObj_Vision) parallel to the base coordinate system. If the
checkbox is unchecked, the image plane is parallel to the camera.
YuMiLib provide step-by-step initialization for configuration of the Pick and Place
instructions. For example, the users have the option to automatically weigh the
part using a series of movements to measure the mass. Multiple parts can be
picked and weighed after each other.
For fast pick modes using triggered finger closing, the configuration will measure
grip and pick time. See balanced and fast pick.
During the setup the user moves the robot to the desired grip position, assisted
by for example the Align feature that aligns the gripper z-axis with the axes of
the base coordinate system.
The Pick and Place instructions have an approach position PrePos and retracts
to PostPos after picking the part. Depending on the selection of RelTool or Offs
in the app, the arm is either moved relative to the tool or the workobject. The
default value is 100 mm offset in the z-direction of the current tool or the
instruction workobject (default wobj0). The positions can be edited by specifying
a workobject for the tray as shown in the examples below:
PROC main()
PickInward pTarget,tGripper\WObj:=WObj_angled,gd1;
ENDPROC
Or, by modifying the x, y,z- offset directly using the optional parameters:
PROC main()
PickInward pTarget, tGripper, gd1\PrePos:=[0,-
50,90]\PostPos:=[0,-50,90];
ENDPROC
For example, the image below shows a 2-by-2 tray with parts where the corner
of the tray is located using the hand camera. The traydata keeps track of the
index of the current part and updates it in each IndexedPick. Please see the
code example PickPlaceTray provided in the YuMiLibExample modules.
PROC main()
VAR num nStatus;
td.nIndex := 0;
WHILE nStatus<>TRAY_EMPTY DO
Locate cTarget, tHandCamera , ld;
IndexedPick pTarget, tGripper
\WObj:=WObj_Vision,td, pd\nStatus:=nStatus;
! Do something with the objects
ENDWHILE
ENDPROC
Clear
Clears the program in BeginnerModuleMain for both tasks respectively.
Run
Executes the program in BeginnerModuleMain for both tasks.
View
The View tab displays the current instructions in BeginnerModuleMain for each
arm. The instructions can be removed or modified. If pressing Edit, a window
with Align, Modify position as well as settings for present pickdata or locatedata
is shown.
The public data types of the YuMiLib can be accessed in the Program Data
window of the FlexPendant.
During installation, several modules are deployed on the robot. For example,
the RAPID modules YuMiLibExamplesR.sys and YuMiLibExamplesL.sys
provide code examples that demonstrate the usage and functionality of the
YuMiLib instructions. The YuMiLibExamplesR.sys and YuMiLibExamplesL.sys
modules can be deleted without affecting the rest of the library.
In the RAPID editor in RobotStudio, the YuMILib snippets are added to the
Snippet-menu.
3 System requirements
Conditions
• IRB14000 (YuMi)
• ABB Robot Control of the Generation IRC5 and Operation System from
RobotWare 6.07.
Installation
Module Functionality
YuMiLib Installation
• Install ABB.YuMiLib_1.00.0000.xx.rspak via RobotStudio. Under the
Add-Ins tab, select Install Package and browse to the rspak-file.
• Connect to the controller and install the add-in via the Installation
Manager in RobotStudio.
• Save the YuMiLib license file in the HOME folder on the robot controller.
YuMiLibSnippets Installation
• Run SnippetsInstall.exe. If RobotStudio is open during the installation
RobotStudio must be restarted.
Autoconfiguration at first startup
When the installation and startup are finished, a welcome screen is displayed
asking the user if they want help with the setup. Performing the setup is
advisable. The setup will perform the following:
• Calibration control and update of the revolution counters if needed
• If suction cups are present the tVacuum1 and tVacuum2 TCP will be
identified.
• The tGripper TCP is identified.
• A guide to set up focus depth is shown.
• Camera calibration for present cameras
YuMiLib parameters are part of the backup and will be restored together with the rest of
the robot system parameters. YuMiLib sets the camera configuration and if the backup
did not have YuMiLib installed and the cameras were named to something other than
HandCameraR and HandCameraL, the camera configuration must either be removed or
the cameras renamed (to HandCameraR and HandCameraL). To remove the
configuration, edit the camera name(s) in the SIO.cfg file in SYSPAR folder in the backup
folder to set the camera name(s):
COM_APP:
Custom Settings
Gripper data:
Locate data:
The settings are persistent and must be changed back to default by assigning
the here documented default values. The actual values are not stored with a
backup.
The logger uses two files with a definable maximum size (default 1000 KB).
Each TASK creates separate log files. They are named
TaskName_LOCATE_1.LOG and TaskName_LOCATE_2.LOG and are stored
in HOME: of the system.
The file size may be defined by assigning the value in RAPID. The default value
is 1000 KB.
• yl_nLogLocateFileMaxSizeKB:=1000;
Usage
Description
Components
Initialization status for the operation. Setting this value to FALSE will force a re-
initialization of the pickdata.
High limit used when evaluating finger position or suction pressure in a pick or
place.
The distance from the pick/place position to the pre/post pick/place position in
the z-direction specified by the workobject used in a pick/place. If specified to 0,
the offset will be initialized to yl_nOffs mm.
Only used when not using a defined \Load in a pick. If specified to 0, the
initialization will ask the user to specify the mass or let YuMiLib try to identify the
mass. In the range 1-250 g.
When the initialization is finished the sum of all parameters affecting the delay
time (including velocity and acceleration) is stored in a hash. When performing
a pick/place, the hash is controlled to discover changes in pickdata and in that
case, ask user to update the hash, update delaytime or reinitialize.
Basic Example
PERS pickdata
pd_initialized:=[TRUE,0.093,5.5,20,1.3,3.3,100,0.03536,1,0
];
Structure
Usage
locatedata is used to store information about a locate command and the located
parts.
Description
The information about the locate command and the located parts is stored in a
separate data declaration and modified when locating parts or training a Locate.
Components
Trained status for the locatedata. Setting this value to FALSE will force a re-
initialization of the locatedata.
The vision job name. If VisionJobName is not specified when training a Locate
the user is prompted to select a job from a list.
The vision tool number, used to enable correct tool when performing a Locate.
nVisionTool is automatically assigned during training.
When training a Locate with a specified workobject, the ImagePlane is set to the
current position of the camera. If no workobject is specified, the pose of wobj0
is used. The ImagePlane is used to calculate the position of the located object.
The z-offset from base coordinate system to the object if no workobject is used
in Locate. If a workobject is specified the ImagePlaneOffset is expressed from
camera to the top of the object in negative direction. During a Locate training
the user is asked to specify the ImagePlaneOffset or to let YuMiLib perform an
identification. The ImagePlaneOffset is used to calculate the position of the
located object.
Number of parts found when locating multiple parts. If nPartsFound is -1, a new
image is taken.
The pose where the robot takes the image. The pose is calculated using
tHandcamera and wobj0.
Position of part1.
Position of part2.
Position of part3.
Position of part4.
Position of part5.
Position of part6.
Position of part7.
Position of part8.
Position of part9.
Position of part10.
The number of located parts that does not have enough finger clearance to grip
an object.
Basic Example
Default locatedata.
Structure
Usage
traydata is used to store information about a tray’s setup and is modified when
a IndexedPick or IndexedPlace is performed.
Description
The information about the tray setup and indexation is stored in a separate data
declaration and modified when performing indexed picking or placing of parts.
Components
Initialization status for the operation. Setting this value to FALSE will force a re-
initialization of the traydata.
The calculated workobject pose for the tray setup. psWObj is initialized
according to the given positions in each direction during leadthrough teaching
of an IndexedPick or IndexedPlace instruction.
TRAY_MODE_PICKINWARD;
TRAY_MODE_PICKOUTWARD;
TRAY_MODE_PICKSUCTION1;
TRAY_MODE_PICKSUCTION2;
TRAY_MODE_PICKPLUNGE;
TRAY_MODE_PLACE;
TRAY_MODE_PLACESUCTION1;
TRAY_MODE_PLACESUCTION2;
TRAY_MODE_PLACEPLUNGE;
Basic Example
Default traydata.
Structure
5.2 Instructions
Usage
MoveY is used to make a compact and fast movement on the YuMi robot without
having to choose between linear or joint movement or calculate a suitable elbow
angle.
MoveY compares the last executed position or the current position after a PP to
main (FromPoint) with the given target position (pToPoint).
If FromPoint and pToPoint differ not too much, MoveY moves directly to
pToPoint.
If this is not the case, MoveY calculates a mid point automatically to reach the
given pToPoint.
Basic Example
Arguments
DesiredTorque for collision detection. Can be logged using signal 7901 to find appropriate
threshold. If DesiredTorque is specified \SyncProcStart and \SyncProcEnd cannot be
used.
Name of the RAPID procedure to be executed at the start of the movement. The
procedure call is a late binding call, and therefore inherits its properties. The syntax must
be “ModuleName:ProcName”.
The distance (mm) after the beginning of the instruction where SyncProcStart should be
called.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
Name of the RAPID procedure to be executed at the middle of the corner path in the
destination point. The procedure call is a late binding call, and therefore inherits its
properties. The syntax must be “ModuleName:ProcName”.
The distance (mm) before the end of the instruction where SyncProcEnd should be called.
Use to enforce a midpoint between start and end position. The midpoint will be a near
singular configuration of the arm, where axis 5 is close to zero. This can be practical to
enforce very compact movements, typically in a home running procedure in the beginning
of a program.
Use to prevent all movements from using \Conc which executes subsequent instructions
while the robot is moving.
Syntax
MoveY
[ '\' J ',']
[ '\' L ',']
[ '\' DesiredTorque ':=' < expression (IN) of num >]
[ '\' CollisionDetected ':=' < variable (VAR) of bool >]
[ '\' SyncProcStart ':=' < expression (IN) of bool >]
[ '\' nSyncProcStartDist ':=' < expression (IN) of num >]
','
[ pToPoint' :=' ] < expression (IN) of robtarget >','
[ speed ':=' ] < expression (IN) of speeddata >','
[ zone ':=' ] < expression (IN) of zonedata >','
[ tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj' :='< persistent (PERS) of wobjdata >]
[ '\' SyncProcEnd :=' < expression (IN) of string >]
[ '\' nSyncProcEndDist ':=' < expression (IN) of num >]
[ '\' nSyncProcEndTime ]
[ '\' SingMidPoint ]
[ '\' NoConc ]';'
Usage
Basic Example
MoveToHome;
Arguments
MoveToHome
Syntax
MoveToHome';'
Usage
HandInit is used to connect and calibrate the hand. The hand is jogged to
minimum position and is calibrated.
Basic Example
HandInit;
Arguments
HandInit [\ReCalibrate]
To force a new calibration, even when the hand has been previously calibrated, the switch
ReCalibrate should be specified.
Syntax
HandInit
[ '\' ReCalibrate ]';'
Usage
MoveFingersTo is used to move the fingers to a desired position. When the hand
is given the command to move to a position there is a risk for the fingers to
overshoot. MoveFingersTo checks for overshoot when the fingers are still and
corrects them if overshoot is found.
Basic Example
MoveFingersTo 10\Wait
The fingers are moved to 10 and corrected if overshoot is found. The
procedure waits for correct position before returning.
Arguments
The desired finger position expressed in the same manner as the smartgripper on the
FlexPendant.
The desired finger clearance expressed in the same manner as the smartgripper on the
FlexPendant. nFingerClearance is used to evaluate if the fingers are close enough to the
desired position, if they are the movement is not performed.
Wait for the fingers to reach the correct position before returning.
Syntax
MoveFingersTo
[ nGripPos ':=' ] < expression (IN) of num >
[ nFingerClearance ':=' ] < expression (IN) of num >
[ '\' Wait ]
[ '\' Precise ]';'
Usage
Basic Example
ShowABBLogo \NoStop;
WaitSyncTask syncShowABB, task_list;
WaitSyncTask syncCalibHandCamera, task_list;
The arm that should not be calibrated should show the ABB Logo to the other
arm and wait for the other arm to finish the calibration.
Arguments
Used when not wanting the arm to stop when the calibration is finished.
Used when the status and result of the camera calibration should be logged to file and
printed on the Teach Pendant.
Syntax
Calib_HandCamera
[ '\' NoStop ]
[ '\' Print ]
[ '\' MoveToCalibPos ]';'
Usage
InitCamera is used to initialize a camera job. The camera job is loaded and the
camera is put in run mode.
Basic Example
InitCamera;
Arguments
If the camera job has been previously loaded and should be reloaded.
Syntax
InitCamera
[ job ':=' ] < expression (IN) of string >
[ '\' ReloadJob ]';'
Usage
The robot moves to a position where the hand is presenting the ABB logo to the
other hand so the other arm can perform a Calib_HandCamera.
To change the default position, user can edit the position pShowABBLogo,
located in the YuMiLib_Params_L/R.
Basic Example
ShowABBLogo \NoStop;
WaitSyncTask syncShowABB, task_list;
WaitSyncTask syncCalibHandCamera, task_list;
The arm that should not be calibrated should show the ABB Logo to the other
arm and waits for the other arm to finish the calibration.
Arguments
ShowABBLogo [\NoStop]
Used when not wanting the execution to stop when in correct position.
Syntax
ShowABBLogo
[ '\' NoStop ]';'
Usage
Locate is used to locate up to 10 parts using the hand camera. When calling the
routine, WObj_Vision is updated to the next part in the locatedata. If there is no
next part in the locatedata a new image is taken.
Basic Example
Example 1:
Locate pPicture,tGripper,lpmd;
Locates the parts and stores the information in the locatedata.
Example 2:
Locate pPicture,tGripper,lpmd\sFeederProc:=
"MainModule:FeederProc";
Arguments
The movement should be performed using joint movement. If omitted Locate desides
which movement to make.
The movement should be performed using linear movement. If omitted Locate desides
which movement to make.
The position where the robot should take an image and locate the parts.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to yl_vDefault.
The work object (coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The locatedata containing information about the located parts and the vision job.
Used, if a feeder procedure should be called when no parts can be found. The feeder
procedure MUST have PERS locatedata as input parameter. The syntax of the called
procuedure must be “ModuleName:ProcName”.
Used, if a procedure should be called to wait for the feeder to be ready, before the image
is taken. The syntax of the called procedure name must be “ModuleName:ProcName”.
If specified Locate checks for rolling parts and waits until all parts are still.
If LocateOnly is present, the routine does not update the WObj_Vision but only locates
the parts when there is no longer parts present.
If specified, the status is returned. The status codes for Locate are:
If nStatus is not specified and Locate results in status “no parts found” or “no parts from
feeder”, the information is written to the user screen on the Flexpendant and YuMi is
waiting for a tap to continue.
When performing a precise Locate a new image is taken straight over the located part to
improve the image processing accuracy.
The hand will also be rotated according to the rotation of the located part. If the rotation
of the hand causes reachability issues, it may be omitted by using \KeepOrientation.
When performing a Locate with \Precise, a new image is taken straight over the located
part including a rotation of the hand according to the orientation of the located part. If the
rotation of the hand causes reachability issues, it may be omitted by using
\KeepOrientation.
By specifying NoFingerCollision, Locate will not return any vision result that has finger
collision. The finger collision boxes are present in the vision jobs Fingerpick_template.job
and Fingerpick_template_x4.job. If NoFingerCollision is ommited, the results with finger
collision are returned after all non-collision results have been returned.
Used to force a wait time before taking an image. When the arm makes fast movements
to pTakePicture a settling time might be needed to ensure the arm is stable before taking
an image.
Program Execution
During the initialization, the user is guided through the configuration on the
Flexpendant and in the Integrated Vision in RobotStudio (32-bit version)
connected to the controller.
VisionJob:
In basic mode, a new vision job will be created automatically using the
Finger_template.job template which includes a part named Part and two
fingerboxes specifying with which angle and opening the hand will grip the object
as displayed in the screen capture below. In advanced mode, the user can
instead select and modify VisionJobs from a list of current jobs present in the
camera. If the user intends to locate more than one part in the program, the
template Fingerpick_template_x4.job can be used to locate up to 4 different part
types. For example this allows YuMi to find a screw, a nut, a button and a PCB
using the same vision job. Each vision tool will still search for up to 10 parts. i.e.
YuMi could find 6 screws, 8 nuts, 3 buttons and 2 PCBs by taking 4 images
without any delay due to loading of vision jobs. YuMi can only search for 1 part
per locate, so a separate locate call must be made to find each part type.
The latest camera image is shown in the center of the screen. In the top right
corner, the parts from the template are listed. After selecting a part, the user can
train the object model using the menu in the bottom right corner, see the
Integrated Vision Application Manual for more details.
The fingerboxes are used to calculate the angle and width of the fingers when
picking the part and is used when performing visionguided picks. The user can
drag the boxes to desired finger positions to define angle and width. The boxes
are also used to detect if there is free space around the object, showing green
when the fingers are free and red when they are obscured. The object is
detected as either a black or white blob, the Blob Color can be changed in the
RightFinger Settings menu in the lower left corner as shown in the screen
capture above.
When performing a Locate, only the vision tool defined in the locatedata
nVisionTool is enabled (as shown in the screen capture above) and all the other
tools are disabled which will significantly decrease the time it takes to take an
image when having multiple tools. The template also contains a table for the
exposure times and lamp status for each tool and is initiated during the training.
This makes it possible for the Locate to switch exposure time and lamp on/off
for each tool in the same job.
VisionResult:
The second question is to choose a VisionResult. An image is taken and
searched for results. If no results are present the user is asked to Create/Modify
a result in Integrated Vision by setting up and training the Model Region for the
tool. Then the fingerboxes should be placed to enable correct picks. The user
can change exposure time (or use the default AutoExposure) and lamp on/off
under Setup. The exposure time and lamp on/off are saved in the spreadsheet
when continuing with Locate. The job should NOT be saved before continuing
since it will overrite the template. When a vision result is defined the robot
searches for a tool matching the result.
ImgagePlaneOffset:
After the vision result is trained the robot tries to identify the offset from the world
coordinate system (height to the object) by taking multiple images in the same
plane. If the z-axis of the camera is not aligned with the z-axis of the robot an
ImagePlane is calculated and the ImagePlaneOffset is calculated relative to the
ImagePlane. It is important that the vision system locates exactly one result. If
that is not the case the user is prompted to ensure there is only one object
present. If the identification fails the user is asked to specify the value.
Edit templates:
The user can edit exposure time and lamp in the spreadsheets of saved
visionjobs in Integrated Vision, for example to modify the exposure time of
different parts in Fingerpick_template_x4:
2. In the spreadsheet, locate the cells for exposure time and lamp. The exposure
time is given in milliseconds and 0.0 means auto exposure. For each part, the
lamp can be turned on by setting the value to 2 or turned off by setting the
value to 0.
3. Save the Job (or Save Job As under a new name) on the camera.
The user can migrate saved visionjobs in Integrated Vision. Starting from a job
created using Fingerpick_template.job it can be migrated to
Fingerpick_template_x4 by renaming the part and fingers as described below.
Rename part:
Rename Part, RightFinger and LeftFinger to the corresponding part in
Fingerpick_template_x4 that should be updated.
5. In the spreadsheet, select the cells from Find Blob to End for Find a Pattmax
pattern. It is important to leave out the header with the Loop and LoopCount for
the migration to be successful.
6. Right click on the selection and press Export cells at the bottom of the list.
Syntax
Locate
[ '\' J ',']
[ '\' L ',']
[ pTakePicture ':=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]','
[ Tool ':=' ] < persistent (PERS) of tooldata >','
[ ld ':=' ] < persistent (PERS) of locatedata >
[ '\' sFeederProc ':=' < expression (IN) of string > ]
[ '\' sWatFeederReadyProc ':=' < expression (IN) of string
> ]
[ '\' WaitForRollingParts ]
[ '\' LocateOnly ]
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Precise ]
[ '\' KeepOrientation ]
[ '\' NoFingerCollision ]
[ '\' nSettlingTime < expression (IN) of num > ] ';'
Usage
WaitForTap is used after a stop point to wait for the user to interact with the
robot by tapping the arm. The routine recognizes a speed peek on any of the
axes on the arm. Pressing the robot will not be recognized and might lead to a
position error. When the arm is tapped the program pointer returns from the
routine.
Basic Example
Example 1:
WaitForTap;
Example 2:
WaitForTap\BothArms;
Arguments
A message string array for displaying why the robot stopped and is waiting for tap.
Syntax
WaitForTap
[ '\' BothArms ]
[ '\' sMessageArray ':=' < expression (IN) of string > ]
[ '\' nSensitivity ':=' < expression (IN) of num > ]';'
Usage
The first time a pick is performed the user is prompted to select which mode the
pick should be performed in and an initialization process is performed. The
process initializes the finger pre-grip position (FingerPos), finger limits for post
grip evaluation (LimitLow, LimitHigh), the offset to the position before and after
the pick (Offset), the mass of the object (mass) and the delaytime for triggering
the fingers (DelayTime) if in YUMILIB_BALANCED_MODE or
YUMILIB_FAST_MODE. If some parameter in the pickdata is specified and not
left as 0 or FALSE the parameter will not be initialized but instead used in the
initialization.
When the fingers are triggered in advance it is important to use the same speed
and settings which is why a hash is used to detect if Speed, AccSet, FingerPos
or Offset has changed. In that case the DelayTime is reinitialized.
If an initialization is wanted using default values there is no need to set all values
to default. Changing the field Initialized of the used pickdata will detect if there
are non-default fields and ask the user if they should be set to default.
Basic Example
PROC PickInwardErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine,tGripper;
PickInward pPick,tGripper,pd1;
ENDPROC
PROC PickInwardErrorHandler()
!Book errors and catch using error handler.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tGripper;
PickInward pPick,tGripper,pd1;
ERROR (YUMILIB_PICK_EMPTY, YUMILIB_PICK_INCORRECT_GRAB)
IF ERRNO=YUMILIB_PICK_EMPTY OR
ERRNO=YUMILIB_PICK_INCORRECT_GRAB THEN
StopMove\Quick;
TPWrite "Pick unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PickInwardErrorReturned()
!If pick is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
WHILE nStatus <> PICK_SUCCESS DO
PickInward pPick,tGripper,pd1\nStatus:=nStatus;
IF nStatus=PICK_COLLISION THEN
!add code here
ELSEIF nStatus=PICK_TOO_CLOSED THEN
!add code here;
ELSEIF nStatus=PICK_TOO_OPENED THEN
!add code here;
ENDIF
ENDWHILE
ENDPROC
Arguments
The movement should be performed using joint movement. If omitted PickInward desides
which movement to make.
The pick position where the robot should pick the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The \Load argument describes the load used in the movement. The load is the payload
of the tool
If PrePos is specified the prepick position is calculated using PrePos instead of pd.Offset.
Limitations
In balanced and fast mode special settings are required for the pick to work properly. The time it
takes for the grippers to grip from a given position (pd.FingerPos) has to take less time than it
takes the robot to move between the PrePick position and the Pick postion. The pick is also
affected by the time it takes to move to PrePick position because the fingers have to reach
pd.FingerPos before continuing to Pick position.
In fast mode the distance between PrePick position and Pick position has to be at least 40 mm.
Syntax
PickInward
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Load' :=' < persistent (PERS) of loaddata > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' DontMoveFingers ]
[ '\' UseOffs ]';'
Usage
The first time a pick is performed the user is prompted to select which mode the
pick should be performed in and an initialization process is performed. The
process initializes the finger pre-grip position (FingerPos), finger limits for post
grip evaluation (LimitLow, LimitHigh), the offset to the position before and after
the pick (Offset), the mass of the object (mass) and the delaytime for triggering
the fingers (DelayTime) if in YUMILIB_BALANCED_MODE or
YUMILIB_FAST_MODE. If some parameter in the pickdata is specified and not
left as 0 or FALSE the parameter will not be initialized but instead used in the
initialization.
When the fingers are triggered in advance it is important to use the same speed
and settings which is why a hash is used to detect if Speed, AccSet, FingerPos
or Offset has changed. In that case, the DelayTime is reinitialized.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized of the used pickdata will detect if there
are non-default fields and ask the user if they should be set to default.
Basic Example
PROC PickOutwardErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine,tGripper;
PickOutward pPick,tGripper,pd1;
ENDPROC
PROC PickOutwardErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tGripper;
PickOutward pPick,tGripper,pd1;
ERROR (YUMILIB_PICK_EMPTY, YUMILIB_PICK_INCORRECT_GRAB)
IF ERRNO=YUMILIB_PICK_EMPTY OR
ERRNO=YUMILIB_PICK_INCORRECT_GRAB THEN
StopMove\Quick;
TPWrite "Pick unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PickOutwarErrorReturned()
!If pick is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
WHILE nStatus <> PICK_SUCCESS DO
PickOutward pPick,tGripper,pd1\nStatus:=nStatus;
IF nStatus=PICK_COLLISION THEN
!add code here
ELSEIF nStatus=PICK_TOO_CLOSED THEN
!add code here;
ELSEIF nStatus=PICK_TOO_OPENED THEN
!add code here;
ENDIF
ENDWHILE
ENDPROC
Arguments
The pick position where the robot should pick the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The \Load argument describes the load used in the movement. The load is the payload
of the tool.
If PrePos is specified the prepick position is calculated using PrePos instead of pd.Offset.
Limitations
In balanced and fast mode special settings are required for the pick to work properly. The time it
takes for the grippers to grip from a given position (pd.FingerPos) has to take less time than it
takes the robot to move between the PrePick position and the Pick postion. The pick is also
affected by the time it takes to move to PrePick position because the fingers have to reach
pd.FingerPos before continuing to Pick position.
In fast mode the distance between PrePick position and Pick position has to be at least 40 mm.
Syntax
PickOutward
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Load' :=' < persistent (PERS) of loaddata > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' DontMoveFingers ]
[ '\' UseOffs ]';'
Usage
The first time a pick is performed the user is prompted to select which mode the
pick should be performed in and an initialization process is performed. The
process initializes the suction limit for post grab evaluation (LimitHigh), the offset
to the position before and after the pick (Offset), the mass of the object (mass)
and the delaytime for triggering the suction (DelayTime) if in
YUMILIB_BALANCED_MODE or YUMILIB_FAST_MODE. If some parameter
in the pickdata is specified and not left as 0 or FALSE the parameter will not be
initialized but instead used in the initialization.
When the suction is triggered in advance it is important to use the same speed
and settings which is why a hash is used to detect if Speed, AccSet or Offset
has changed. In that case, the DelayTime is reinitialized.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized of the used pickdata will detect if there
are non-default fields and ask the user if they should be set to default.
Basic Example
PROC PickSuction1ErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine,tSuction;
PickSuction1 pPick,tSuction,pd1;
ENDPROC
PROC PickSuction1ErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tSuction;
PickSuction1 pPick,tSuction,pd1;
ERROR (YUMILIB_PICK_EMPTY, YUMILIB_PICK_INCORRECT_GRAB)
IF ERRNO=YUMILIB_PICK_EMPTY OR
ERRNO=YUMILIB_PICK_INCORRECT_GRAB THEN
StopMove\Quick;
TPWrite "Pick unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PickSuction1ErrorReturned()
!If pick is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tSuction;
WHILE nStatus<>PICK_SUCCESS DO
PickSuction1 pPick,tSuction,pd1\nStatus:=nStatus;
IF nStatus=PICK_COLLISION THEN
!add code here
ELSEIF nStatus=PICK_PRESSURE_TOO_HIGH THEN
!add code here
ENDIF
ENDWHILE
ENDPROC
Arguments
The pick position where the robot should pick the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The \Load argument describes the load used in the movement. The load is the payload
of the tool
If PrePos is specified the prepick position is calculated using PrePos instead off pd.Offset.
If PostPos is specified the postpick position is calculated using PostPos instead off
pd.Offset.
Limitations
In balanced and fast mode special settings are required for the pick to work properly. The time it
takes for the grippers to grip from a given position (pd.FingerPos) has to take less time than it
takes the robot to move between PrePick position and Pick postion. The pick is also affected by
the time it takes to move to PrePick position because the fingers have to reach pd.FingerPos
before continuing to Pick position.
In fast mode the distance between PrePick position and Pick position has to be at least 40 mm.
Syntax
PickSuction1
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Load' :=' < persistent (PERS) of loaddata > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
The first time a pick is performed the user is prompted to select which mode the
pick should be performed in and an initialization process is performed. The
process initializes the suction limit for post grab evaluation (LimitHigh), the offset
to the position before and after the pick (Offset), the mass of the object (mass)
and the delaytime for triggering the suction (DelayTime) if in
YUMILIB_BALANCED_MODE or YUMILIB_FAST_MODE. If some parameter
in the pickdata is specified and not left as 0 or FALSE the parameter will not be
initialized but instead used in the initialization.
When the suction is triggered in advance it is important to use the same speed
and settings which is why a hash is used to detect if Speed, AccSet or Offset
has changed. In that case, the DelayTime is reinitialized.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized of the used pickdata will detect if there
are non-default fields and ask the user if they should be set to default.
Basic Example
PROC PickSuction2ErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine,tSuction;
PickSuction2 pPick,tSuction,pd1;
ENDPROC
PROC PickSuction2ErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tSuction;
PickSuction2 pPick,tSuction,pd1;
ERROR (YUMILIB_PICK_EMPTY, YUMILIB_PICK_INCORRECT_GRAB)
IF ERRNO=YUMILIB_PICK_EMPTY OR
ERRNO=YUMILIB_PICK_INCORRECT_GRAB THEN
StopMove\Quick;
TPWrite "Pick unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PickSuction2ErrorReturned()
!If pick is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tSuction;
WHILE nStatus<>PICK_SUCCESS DO
PickSuction2 pPick,tSuction,pd1\nStatus:=nStatus;
IF nStatus=PICK_COLLISION THEN
!add code here
ELSEIF nStatus=PICK_PRESSURE_TOO_HIGH THEN
!add code here
ENDIF
ENDWHILE
ENDPROC
Arguments
The pick position where the robot should pick the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The \Load argument describes the load used in the movement. The load is the payload
of the tool
If PrePos is specified the prepick position is calculated using PrePos instead off pd.Offset.
If PostPos is specified the postpick position is calculated using PostPos instead off
pd.Offset.
Limitations
In balanced and fast mode special settings are required for the pick to work properly. The time it
takes for the grippers to grip from a given position (pd.FingerPos) has to take less time than it
takes the robot to move between PrePick position and Pick postion. The pick is also affected by
the time it takes to move to PrePick position because the fingers have to reach pd.FingerPos
before continuing to Pick position.
In fast mode the distance between PrePick position and Pick position has to be at least 40 mm.
Syntax
PickSuction2
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Load' :=' < persistent (PERS) of loaddata > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized of the used pickdata will detect if there
are non-default fields and ask the user if they should be set to default.
Basic Example
PROC PickPlungeErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine, tGripper;
PickPlunge pPick,tGripper,pd1;
ENDPROC
PROC PickPlungeErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
ENDPROC
PROC PickPlungeErrorReturned()
!If pick is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
Arguments
The movement should be performed using joint movement. If omitted PickPlunge desides
which movement to make.
The pick position where the robot should pick the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The \Load argument describes the load used in the movement. The load is the payload
of the tool
If PrePos is specified the prepick position is calculated using PrePos instead off pd.Offset.
If PostPos is specified the postpick position is calculated using PostPos instead off
pd.Offset.
Syntax
PickPlunge
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' Load' :=' < persistent (PERS) of loaddata > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
Place is used to go to a place position and place an object. The release direction
is decided based on the gripper status. The robot is moved via a preplace
position to a place position and then to a postplace position. Depending on the
input, the fingers can be triggered in advance to enable a faster place and
collision detection can be used.
The first time a place is performed the user is prompted to select which mode
the place should be performed in and an initialization process is performed. The
process initializes the finger post release position (FingerPos), finger limits for
post release evaluation (LimitLow, LimitHigh), the offset to the position before
and after the place (Offset) and the delaytime for triggering the fingers
(DelayTime) if in YUMILIB_FAST_MODE. If some parameter in the pickdata is
specified and not left as 0 or FALSE the parameter will not be initialized but
instead used in the initialization.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized will detect if there are non-default fields
and ask the user if they should be set to default.
Basic Example
PROC PlaceErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped. There is no
default error handler in YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
Place pPlace,tGripper,pd1;
ENDPROC
PROC PlaceErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PLACE_COLLISION;
BookErrNo YUMILIB_PLACE_OBJECT_NOT_PRESENT;
MoveY pStart,v300,fine,tGripper;
Place pPlace,tGripper,pd1;
ERROR (YUMILIB_PLACE_COLLISION,
YUMILIB_PLACE_OBJECT_NOT_PRESENT)
IF ERRNO=YUMILIB_PLACE_COLLISION OR ERRNO=
YUMILIB_PLACE_OBJECT_NOT_PRESENT THEN
StopMove\Quick;
TPWrite "Place unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PlaceErrorReturned()
!If place is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
ENDPROC
Arguments
The movement should be performed using joint movement. If omitted Place desides which
movement to make.
The movement should be performed using linear movement. If omitted Place desides
which movement to make.
The place position where the robot should place the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
If PrePos is specified the preplace position is calculated using PrePos instead off
pd.Offset.
If PostPos is specified the postplace position is calculated using PostPos instead off
pd.Offset.
Syntax
Place
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
The first time a place is performed the user is prompted to select which mode
the place should be performed in and an initialization process is performed. The
process initializes the suction limit for post release evaluation (LimitHigh), the
offset to the position before and after the place (Offset) and the delaytime for
triggering the suction (DelayTime) if in YUMILIB_FAST_MODE. If some
parameter in the pickdata is specified and not left as 0 or FALSE the parameter
will not be initialized but instead used in the initialization.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized will detect if there are non-default fields
and ask the user if they should be set to default.
Basic Example
PROC PlaceSuction1ErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped.
MoveY pStart,v300,fine,tSuction;
PlaceSuction1 pPlace,tSuction,pd1;
ENDPROC
PROC PlaceSuction1ErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tSuction;
PlaceSuction1 pPlace,tSuction,pd1;
ERROR (YUMILIB_PLACE_COLLISION, BookErrNo
YUMILIB_PLACE_COLLISION;
BookErrNo YUMILIB_PLACE_OBJECT_NOT_PRESENT;
BookErrNo YUMILIB_PLACE_COLLISION;
BookErrNo YUMILIB_PLACE_OBJECT_NOT_PRESENT;
PLACE_OBJECT_NOT_PRESENT)
IF ERRNO=YUMILIB_PLACE_COLLISION OR ERRNO=
PLACE_OBJECT_NOT_PRESENT THEN
StopMove\Quick;
TPWrite "Place unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PlaceSuction1ErrorReturned()
!If place is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tSuction;
WHILE nStatus<> PICK_SUCCESS DO
PlaceSuction1 pPick,tSuction,pd1\nStatus:=nStatus;
IF nStatus= PLACE_COLLISION THEN
!add code here
ELSEIF nStatus= PLACE_OBJECT_NOT_PRESENT THEN
!add code here
ENDIF
ENDWHILE
ENDPROC
Arguments
The place position where the robot should place the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
If PrePos is specified the preplace position is calculated using PrePos instead off
pd.Offset.
If PostPos is specified the postplace position is calculated using PostPos instead off
pd.Offset.
Syntax
PlaceSuction1
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
The first time a place is performed the user is prompted to select which mode
the place should be performed in and an initialization process is performed. The
process initializes the suction limit for post release evaluation (LimitHigh), the
offset to the position before and after the place (Offset) and the delaytime for
triggering the suction (DelayTime) if in YUMILIB_FAST_MODE. If some
parameter in the pickdata is specified and not left as 0 or FALSE the parameter
will not be initialized but instead used in the initialization.
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized will detect if there are non-default fields
and ask the user if they should be set to default.
Basic Example
PROC PlaceSuction2ErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped. There is no
default error handler in YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tSuction;
PlaceSuction2 pPlace,tSuction,pd1;
ENDPROC
PROC PlaceSuction2ErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PICK_EMPTY;
BookErrNo YUMILIB_PICK_INCORRECT_GRAB;
MoveY pStart,v300,fine,tSuction;
PlaceSuction2 pPlace,tSuction,pd1;
ERROR (YUMILIB_PLACE_COLLISION, PLACE_OBJECT_NOT_PRESENT)
IF ERRNO=YUMILIB_PLACE_COLLISION OR ERRNO=
PLACE_OBJECT_NOT_PRESENT THEN
StopMove\Quick;
TPWrite "Place unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PlaceSuction2ErrorReturned()
!If place is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tSuction;
ENDPROC
Arguments
The place position where the robot should place the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
If PrePos is specified the preplace position is calculated using PrePos instead off
pd.Offset.
If PostPos is specified the postplace position is calculated using PostPos instead off
pd.Offset.
Syntax
PlaceSuction2
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
If an initialization is wanted with default values there is no need to set all values
to default. Changing the field Initialized will detect if there are non-default fields
and ask the user if they should be set to default.
Basic Example
PROC PlaceErrorDefault()
!If the pick is unsuccessful, the robot will try once
more and then wait until it is tapped. There is no
default error handler in YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
PlacePlunge pPlace,tGripper,pd1;
ENDPROC
PROC PlaceErrorHandler()
!Book errors and catch using error handler. Errors need
to be booked in YUMILIB_FAST_MODE.
BookErrNo YUMILIB_PLACE_COLLISION;
BookErrNo YUMILIB_PLACE_OBJECT_NOT_PRESENT;
MoveY pStart,v300,fine,tGripper;
PlacePlunge pPlace,tGripper,pd1;
ERROR (YUMILIB_PLACE_COLLISION,
YUMILIB_PLACE_OBJECT_NOT_PRESENT)
IF ERRNO=YUMILIB_PLACE_COLLISION OR ERRNO=
YUMILIB_PLACE_OBJECT_NOT_PRESENT THEN
StopMove\Quick;
TPWrite "Place unsuccessful";
ClearPath;
StartMove;
TRYNEXT;
ENDIF
ENDPROC
PROC PlaceErrorReturned()
!If place is unsuccessful, try again. The \nStatus has
higher priority than booking errors. If both are used,
the status will be returned. Not supported in
YUMILIB_FAST_MODE.
MoveY pStart,v300,fine,tGripper;
WHILE nStatus<> PICK_SUCCESS DO
PlacePlunge pPlace,tGripper,pd1\nStatus:=nStatus;
IF nStatus= PLACE_COLLISION THEN
!add code here
ELSEIF nStatus= PLACE_OBJECT_NOT_PRESENT THEN
!add code here
ENDIF
ENDWHILE
ENDPROC
Arguments
The movement should be performed using joint movement. If omitted PickPlunge desides
which movement to make.
The place position where the robot should place the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
If PrePos is specified the preplace position is calculated using PrePos instead off
pd.Offset.
If PostPos is specified the postplace position is calculated using PostPos instead off
pd.Offset.
Syntax
PlacePlunge
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ pd ':=' ] < persistent (PERS) of pickdata >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Usage
Drop is used to go to a place position and release an object. The robot is moved
directly to the place position.
Basic Example
PROC DropExample()
MoveY pStart,v300,fine, tGripper;
Drop pPlace,tGripper,pd1;
ENDPROC
Arguments
The movement should be performed using joint movement. If omitted Drop desides which
movement to make.
The movement should be performed using linear movement. If omitted Drop desides
which movement to make.
The place position where the robot should place the object.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
Syntax
Drop
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ]
[ '\' nFingerPos ':=' < expression (IN) of num > ]';'
Usage
IndexedPick is used to pick from a tray. The tray is defined using traydata to
store the information about the tray and the current index on the tray. In
IndexedPick a pick instruction is wrapped based on the pick mode:
The first time an IndexedPick is performed the user is prompted to define the
setup for the tray. The setup can be performed in two ways: from numerical input
or by showing the positions using leadthrough.
Numerically:
The distance between two objects and the number of objects in each direction
needs to be stated. Either before calling the instruction (by setting the fields in
the traydata) or by entering the values in the dialogues during initialization. The
positions are relative wobj0 or the WObj if the optional parameter is present.
psWObj (in the traydata) is not used unless defined before calling the instruction.
LeadThrough:
The user is prompted to move the arm using leadthrough to the last position in
each direction. Thereafter, the user is asked to specify how many objects are
present in each direction. With the input from the user a workobject, psWObj, is
calculated relative to either wobj0 or the WObj if the optional parameter is
present.
When running the instruction, the next object will be picked and nIndex in
traydata is increased.
Basic Example
Arguments
The movement should be performed using joint movement. If omitted Drop desides which
movement to make.
The movement should be performed using linear movement. If omitted Drop desides
which movement to make.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The traydata used to store the information about the tray setup and the current index.
If a pick procedure should be used instead of the default pick, it can be given instead of a
pickdata. The procedure must have a robtarget and a (PERS) tooldata and an optional
wobjdata named WObj as parameters, as in
If a feeder process should be called when no parts can be found. The feeder proc MUST
have VAR locatedata as input parameter. The syntax must be “ModuleName:ProcName”.
If specified, the status is returned. The status code for IndexedPick are:
If PrePos is specified the prepick position is calculated using PrePos instead off pd.Offset.
If PostPos is specified the postpick position is calculated using PostPos instead off
pd.Offset.
Program Execution
During the initialization, the user is guided through the configuration on the Flexpendant
App. The user specifies the dimensions of the tray by specifying up to four points. The
first position (origo) is the initial gripping position, then the user moves the robot to the
last position in each dimesion. The stacked blocks below illustrate how the user would
specify the positions of a 3D-tray:
Fig 1: The first Fig 2: The last Fig 3: The last Fig 4: The last
position of the items position in the first position in the position in the third
in the tray. dimension. The user second dimension. dimension. The user
will be asked to The user will be will be asked to
specify the number asked to specify the specify the number
of items in that number of items in of items in that
direction. that direction. direction.
The positions of the parts will be calculated with uniform distance linearly between the
corners of the tray. Trays with a single row of items (1D) or a 2D-grid are specified by
omitting the last dimension(s). The directions of the axes of the tray can be tilted or
specified in arbitrary order, for example a stack of items can be an generated using a
1D IndexPick from top to bottom as illustrated by figures 6 and 7.
The position of the tray can be updated using the optional workobject parameter WObj
to IndexPick, for example WObj_vision. VisionIndexPick generates code for locating the
tray followed by an IndexPick relative to WObj_vision.
Syntax
IndexedPick
[ '\' J ',']
[ '\' L ',']
[ pPick' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ td ':=' ] < persistent (PERS) of traydata >
[ '\' pd ':=' ] < persistent (PERS) of pickdata >
[ '\' sPickProc ':=' ] < expression (IN) of string >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' nStatusPick ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' DontMoveFingers ]
[ '\' UseOffs ]';'
Usage
The first time a IndexedPlace is performed the user is prompted to define the
setup for the tray. The setup can be performed in two ways: from numerical input
or by showing the positions using leadthrough.
Numerically:
The distance between two objects and the number of objects in each direction
needs to be stated. Either before calling the instruction (by setting the fields in
the traydata) or by entering the values in the dialogues during initialization. The
positions are relative wobj0 or the WObj if the optional parameter is present.
psWObj (in traydata) is not used unless defined before calling the instruction.
LeadThrough:
The user is prompted to move the arm using leadthrough to the last position in
each direction. Thereafter, the user is asked to specify how many objects are
present in each direction. With the input from the user a workobject, psWObj, is
calculated relative to either wobj0 or the WObj if the optional parameter is
present.
When running the instruction, the next object will be placed and nIndex in
traydata is increased.
Basic Example
Arguments
The movement should be performed using joint movement. If omitted Drop desides which
movement to make.
The movement should be performed using linear movement. If omitted Drop desides
which movement to make.
Speed data for the movement. This argument can be omitted. In that case, the speeddata
refers to v1000.
Zonedata for the movement. This argument can be omitted. In that case, the zonedata
refers to z10.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
The traydata used to store the information about the tray setup and the current index.
If a palce procedure should be used instead of the default place, it can be given instead
of a pickdata. The procedure must have a robtarget and a (PERS) tooldata and an optional
wobjdata named WObj as parameters, as in
If a feeder process should be called when no parts can be found. The feeder proc MUST
have VAR locatedata as input parameter. The syntax must be “ModuleName:ProcName”.
If specified, the status is returned. The status code for IndexedPick are:
If PrePos is specified the preplace position is calculated using PrePos instead off
pd.Offset.
If PostPos is specified the postpick position is calculated using PostPos instead off
pd.Offset.
Program Execution
During the configuration, the user is guided through a similar setup as IndexPick.
Syntax
IndexedPlace
[ '\' J ',']
[ '\' L ',']
[ pPlace' :=' ] < expression (IN) of robtarget >
[ '\' Speed ':=' < expression (IN) of speeddata > ]
[ '\' Zone ':=' < expression (IN) of zonedata > ] ','
[ Tool ':=' ] < persistent (PERS) of tooldata >
[ '\' WObj ':=' < persistent (PERS) of wobjdata > ] ','
[ td ':=' ] < persistent (PERS) of traydata >
[ '\' pd ':=' ] < persistent (PERS) of pickdata >
[ '\' sPlaceProc ':=' ] < expression (IN) of string >
[ '\' nStatus ':=' < variable (VAR) of num > ]
[ '\' nStatusPick ':=' < variable (VAR) of num > ]
[ '\' PrePos' :=' < expression (IN) of pos > ]
[ '\' PostPos' :=' < expression (IN) of pos > ]
[ '\' UseOffs ]';'
Useage
CalControl is used to control the joint calibration of each YuMi Arm. In case of
wrong or missing revolution counters, the arm will recalibrate the revolution
counter automaticly. In case of changet fine calibration value, you will get an
Error log and the operator neets to acknoledge on TPU the next steps.
Basic Example
CalControl;
Make a calibration control of all joints.
CalControl\j5\j6\j7;
Make a calibration control of joint 5, 6 and 7.
CalControl\jReset;
Reset and reseurch the revolution counter and the limits for calibration control
for all joints.
CalControl\j1\jReset;
Reset and reseurch the revolution counter and the limits for calibration control
for joint 1.
Arguments
Switch to reset and reseurch the revolution counter and the limits for calibration control
for all joints or selectet joints.
Syntax
CalControl
[ '\' j1 ]
[ '\' j2 ]
[ '\' j3 ]
[ '\' j4 ]
[ '\' j5 ]
[ '\' j6 ]
[ '\' j7 ]
[ '\' jReset ] ';'
Error handling
The following recoverable errors can be generated. The errors can be handled
in an ERROR handler. The system variable ERRNO will be set to:
Usage
Basic Example
SetVisionTool ld
The vision tool in the locatedata ld is set to the active tool.
Arguments
SetVisionTool ld
Syntax
SetVisionTool
[ ld ':=' ] < persistent (PERS) of locatedata > ';'
Usage
Basic Example
Arguments
Name of the RAPID procedure to be executed after a time delay. The procedure call is a
late binding call, and therefore inherits its properties. The syntax must be
“ModuleName:ProcName”.
Syntax
DelayedCall
[ procName ':=' ] < expressin (IN) of sting > ','
[ time ':=' ] < expressin (IN) of num > ';'
5.3 Functions
LocatePart – Locate single part using the hand camera
Usage
Basic Example
Arguments
The position where the robot should take an image and locate the part.
The work object (tool coordinate system) to which the robot position is referenced in the
instruction. This argument can be omitted. In that case, the position refers to the world
coordinate system.
Syntax
pLocate
[ pLocate ':=' ] < expression (IN) of robtarget >','
[ vLocate ':=' ] < expression (IN) of speeddata >','
[ tCamera ':=' < persistent (PERS) of tooldata > ]
[ '\' Wobj ':=' < expression (INOUT) of workobject > ]','
[ sVisionToolName ':=' ] < expression (IN) of string >','
[ sVisionToolName ':=' < expression (INOUT) of
cameratarget > ]';'
Usage
Basic Example
Arguments
Taskno
Syntax
Taskno';'
The modules YuMiLib_Params_L and YuMiLib_Params_R contain constants for a default YuMi
robot.
The first set of parameters declare the loaddata for the standard configurations of the YuMi
Smartgrippers. The parameter names are suffixed with an S for standard two finger gripper, C
for camera, V1 for one vacuum cup and V2 for two vacuum cups.
CONST loaddata ld_YuMiGripper_S:=[0.230,[8.2,11.7,52.0],[1,0,0,0],0.00021,0.00024,0.00009];
CONST loaddata ld_YuMiGripper_S_V1:=[0.248,[8.6,11.7,52.7],[1,0,0,0],0.00021,0.00024,0.00009];
CONST loaddata ld_YuMiGripper_S_V1_V2:=[0.280,[7.1,11.9,47.3],[1,0,0,0],0.00025,0.00029,0.00012];
CONST loaddata ld_YuMiGripper_S_C:=[0.244,[7.5,11.8,52.7],[1,0,0,0],0.00021,0.00023,0.00008];
CONST loaddata ld_YuMiGripper_S_C_V1:=[0.262,[7.8,11.9,50.7],[1,0,0,0],0.00022,0.00024,0.00009];
The next set of parameters configure the camera calibration and should not be changed:
The vision and the tray workobjects are declared as global variables and used in Vision and
Indexed instructions:
The module defines the tooldata for the standard fingers for TCP and vacuum cups respectively:
The module contains task specific parameters. The following parameters in the right task are
used in the camera calibration:
The left task has an equivalent set of parameters. The string CameraName defines the name of
the right and the left camera respectively. During the camera calibration procedure, the robot
uses the ABB logo on the opposite gripper to calibrate the camera by taking images at different
distances. The robtargets pCamera_Calib_Near and pCamera_Calib_Far are two initial
positions used in the procedure as shown in Fig. 1 and Fig.2. The pShowABBLogo is the position
where the robot shows the ABB logo for the camera on the opposite hand.
The x, z and elbow values in these three positions can be changed to adjust the positions of
the calibration procedure, e.g., if the workspace is constrained. In Fig.3, pCamera_Calib_Near
and pCamera_Calib_Far have z value 500 (+100) and elbow angles -170 on the left arm, and
similarly, pShowABBLogo on the right task has been translated +100 mm in z-direction to 505
and the elbow angle is set to 170.
pShowABBLogo:=[[405+15,-150,505],[0,0,0,1],[1,0,-1,4],[170,9E+09,9E+09,9E+09,9E+09,9E+09]];
The flange positions of the arms are named WObj_FollowRobL and WObj_FollowRobR
respectively:
These workobjects can be used to define a robtarget relative to the other arm.