Executing Mc Programs From The Ladder Program - Omron C200H-MC221 Operation Manual

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

Advertisement

Executing MC Programs from the Ladder Program

Sample Program
Explanation
9-10 Executing MC Programs from the Ladder Program
1, 2, 3...
210
N000
P010
X
N001
G11
N002
G74
6
N003
G01
X1000 F100
N004
G63
A500=X
N005
G01
X0
N006
G01
XA500
N007
G70
N005
N008
G79
Block N000 declares the program number and axes being used.
N001
Specifies Stop mode.
N002
Execution of the next block is stopped when general input 2 goes ON.
N003
Moves the X axis with a target position of X1000. The positioning operation will
be decelerated to a stop if general input 2 goes ON before positioning is com-
pleted.
N004
The stopping position is stored in address A500.
N005
Returns to the origin.
N006
Positions the X axis using the position data stored in address A500 in block
N004.
N007
Jumps to N005 and repeats the positioning operation.
N008
Ends the program.
This section describes ladder programs that will execute G-language MC pro-
grams. Use the following procedure to execute MC programs.
1. Set the MC Unit to automatic mode. (Turn ON bit 01 of IR word n+1.)
2. Set the program number of the desired MC program. (IR word n+0)
3. Read the program number from IR word n+0 to the MC Unit. (Turn ON bit 07
of IR word n+1.)
4. Turn ON the Cycle Start Bit to execute the MC program specified in IR word
n+0. (Turn ON bit 02 of IR word n+1.)
This procedure executes task 1. The following table shows the equivalent IR
Area control bits and IR words for task 2.
Bit/word
Automatic/Manual Mode Bit
Program number
Program Number Read Bit
Cycle Start Bit
Section 9-10
Task 2
n+3: bit 01
n+2
n+3: bit 07
n+3: bit 02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents