EasyManua.ls Logo

Omron C200H-MC221 - Stopping a Program with a General Input

Omron C200H-MC221
305 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Other manuals for Omron C200H-MC221

Related product manuals