Mitsubishi CR750-Q Series Instruction Manual page 137

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

Advertisement

(3) 1.Prg
1 '### Ver.A3 #################################
2 '# Conveyer tracking, robot operation program
3 '# Program type : 1.prg
4 '# Date of creation/version : 2012.07.31 A3
5 '# MITSUBISHI ELECTRIC CORPORATION.
6 '############################################
7 '
8 '### Main processing ###
9 *S00MAIN
10
GoSub *S90HOME
11
GoSub *S10INIT
12 *LOOP
13
GoSub *S20TRGET
14
GoSub *S30WKPUT
15
GoTo *LOOP
16 End
17 '
18 '### Initialization processing ###
19 *S10INIT
20 '/// Speed related ///
21
Accel 100,100
22
Ovrd 100
23
Loadset 1,1
24
OAdl On
25
Cnt 0
26
Clr 1
27
HOpen 1
28 '/// Initial value setting ///
29
TrClr 1
30
MWAIT1=0
31 '/// Multitask startup ///
32
M_09#= PWK.X
33
If M_Run(2)= 0 Then
34
XRun 2,"CM1",1
35
Wait M_Run(2)=1
36
EndIf
37
Priority PRI.X,1
38
Priority PRI.Y,2
39 Return
40 '
41 '### Tracked workpiece takeout processing ###
42 *S20TRGET
43 '/// Tracking buffer check ///
44 *LBFCHK
45
If M_Trbfct(1)>=1 Then GoTo *LREAD
46
Mov P1
47
MWAIT1=0
48
GoTo *LBFCHK
49 '/// Workpiece data acquisition ///
50 *LREAD
51
TrRd PBPOS,MBENC#,MBWK%,1,MBENCNO%
52
GoSub *S40DTSET
53 '/// Workpiece position confirmation ///
54 *LNEXT
55
PX50CUR=TrWcur(MBENCNO%,PBPOS,MBENC#)
56
MX50ST= PRNG.X
follow a workpiece
'Origin return processing
'Initialization processing
'Tracked workpiece takeout processing
'Workpiece placing processing
'Acceleration/deceleration setting
'Speed setting
'Optimal acceleration/deceleration specification
'Turning optimal acceleration/deceleration ON
'Clear tracking buffer 1
'Clear workpiece wait flag 1
'Model number specification
'Confirmation of conveyer 1 multitasking
'Multitasking setting
'If a workpiece exists
'Move to the pull-off location
'Read data from the tracking buffer
'Transportation data setting
'Acquire the current workpiece position
'Start distance of the range where the robot can
21 Appendix
Sample Programs 21-127

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents