210
Sample Program
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
Explanation
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.
9-10 Executing MC Programs from the Ladder Program
This section describes ladder programs that will execute G-language MC pro-
grams. Use the following procedure to execute MC programs.
1, 2, 3...
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
Task 2
Automatic/Manual Mode Bit
n+3: bit 01
Program number
n+2
Program Number Read Bit
n+3: bit 07
Cycle Start Bit
n+3: bit 02
Executing MC Programs from the Ladder Program
Section 9-10
Содержание 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: ......