Mitsubishi CR750-Q Series Instruction Manual page 146

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

Advertisement

21 Appendix
(4) 1.Prg
The same program as the conveyer tracking.
(5) CM1.Prg
1 '### Ver.A3 ###################################
2 '# Conveyer tracking, communication processing between robot and vision sensor
3 '# Program type
4 '# Date of creation/version : 2012.07.31 A3
5 '# COPYRIGHT : MITSUBISHI ELECTRIC CORPORATION.
6 '##############################################
7
Dim MX(4),MY(4),MT(4),PVS(4)
8 '
9 '##### Main processing #####
10 *S00MAIN
11
GoSub *S10DTGET
12
GoSub *S20VSINI
13
GoSub *S30CONST
14 '
15
MEP# = M_Enc(MENCNO)+MEI#+100
16
GoSub *S70VOPEN
17 *L00_00
18
GoSub *S40CHKS
19
GoTo *L00_00
20 End
21 '
22 '##### Data acquisition processing #####
23 *S10DTGET
24
MWKNO= M_09#
25
MENCNO= P_102(MWKNO).Y
26
MVSL= P_103(MWKNO).X
27
MWKL=P_103(MWKNO).Y
28 '
29
PTEACH= P_100(MWKNO)
30
PVSWRK= P_101(MWKNO)
31
CCOM$= C_100$(MWKNO)
32
CPRG$= C_101$(MWKNO)
33 Return
34 '
35 '##### Opening communication line #####
36 *S70VOPEN
37
NVClose
38
NVOpen CCOM$ As #1
39
Wait M_NvOpen(1)= 1
40
NVLoad #1,CPRG$
41 Return
42 '
43 '##### VS initialization processing #####
44 *S20VSINI
45 'Move from the robot coordinate axis (P_ZERO position) to the robot origin when the vision sensor
recognizes workpieces
46
MED1#=M_100#(MENCNO)
vision sensor and robot
47
PRBORG=P_EncDlt(MENCNO)*MED1#
workpieces
48 'Return a workpiece recognized by the vision sensor to the position taught to the robot
49
MED2#=M_101#(MWKNO)
recognition to workpiece teaching
50
PBACK=P_EncDlt(MENCNO)*MED2#
51 'Calculate the position of the workpiece that the vision sensor in the robot area recognized.
52
PWKPOS=PRBORG+PVSWRK+PBACK
21-136 Sample Programs
: VS communication program
'X/Y/C/buffer
'Data acquisition processing
'VS initialization processing
'Condition setting
'Vision sensor line open + vision program load processing
'VS recognition check processing
'Model number
'Encoder number
'VS screen size longitudinal distance
'Workpiece size longitudinal distance
'Position taught to the robot
'Position recognized by VS
'COM port number
'Vision program name
'Close communication line
'Open communication line and log on
'Wait for line connection
'Load the vision program
'Amount of conveyer movement at calibration between
'Robot origin when the vision sensor recognizes
'Amount of conveyer movement from vision sensor
'Workpiece position recognized by the vision

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents