Omron C200H-MC221 Operation Manual page 227

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

Advertisement

Calculating Position Data
Sample Program 1
Explanation
N000
P008
XY
N001
G11
N002
G63
E00=0
N003
G63
A1000=100
N004
G63
A1001=100
N005
G01
XA1000 YA1001 F20 M10
N006
G01
X0
N007
G60
A1000=A1000+20
N008
G70
N005/L9
N009
G63
A1000=100
N010
G60
A1001=A1001+30
N011
G60
E00=E00+1
N012
G71
N005/E0 ! 5
N013
G79
Block N000 declares the program number and axes being used.
N001
Specifies Stop mode.
N002
Initializes register E0 to 0.
N003
Substitutes the X-axis' initial position data into address A1000.
N004
Substitutes the Y-axis' initial position data into address A1001.
N005
Moves the axes by linear interpolation to the X position indicated in A1000 and
the Y position indicated in A1001.
N006
Returns to the origin.
N007
Increments the X-axis' position data by 20.
N008
Jumps to block N004 and repeats the above process 9 times.
N009
Initializes the X-axis' position data to its original value.
N010
Increments the Y-axis' position data by 30.
N011
Uses register E0 as a loop counter with an initial value of 0. The content of E0 is
incremented by 1.
N012
Jumps to N004 as long as the content of E0 isn't 5. When E0=5, N012 proceeds
to the next block and ends the program.
N013
Ends the program.
Y0
F50
Section 9-7
207

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents