Stopping A Program With A General Input - Omron C200H-MC221 Operation Manual

Motion control unit
Hide thumbs Also See for C200H-MC221:
Table of Contents

Advertisement

Stopping a Program with a General Input

Sample Program 2
Subprogram
Explanation
9-8
Stopping a Program with a General Input
208
Note Register E0 is used as a loop counter in block N012 because loops can't be
nested as shown below.
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.
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
N000
P700
XY
N001
G01
XA1000 YA1001 F20 M10
N002
G01
X0
N003
G60
A1000=A1000+20
N004
G70
N001/L9
N005
G73
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.
This program shows how to stop MC program execution when general input 1
goes ON.
General input 1
Axis operation
Present value
N005
G01
XA1000 YA1001 F20 M10
:
N008
G70
N004/L10
:
N012
G70
N004/L5
Y0
F50
Section 9-8
:
:

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents