CALL transfer.fp args[], error)
args[ ] Real array containing the arguments for this statement. The individual elements are described below:
APPROACH path
[1] Optional Path database record number that specifies the path to use when approaching the part feeder. The value of this element must be 0 if no path is specified.PART part
[2] Part database record number, specifying which part is to be transferred.APPROACH path
[3] Optional Path database record number, specifying the path to follow when moving from the part feeder to where the part is viewed to visually determine its location with respect to the robot. The value of this element must be 0 if no path is specified.REFINE vision
[4] Optional Vision database record number, specifying the vision operation to evaluate in order to determine the part location and refine the tool transformation. This operation must return "frame" type data. The value of this element must be 0 if no vision refinement is specified.AND vision
[5] Optional Vision database record number that specifies the vision operation to evaluate in order to further determine the part location, refine the tool transformation, and compensate for any translational errors in the camera location. This vision operation must return "frame" type data. The value of this argument must be 0 if no vision refinement is specified. This element is ignored if args[4] is zero.REJECT path
[6] Optional Path database record number that specifies the path to follow to reject the part if the part refinement fails. The value of this element must be 0 if no path is specified.ALONG path
[7] Optional Path database record number, specifying the path to follow when moving from the part refinement location to the assembly location. The value of this element must be 0 if no path is specified.LOCATE vision
[8] Optional Vision database record number, specifying the vision operation to evaluate in order to visually locate the assembly position. The specified operation must return "frame" type data. The value of this element must be 0 if no visual assembly location is specified.TO board
[9] Assembly database record number, specifying the nominal location where the part is to be placed. This location is used when positioning the camera to visually determine the assembly location. This record is found in the current Assembly database associated with the current sequence.DEPART path
[10] Optional Path database record number, specifying the path to follow when departing from the assembly location if the transfer succeeds. The value of this element must be 0 if no path is specified.USING tool
[11] Optional Tool database record number, specifying the tool to use when performing this transfer operation if the tool specified in the Part Type database is not desired. The value of this element must be 0 if the tool specified in the Part Type database is to be used.REJECT path
[12] Optional Path database record number, specifying the reject path to follow when departing from the assembly location if the visual inspection of the assembly location fails or the insert operation fails. The value of this element must be 0 if no path is specified.OK_SIGNAL variable
[13] An optional code for a Variable database output variable that receives -1 if all the robot motions and strategies complete without error, and 0 if any fail. This argument should be set to the value of the global variable va.undef.var if the clause is omitted.error Real variable that receives a value indicating whether or not the operation was successful, and what action should be taken by the calling routine. See the standard AIM operator error response code values.
rn.frame[ ] Transformation array variable that contains the current dynamic reference frame value for each task. The element rn.frame[TASK( )] receives the nominal assembly location during processing of this statement to allow the second vision operation to be specified relative to the assembly location.
This statement routine performs a transfer operation using vision sensing to improve placement accuracy. During the transfer operation the statement can optionally inspect and refine the position of a part held by the robot, and/or inspect and locate a single assembly location prior to placement. To visually determine the reference frame for an entire assembly, you should use the LOCATE.ASSEMBLY statement.
All the vision operations in this statement are optional. If no vision operation is needed, the simpler TRANSFER statement should be used, since it is more efficient than TRANSFER.FP.
The first and second vision operations refine the position of the part held in the robot gripper. These vision operations are specified in the optional clauses and the operations are passed to this routine as args[4] and args[5]. No visual part-position refinement is performed if args[4] is zero (that is, the "REFINE" clause is not specified).
Processing of the part-position refinement is done as follows: After the part has been acquired, if the optional first vision operation is specified, the robot moves to position the part in front of a stationary camera, where the part is located using the second vision operation. If the optional second vision operation is specified, the robot rotates the part 180 degrees about the tool-Z axis and then locates the part a second time using the second vision operation-this compensates for translational errors in the stationary position. The locations determined visually are used to correct the robot tool transformation before the part is placed.
The optional third vision operation determines the assembly location where the part is placed. The operation is passed to this routine as args[8]. No visual assembly location is defined if args[8] is zero (that is, the "LOCATE" clause is not specified).
When the third vision operation is specified, before the part is placed at the assembly location, the robot moves to position a robot-mounted camera where it can view the assembly location. A vision operation inspects, and precisely determines, this location by directly viewing pads or fiducial marks.
The exact series of robot motions performed by the TRANSFER.FP statement is determined by the strategy routines and the data values specified in the various arguments. The general sequence of operations performed by this statement is as follows (the relevant portion of the statement syntax is shown for each step):
1. If the optional tool transformation is specified, apply that tool to describe the current robot gripper. ({USING tool})
2. If the optional approach path is specified, move along that path to the feeder locations. ({APPROACH path})
3. Select a feeder and pick up a part by executing a part-acquisition strategy routine rn.acquire( ). (PART part)
4. If the optional transit path is specified, move along that path to the vision refinement location. ({APPROACH path})
5. If the first optional vision refinement is specified, move to each of the picture-taking locations, inspect the part, and compute the part position. Save a robot tool-adjustment value based on the vision results. ({REFINE vision ...})
6. If the first optional vision refinement succeeds and the second optional vision refinement is specified, rotate the part 180 degrees, move to each of the picture-taking locations, inspect the part, and compute the part position. Modify the saved robot tool-adjustment value based on the vision results to compensate for any errors in the camera position. ({AND vision})
7. If either vision refinement inspection fails and the optional reject path is specified, follow the reject path and discard the bad part. ({REJECT path})
(In this case, if the optional reject path is not specified, AIM stops processing the sequence and sends an error message to the operator.)
8. If the optional transit path is specified, move along that path to the assembly location. ({ALONG path})
9. If the optional vision assembly-locating operation is specified, move to each of the picture-taking locations, inspect the assembly location and compute the precise assembly location using the vision runtime routine rn.vis.pic.list( ). Adjust the robot TOOL based on the vision results. ({LOCATE vision})
10. If one or both of the optional visual part-position refinement operations were performed (see above), apply the saved robot tool-adjustment value to the robot TOOL to compensate for any error in grasping the part.
11. Insert the part into the assembly by executing the part-insertion strategy routine rn.insert( ). (TO assembly)
12. If the visual inspection fails or the insertion fails, and the optional reject path is specified, follow the reject path and discard the bad part. ({REJECT path}) In this case, if the optional reject path is not specified, AIM stops processing the sequence and sends an error message to the operator.
13. If the optional departure path is specified, depart from the assembly area along that path. ({DEPART path})
14. If the insert operation succeeds, set the OK_SIGNAL variable to TRUE. Otherwise, set it to FALSE.
The following general items should be observed when defining data for this statement:
1. A part type and at least one feeder must be assigned to each part in the Part database.
2. All location data must be taught with the proper tool transformation in place.
3. The camera calibration(s) for the vision locations must have been performed with the proper tool transformation in place.
When defining data for the first and second vision operations ({REFINE vision {AND vision}}), the following points should be observed:
1. The vision operation should return a reference frame result that determines the position and orientation of the part being grasped by the robot.
2. The vision operation should reference a stationary camera.
3. The picture record should have Vision target location selected for the location and a path name specified in the PATH name data box.
4. The specified path record controls the motion parameters for moving to the picture-taking location. These parameters include speed, motion type, etc.
5. This path record also controls the offset of the vision target with respect to the robot tool tip. The path reference frame must be set to World. The path location is an offset, in robot coordinates, for the vision target. The value NULL causes the tool tip to be used as the vision target. Nonzero values for X, Y, and roll move and rotate the vision target within the vision plane.
6. When debugging the refinement operation, you should observe the robot TOOL transformation before and after the refinement. If it changes drastically, either the camera calibration is incorrect, the parameters are set up incorrectly in the picture or camera records, or the parameters are set up incorrectly for the associated path.
When defining data for the third vision operation (LOCATE vision), the following items should be observed:
1. The vision operation should return a reference frame result that determines the position and orientation of the assembly location where the part is to be placed.
2. The vision operation should reference a robot-mounted camera.
3. The picture record should have Vision target location selected for the location and a path name specified in the PATH name data box.
4. The specified path record controls the motion parameters for moving to the picture-taking location. These parameters include speed, motion type, etc.
5. This path record also controls the offset of the vision target with respect to the nominal assembly location. The path reference frame must be set to Dynamic. The path location is an offset, in robot coordinates, for the vision target. The value NULL causes the center of the assembly location to be used as the vision target. Nonzero values for X and Y move the vision target within the vision plane. If the camera is not mounted on the final link of the robot, the values of Z and orientation control the tool height and orientation with respect to the assembly location when the picture is taken.
NOTE: To position the tool above the assembly, a negative Z offset is required.
6. When debugging the locate operation, you should observe the robot TOOL transformation before and after the location correction. If the value changes drastically, either the camera calibration is incorrect, the parameters are set up incorrectly in the picture or camera records, or the parameters are set up incorrectly for the associated path.
For more details, see the descriptions of the routines rn.acquire( ) and rn.insert( ) in This Topic, and the routine rn.vis.pic.list( ) in the instruction manual for your robot.