4-280
Detailed explanation of command words
PVSCal (PVS calibration)
[Function]
Changes the vision sensor image coordinate to the robot world coordinate using the vision sensor calibra-
tion data (parameters from VSCALB 1 to VSCALB 8) set by 2D vision calibration function of RT ToolBox2.
[Format].
[Terminology]
<Position Variables>
Specifies the position variable to assign.
Returns the robot world coordinate for the calculation result of the coordinate
conversions.
<Calibration Number>
Specify the vision sensor calibration data to be used for the coordinate con-
version with the number of parameters from VSCALB 1 to VSCALB 8.
<Vision X>
X pixel coordinate of the vision sensor. [pixel]
<Vision Y>
Y pixel coordinate of the vision sensor. [pixel]
<Vision
θ
>
θ
pixel coordinate of the vision sensor. [deg.]
<Reference Position Variables> Specify the reference position as s position constant or position variable.
When attaching a camera to the hand, specify the robot position (at the time
of the image recognition) where the image is recognized with the vision sensor
as a reference position. The relative calculation is performed as follows.
<Robot position at the time of the image recognition>*<Calculation result
of the coordinate conversion>
When omitted, the absolute coordinate is set.
[Reference Program]
1 ' Start the target vision sensor with Open/Print/Input command to substitute the acquired image coordi-
nate [pixel] for numeric variable.
2 ' MX= X [pixcel] of the vision sensor
3 ' MY= Y [pixcel] of the vision sensor
4 ' MT=
θ
[deg.] of the vision sensor
5 PVS=PVSCal(1,MX,MY,MT)
' Changes the image coordinate to the robot (world) coordinate
with Calibration 1.
6 PVS.Z=PDST.Z
' Specifies Z height.
7 Mov PVS,-50
' Moves to a position 50 mm above the calculated position.
8 Mvs PVS
' Moves to the calculated position.
[Explanation]
(1) Changes the vision sensor image coordinate to the robot world coordinate using the vision sensor cali-
bration data (parameters from VSCALB 1 to VSCALB 8).
Use the 2D vision calibration function of RT ToolBox2 to set the parameters from VSCALB 1 to VSCALB
8 to be used for the coordinate conversion for the advanced settings.
(2) If the calibration numbers other than 1 to 8 are set, error L3110 (Arg. value range over) occurs.
(3) If the numbers of argument are not either four or five, error L3120 (No. of arg. is over) occurs.
(4) If the type of arguments is different, error L3810 (Different argument type) occurs.
[Related parameter]
VSCALB1 to 8
<Position Variables>=PVSCal<Calibration Number>, <Vision X>,
<Vision Y>, <Vision
θ
> [, <Reference Position Variables>]