VxCalib Statement

This command is only for use with external vision systems and cannot be used with Vision Guide.

Creates calibration data for an external vision system.

Syntax
(1) VxCalib CalNo

(2) VxCalib CalNo, CamOrient, P(pixel_st : pixel_ed), P(robot_st : robot_ed) [, TwoRefPoints]

(3) VxCalib CalNo, CamOrient, P(pixel_st : pixel_ed), P(robot_st : robot_ed),P(ref0) [, P(ref180)]

Parameters

CalNo
Specify the calibration data number as an integer value. The range is from 0 to 15; up to 16 calibrations may be defined.
CamOrient
Specify the camera mounting direction with one of the following integer values: 1 to 3: Available only for syntax (2). 4 to 7: Available only for syntax (3).

  • 1: Standalone
  • 2: Fixed downward
  • 3: Fixed upward
  • 4: Mobile on Joint #2
  • 5: Mobile on Joint #4
  • 6: Mobile on Joint #5
  • 7: Mobile on Joint #6
P(pixel_st : pixel_ed)
Specify the Pixel coordinates (X, Y only) using the continuous point data.
P(robot_st : robot_ed)
Specify the robot coordinates using the continuous point data. The point data varies with mounting directions of the camera specified by CamOrient. If CamOrient = 1 to 3: The robot coordinates must be set to the current TOOL and ARM values. If CamOrient = 4 to 7: The robot coordinates must be set as TOOL: 0, ARM: 0.
TwoRefPoints
Available for syntax (1). True, when using two measuring points. False, when using one measuring point. Specifying two measuring points makes the calibration more accurate. Optional. Default: False
P(ref0)
Available for syntax (3). Specifies the robot coordinates of the reference point using the point data.
P(ref180)
Available for syntax (3). Specifies the robot coordinates of the second reference point using the point data. Specifying two reference points makes the calibration more accurate. Optional.

Description
The VxCalib command calculates the vision calibration data for the specified calibration number using the specified camera orientation, pixel coordinates, robot coordinates, and reference points (Mobile camera only) given by the parameter.

When you specify only CalNo, the point data and other settings you defined are displayed (only from the Command Window).

The following figure shows the coordinates system of the pixel coordinates. (Units: pixel)

For the pixel coordinates and robot coordinates, set the top left position of the window as Point 1 and set the bottom right position as Point 9 according to the order in the table below. It is classified into the four categories by the parameter CamOrient and TwoRefPoints.

1) CamOrient = 1 to 3 (Standalone, Fixed Downward, Fixed Upward), TwoRefPoints = False

Data order Position Pixel coordinates Robot coordinates
1 Top left Detection coordinates 1 Measuring point coordinates 1
2 Top center Detection coordinates 2 Measuring point coordinates 2
3 Top right Detection coordinates 3 Measuring point coordinates 3
4 Center right Detection coordinates 4 Measuring point coordinates 4
5 Center Detection coordinates 5 Measuring point coordinates 5
6 Center left Detection coordinates 6 Measuring point coordinates 6
7 Bottom left Detection coordinates 7 Measuring point coordinates 7
8 Bottom center Detection coordinates 8 Measuring point coordinates 8
9 Bottom right Detection coordinates 9 Measuring point coordinates 9

2) CamOrient = 2 (Fixed Downward), TwoRefPoints = True

Note: When the tool is exactly defined, TwoRefPoints is not necessary and should be set to False.

By setting TwoRefPoints to True, two measuring points are used for each calibration position, which makes the calibration more accurate.

18 robot points are required.

After setting 1 to 9 measuring points coordinates, turn the U axis by 180 degrees and set the measuring point coordinates 10 to 18 where the hand (such as the rod) is positioned at the calibration target position.

Data order Position Pixel coordinates Robot coordinates
1 Top left Detection coordinates 1 Measuring point coordinates 1
2 Top center Detection coordinates 2 Measuring point coordinates 2
3 Top right Detection coordinates 3 Measuring point coordinates 3
4 Center right Detection coordinates 4 Measuring point coordinates 4
5 Center Detection coordinates 5 Measuring point coordinates 5
6 Center left Detection coordinates 6 Measuring point coordinates 6
7 Bottom left Detection coordinates 7 Measuring point coordinates 7
8 Bottom center Detection coordinates 8 Measuring point coordinates 8
9 Bottom right Detection coordinates 9 Measuring point coordinates 9
10 Top left - - - Measuring point coordinates 10
11 Top center - - - Measuring point coordinates 11
12 Top right - - - Measuring point coordinates 12
13 Center right - - - Measuring point coordinates 13
14 Center - - - Measuring point coordinates 14
15 Center left - - - Measuring point coordinates 15
16 Bottom left - - - Measuring point coordinates 16
17 Bottom center - - - Measuring point coordinates 17
18 Bottom right - - - Measuring point coordinates 18

3) CamOrient = 3 (Fixed Upward), TwoRefPoints = True

Note: When the tool is exactly defined, TwoRefPoints is not necessary and should be set to False.

By setting TwoRefPoints to True, two detection points are used, which makes the calibration more accurate.

For only the pixel coordinates, 18 points are required.

After setting 1 to 9 detection coordinates at the each measuring point coordinates at 0 degrees, set the detection coordinates for points 10 to 18 at 180 degrees.

Data order Position Pixel coordinates Robot coordinates
1 Top left Detection coordinates 1 Measuring point coordinates 1
2 Top center Detection coordinates 2 Measuring point coordinates 2
3 Top right Detection coordinates 3 Measuring point coordinates 3
4 Center right Detection coordinates 4 Measuring point coordinates 4
5 Center Detection coordinates 5 Measuring point coordinates 5
6 Center left Detection coordinates 6 Measuring point coordinates 6
7 Bottom left Detection coordinates 7 Measuring point coordinates 7
8 Bottom center Detection coordinates 8 Measuring point coordinates 8
9 Bottom right Detection coordinates 9 Measuring point coordinates 9
10 Top left Detection coordinates 10 - - -
11 Top center Detection coordinates 11 - - -
12 Top right Detection coordinates 12 - - -
13 Center right Detection coordinates 13 - - -
14 Center Detection coordinates 14 - - -
15 Center left Detection coordinates 15 - - -
16 Bottom left Detection coordinates 16 - - -
17 Bottom center Detection coordinates 17 - - -
18 Bottom right Detection coordinates 18 - - -

4) CamOrient = 4 to 7

Data order Position Pixel coordinates Robot coordinates
1 Top left Detection coordinates 1 Measuring point coordinates 1
2 Top center Detection coordinates 2 Measuring point coordinates 2
3 Top right Detection coordinates 3 Measuring point coordinates 3
4 Center right Detection coordinates 4 Measuring point coordinates 4
5 Center Detection coordinates 5 Measuring point coordinates 5
6 Center left Detection coordinates 6 Measuring point coordinates 6
7 Bottom left Detection coordinates 7 Measuring point coordinates 7
8 Bottom center Detection coordinates 8 Measuring point coordinates 8
9 Bottom right Detection coordinates 9 Measuring point coordinates 9

Note


  • In addition to the tables above, specify the robot coordinates of the reference points.

    Using the two reference points makes the calibration more accurate. In this case, it needs two points which gap of U axis is 180 degrees.

    After setting the first reference points coordinates, turn the U axis by 180 degrees and set the second reference points coordinates where the hand (such as the rod) is positioned at the calibration target position. When the tool is exactly defined, the two reference points are not necessary.


See Also
VxTrans Function, VxCalInfo Function, VxCalDelete, VxCalSave, VxCalLoad

VxCalib Statement Example

Function MobileJ2

  Integer i
  Double d(8)

  Robot 1
  LoadPoints "MobileJ2.pts"

  VxCalib 0, 4, P(21:29), P(1:9), P(0)

  If (VxCalInfo(0, 1) = True) Then
    For i = 0 To 7
      d(i) = VxCalInfo(0, i + 2)
    Next i
    Print "Calibration result:"
    Print d(0), d(1), d(2), d(3), d(4), d(5), d(6), d(7)

    P52 = VxTrans(0, P51, P50)
    Print "Coordinates conversion result:"
    Print P52
    SavePoints "MobileJ2.pts"
    VxCalSave "MobileJ2.caa"
  Else
    Print "Calibration failed"
  EndIf

Fend