208
Note
Register E0 is used as a loop counter in block N012 because loops can’t be
nested as shown below.
N005
G01
XA1000 YA1001 F20 M10
:
:
N008
G70
N004/L10
:
:
N012
G70
N004/L5
The loops in the example above won’t operate properly. A subprogram can also
be used for nesting, as shown in the following sample program.
Sample Program 2
N000
P008
XY
N001
G11
N002
G63
A1000=100
N003
G63
A1001=100
N004
G72
P700
N005
G63
A1000=100
N006
G60
A1001=A1001+30
N007
G70
N004/L4
N008
G79
Subprogram
N000
P700
XY
N001
G01
XA1000 YA1001 F20 M10
N002
G01
X0
Y0
F50
N003
G60
A1000=A1000+20
N004
G70
N001/L9
N005
G73
Explanation
Blocks N005 through N008 in sample program 1 have been converted to sub-
program format in subprogram P700, which is called from step N004 in main pro-
gram P008. Main program P008 and subprogram P700 have independent
loops, so they will operate properly.
Function G73 (SUBPROGRAM END) must be included at the end of subpro-
gram P700.
9-8
Stopping a Program with a General Input
This program shows how to stop MC program execution when general input 1
goes ON.
General input 1
Axis operation
Present value
Stopping a Program with a General Input
Section 9-8
Содержание C200H-MC221 -
Страница 1: ...Cat No W315 E1 03 Motion Control Unit C200H MC221 OPERATION MANUAL ...
Страница 2: ......
Страница 3: ...C200H MC221 Motion Control Unit Operation Manual Details Revised June 2010 ...
Страница 4: ...iv ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 16: ...xvi ...
Страница 42: ......
Страница 48: ......
Страница 196: ......
Страница 212: ......
Страница 242: ......
Страница 258: ......
Страница 304: ......