Automatic Mode - Omron CS1W-MC221 - 02-2008 Operation Manual

Motion control units
Table of Contents

Advertisement

Controlling the MC Unit from the CPU Unit
5-2-3

Automatic Mode

1,2,3...
Ladder Programming Example for Executing an MC Program
232
The MC program is executed in Automatic Mode. Use the following procedure
to operate in Automatic Mode.
The example provided here is for task 1.
1. Set the MC Unit to Automatic Mode by turning ON bit 01 of word n+3.
2. Set the program number of the program to be executed. (Word n+2)
3. Turn ON the Program Number Read Bit (bit 07 of word n+3) so that the pro-
gram number set in word n+2 will be read by the MC Unit.
4. Turn ON the Cycle Start Bit (bit 02 of word n+3) so that the program corre-
sponding to the program number set in word n+2 will be executed.
The corresponding bits for tasks 2 to 4 are shown in the following table.
Task
Automatic
Mode
1
Bit 01 of
word n+3
2
Bit 01 of
word n+5
3
Bit 01 of
word n+7
4
Bit 01 of
word n+9
The following program is an example of the kind of ladder program used to
execute an MC program. This program is the minimum required to execute the
MC program. Add the program elements needed for your actual application.
R1
R2
n+15 05
Program Execution
Completed Flag
R4
n+15 09
R3
Cycle Start
Automatic Mode Flag
Completed
Flag
n+3 02
Cycle Start Bit
Use work 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
number set
number read
Word n+2
Bit 07 of
word n+3
Word n+4
Bit 07 of
word n+5
Word n+6
Bit 07 of
word n+7
Word n+8
Bit 07 of
word n+9
n+15 02
Section 5-2
Program
Cycle start
Bit 02 of
word n+3
Bit 02 of
word n+5
Bit 02 of
word n+7
Bit 02 of
word n+9
OUT
n+3
(Specifies
01
Automatic
Mode.)
MOV(21)
(Sets the
program
#0001
number.)
n+2
OUT
(Reads the
n+3
program
07
number.)
End of MC
program
DIFU(13)
R3
execution
n+3
OUT
02
(Start of MC
program
execution.)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-mc221Cs1w-mc221-v1Cs1w-mc421Cs1w-mc421-v1

Table of Contents