120
6-3-3 Sample Ladder Program
The following sample program incorporates the procedure to execute the MC
program. This program is the minimum required to execute the MC program.
Add the program elements needed for your actual application.
n+1
01
MOV(21)
#0001
n+0
n+1
07
R2
R1
Cycle Start Bit
Cycle Start
Completed
Flag
Memory Run
Completed Flag
OUT
(Specifies
automatic
mode.)
(Sets the
program
number.)
OUT
(Reads the
program
number.)
End of MC
program
execution
OUT
(Start of MC
program
execution.)
n+1
02
R4 n+13 09
R3
n+11 02
n+1 02
Automatic Mode Flag
DIFU(13)
R3
n+11 05
Use Auxiliary Area bits for inputs R1, R2, R3, and R4.
In the sample program, program number P001 is executed in task 1. Change the
task and program number if necessary.
Program Flow
Turn ON input R1 to specify automatic mode.
Turn ON input R2 in the following situations:
•
The first time that the program is executed after the power is turned ON.
•
When executing the program from the beginning.
•
When the program number has been changed.
Execution of the MC program will begin when R4 goes ON.
Memory Run Flag
The Memory Run Flag is equivalent to the manual mode’s Busy Flag. This flag is
ON while the MC program is being executed; it is OFF when program execution
is completed or stopped.
Cycle Start Bit
Memory Run Flag
Controlling the MC Unit from the PC
Section 6-3
Summary of Contents for C200H-MC221 -
Page 1: ...Cat No W315 E1 03 Motion Control Unit C200H MC221 OPERATION MANUAL ...
Page 2: ......
Page 3: ...C200H MC221 Motion Control Unit Operation Manual Details Revised June 2010 ...
Page 4: ...iv ...
Page 6: ...vi ...
Page 10: ......
Page 12: ......
Page 16: ...xvi ...
Page 42: ......
Page 48: ......
Page 196: ......
Page 212: ......
Page 242: ......
Page 258: ......
Page 304: ......