Mitsubishi CR750-Q Series Instruction Manual page 147

Tracking system and vision tracking system using mitsubishi robot
Hide thumbs Also See for CR750-Q Series:
Table of Contents

Advertisement

sensor into the robot area
53
PVTR=(P_Zero/PWKPOS)*PTEACH
sensor and grabbing position
54
If PVTR.X<-PCHK.X Or PVTR.X>PCHK.X Then Error 9110 'The calculation result is greatly different
from the theory value.
55
If PVTR.Y<-PCHK.Y Or PVTR.Y>PCHK.Y Then Error 9110
56 Return
57 '
58 '##### Condition setting #####
59 *S30CONST
60
MDX = P_EncDlt(MENCNO).X
61
MDY = P_EncDlt(MENCNO).Y
62
MDZ = P_EncDlt(MENCNO).Z
63
MD = Sqr(MDX^2+MDY^2+MDZ^2)
64
MEI#=Abs((MVSL-MWKL)/MD)
65 Return
66 '
67 '##### VS recognition check processing #####
68 *S40CHKS
69 *LVSCMD
70 *LWAIT
71
MEC# = M_Enc(MENCNO)
72
MEM#=MEC#-MEP#
current position of the encoder
73
If MEM# > 800000000.0# Then MEM# = MEM#-1000000000.0#
74
If MEM# < -800000000.0# Then MEM# = MEM#+1000000000.0#
75
If Abs(MEM#) > MEI# GoTo *LVSTRG
and the camera startup setting value
76
Dly 0.01
77
GoTo *LWAIT
78 *LVSTRG
79
MEP#= MEC#
value
80
NVTrg #1, 5, MTR1#,MTR2#,MTR3#,MTR4#,MTR5#,MTR6#,MTR7#,MTR8#
encoder value acquisition
81 'Acquisition of recognition data
82
If M_NvOpen(1)<>1 Then Error 9100
83
EBRead #1,"",MNUM,PVS(1),PVS(2),PVS(3),PVS(4) 'Imaging request
84
If MNUM=0 Then GoTo *LVSCMD
85
If MNUM>4 Then MNUM= 4
86
For M1= 1 To MNUM
87
MX(M1)= PVS(M1).X
88
MY(M1)=PVS(M1).Y
89
MT(M1)= PVS(M1).C
90
Next M1
91
GoSub *S60WRDAT
92 Return
93 '
94 '##### Tracking data storage processing #####
95 *S60WRDAT
96
For M1= 1 To MNUM
recognized
97
PSW= P_Zero
98
PSW= PRBORG
99
PSW.X= PSW.X+MX(M1)
100
PSW.Y=PSW.Y+MY(M1)
101
PSW.C=PSW.C+MT(M1)
102
PRW=P_Zero
103
PRW= PSW*PVTR
104
PRW.FL1=P_100(MWKNO).FL1
105
PRW.FL2=P_100(MWKNO).FL2
106
Select MENCNO
107
Case 1
108
TrWrt PRW, MTR1#, MWKNO,1,MENCNO 'Position, encoder value, model number, buffer number,
encoder number
'Vectors specifying the center of gravity of the vision
'Amount of movement per pulse (X)
'Amount of movement per pulse (Y)
'Amount of movement per pulse (Z)
'Calculation of the amount of movement per pulse
'Calculation of imaging start setting value
'Subtract the previous encoder pulse value from the
'Comparison between the amount of encoder movement
'Set the encoder pulse current position to the previous
'Communication error
'If no workpieces are recognized
'Set the maximum number (4)
'Repeat for the number of workpieces recognized
'Data acquisition
'Tracking data storage processing
'Perform processing for the number of workpieces
'Virtually move the robot close to the vision sensor
'Create the grabbing position
'Compensate for the error in the calculation value
21 Appendix
'Imaging request +
Sample Programs 21-137

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents