VDefTool Statement

Applies To
Vision Calibration

Description
VDefTool uses vision detection to calculate a tool offset value for TCP and mobile camera position.

Usage

VDefTool  ToolNumber, ToolDefType, Sequence, [FinalAngle],[InitialAngle],[TargetTolerance],[RobotSpeed],[RobotAccel]

If ToolDefType is VISION_DEFTOOL_FIXEDWITHCAL, this usage is not available. Please use the following usages.

VDefTool  ToolNumber, VISION_DEFTOOL_FIXEDWITHCAL, Sequence.Object, [FinalAngle],[InitialAngle],[TargetTolerance],[RobotSpeed],[RobotAccel]
ToolNumber
Integer variable that contains the tool number to perform tool set (1 to 15).
ToolDefType
Integer variable that contains the tool type.
See below for details of the vision constant values.

Vision Constants

  • VISION_DEFTOOL_FIXEDNOCAL: Tool set by using the fixed camera which is not calibrated.
  • VISION_DEFTOOL_J4CAM: Calculates the center of the mobile J4 camera image.
  • VISION_DEFTOOL_J6CAM: Calculates the center of the mobile J6 camera image.
  • VISION_DEFTOOL_FIXEDWITHCAL: Tool set using a calibrated upward camera.
Sequence
Name of a sequence or string expression containing a sequence name
FinalAngle
Real variable containing the angle (degrees) used to rotate the tool or camera tool.
Value range: 5 to 180, -5 to -180 [degrees]
Default: 90
When specifying positive value, rotate to +U-axis direction of the tool coordinate system. When specifying negative value, rotate to -U-axis direction of the tool coordinate system.
If omitted or “0” is specified, it is set to “90”.
InitialAngle
Real variable containing the angle (degrees) used to rotate the tool or camera tool when setting a temporary tool.
Value range: -10 to 10 [degrees]
Default: 5
When specifying positive value, rotate to +U-axis direction of the tool coordinate system. When specifying negative value, rotate to -U-axis direction of the tool coordinate system.
If omitted or “0” is specified, it is set to “5”.
Absolute value of this value must be smaller than that of FinalAngle.
TargetTolerance
Real variable displaying the pixel distance in which vision detection results are considered a match with the target position
Value range: 0, 0.1 to 3.0 pixels
Default: 1
If omitted or “0” is specified, it is set to “1”.
RobotSpeed
Integer variable displaying the speed of the robot (%)
Value range: 0 to 100
Default: 5
When set to “0”, or when left unspecified, this value will be set to “5”.
RobotAccel
Integer variable displaying the acceleration of the robot (%)
Value range: 0 to 99
Default: 5
When set to “0”, or when left unspecified, this value will be set to “5”.
Object
Name of an object or string expression containing an object name.

Remarks
VDefTool uses vision detection to calculate a tool offset value for TCP and mobile camera position.

If the tool type is the fixed camera, X and Y are set as tool offset of TCP. At this time, 0 is set for Z, U, V, and W. If the tool type is mobile J4 camera and J6 camera, X, Y, and U are set as tool offset for installation position of the mobile camera. At this time, 0 is set for Z, V, and W.

KEY POINTS


When the tool type is other than VISION_DEFTOOL_FIXEDWITHCAL, the robot operates automatically based on the detection results of the target. Be careful of interference between the robot and peripherals. Also, use with avoiding singularity nearby posture that each axis extends to prevent an error during the tool set.

See Also
VDefArm Statement, VDefGetMotionRange Statement, VDefLocal Statement, VDefSetMotionRange Statement, VGoCenter Statement