4 Calibration assistance function
4-40 Workpiece coordinate calibration
(4-4) Set condition data of robot
Open sample program "WRKCALB.prg" with T/B or RT ToolBox 3, please change condition data as
necessary.
The condition data can be changed by setting the position variable / program change.
The position variable and program description are as follows.
① Position variable
Vision resolution (Pixel value in X direction)[pixel]
Vision resolution (Pixel value in X direction)[pixel]
Final vision sensor posture
(
)
(Please set the posture of the vision sensor in
)
-90)
Approximate distance from flange center to
calibration sheet [mm]
Elements in work coordinate No.1
Elements in work coordinates
Elements in work coordinates
Elements in work coordinates
The movement amount at the time of calculating
the work coordinate origin (X, Y, Z)
Camera angle, amount of movement during scale
calculation
Camera angle, amount of movement during scale
calculation
② Program
Ethernet COM No.
(Note 4)
21 CCOM$="COM2:" ' Line number setting to open line
22 CPRG$="WRKCALB.job" 'Set vision job name
23 MHndENo = 1 'Hand Eye Calibration number
With handeye
calibration Set tool No.
24 MTLCalNo = 1 'Tool No.(Distance from flange to camera center)
coordinates and work
25 MCalNo = 2 'Calibration Nol.(Image coordinates
⇒
26 MWrkNo = 1 ' Work coordinate No. of registration destination
to the calibration sheet
27 MFlng = 120 ' Focal length [mm]
28 MGain = 1.0 'Gain value of feedback control
Tolerance of calibration
data [mm]
(Note 4)
99 If M_NvOpen(1) = 1 Then
104 NVOpen CCOM$ As #1 ' Line open + log on
105 Wait M_NvOpen(1)=1 'Waiting logon to vision sensor
106 NVLoad #1,CPRG$ 'Load vision program
111 NVRun #1,CPRG$ 'Vision start
112 EBRead #1,,MRes,PVS,MNUM,PV(1),PV(2),PV(3),PV(4)
' Acquisition of recognition result
coordinate origin to the
196 If MDH<=(MSCale*2) Then ' within the specified value (± 1 pixel)