Warning
You are reading the documentation for an older Pickit release (2.4). Documentation for the latest release (3.4) can be found here.
Fanuc Pickit interface
This article documents the interface of the Fanuc Pickit integration. For installation instructions, please refer to the Fanuc installation and setup article.
Pickit macros
Below you find an overview of the macros defined by Pickit.
Tip
The macros can be assigned to hotkeys on the teach pendant. This is done in MENU > SETUP > Macro.
Socket communication macros
These are all the macros used in the socket communication between the robot and Pickit. For more details on these macros, refer to Pickit socket interface.
Macro name |
Comment |
Input arguments |
---|---|---|
PI_BUILD_BACKGROUND |
Build the background cloud used in Advanced filters. |
/ |
PI_CALIBRATE |
Trigger a detection of the robot-camera calibration plate. |
/ |
PI_CAPTURE_IMAGE |
Trigger Pickit to capture a camera image to be used by a following PI_PROCESS_IMAGE command. |
/ |
PI_CONFIGURE |
Load the specified setup and product Configuration. |
setup, product |
PI_DETECTION_WITH_RETRIES |
Repeatedly trigger a Pickit object detection as long as nothing is found and the ROI is not empty, up to a number of attempts. |
retries |
PI_GET_PICK_POINT_DATA |
Request the pick point ID and pick point offset of the last requested object. |
/ |
PI_LOOK_FOR_OBJECT |
Trigger a Pickit object detection using the currently active setup and product Configuration. |
/ |
PI_NEXT_OBJECT |
Request the next detected object. |
/ |
PI_OPEN_COMMUNICATION |
Starts the socket communication with Pickit. |
/ |
PI_PROCESS_IMAGE |
Trigger an object detection on the camera image that was previously captured via PI_CAPTURE_IMAGE command (or PI_LOOK_FOR_OBJECT). |
/ |
PI_RUN |
Check the current mode of Pickit. |
/ |
PI_SAVE_SCENE |
Save a Snapshots with the latest detection results. |
/ |
PI_WAIT |
Wait for Pickit reply with detection results. PI_WAIT should always be the next Pickit command after a PI_LOOK_FOR_OBJECT, PI_NEXT_OBJECT or PI_DETECTION_WITH_RETRIES request. |
/ |
Helper macros
Other macros not directly communicating with Pickit are also available to simplify the pick and place programming.
Macro name |
Comment |
Input arguments |
---|---|---|
PI_SET_PICK_POSE |
Get the current configuration of the robot. This is used as base configuration for calculated pick positions. |
/ |
PI_SET_OFFSET |
Create the pose resister in PR[PR_id] with all elements set to 0 except Z set to Z_offset. It is useful to create pre and post pick offsets. |
Z_offset, PR_id |
PI_REACH |
Check if |
/ |
Pickit registers
Below you find an overview of the variables used by Pickit. When using Pickit these variables cannot be used for anything else. More information about the variables can be found in Pickit socket interface.
Variable |
Field name |
Comment |
Type |
---|---|---|---|
R[141] |
command |
command from robot to Pickit |
Output |
R[142] |
setup |
setup file ID known by the Pickit system |
Output |
R[143] |
product |
product file ID known by the Pickit system |
Output |
R[144] |
retries |
maximum number of retries for a Pickit detection |
Output |
R[149] |
comm status |
used to check if socket communication is running |
Input |
R[150] |
object status |
Pickit status of the object: OBJECT_FOUND, NO_OBJECTS, NO_IMAGE_CAPTURED or EMPTY_ROI |
Input |
R[151] |
status |
Pickit response to previously received robot commands |
Input |
R[152] |
obj age |
amount of time that has passed between the capturing of the camera data and the moment the object information is sent to the robot |
Input |
R[153] |
obj remaining |
number of remaining objects that can be sent in next messages to the robot |
Input |
R[154]-R[156] |
obj dim 1-3 |
[0]: length or diameter (mm) [1]: width or diameter (mm) [2]: height (mm) |
Input |
R[157] |
model id |
Input |
|
R[158] |
pick id |
ID of the pick point that was selected for the given object |
Input |
R[159] |
pick ref id |
ID of the selected pick point’s reference pick point |
Input |
R[160] |
reachability |
Set by PI_REACH to 0 if pre pick, pick and post pick pose are reachable |
Output |
PR[51] |
pick pose |
object pose expressed relatively to the robot base frame |
Input |
PR[52] |
pick offset |
pick point offset of the last requested object |
Input |
PR[53] |
x rot |
helper pose to calculate a correct offset pose |
Internal |
Tip
If these registers are already used on your robot, please contact us at support@pickit3d.com, and we will assist you in finding a solution.
Using pick offset in a robot program
To use the pick offset in a robot program, first a fixed pose has to be taught.
Then the offset can be applied to this fixed pose to correct from picking with an offset.
Following example shows how the pose drop off is corrected: J P[3:drop off] 100% FINE Tool_Offset,PR[52:pi pick offset]
.
Low level reachability check
The reachability check is performed by a low level karel program implemented by Pickit, namely PICKIT_REACH. Advance users can directly use it (see documentation below).
PICKIT_REACH (pr_id, offset_id)
Check reachability of "PR[pr_id], Tool_Offset, PR[offset_id]"
Note, currently active uframe and tool are used
tp_param[1]: input: pr_id , Id of the PR to check the reach
tp_param[2]: input: offset_id, Id of the tool_offset to add to the pose (OPTIONAL)
Returns results in R[160], 0 if rechable, 1 otherwise