Special Program Sections - Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Precautions
Note
1-2-2

Special Program Sections

Program section
Subroutine
SBS, SBN and RET instruc-
tions
IL - ILC section
IL and ILC instructions
Step Ladder section
STEP S instructions and
STEP instructions
FOR-NEXT loop
FOR instructions and NEXT
instructions
JMP0 - JME0 section
JMP0 instructions and JME0
instructions
Block program section BPRG instructions and
BEND instructions
Instruction
Combinations
Subroutine
Subroutine
Not possible.
IL - ILC
OK
Step ladder
Not possible.
section
FOR - NEXT
OK
loop
JMP0 - JME0
OK
Block pro-
OK
gram section
38
As an example, consider the results of executing a block transfer with
XFER(070) if 20 words are specified for transfer beginning with W500. Here,
the Work Area, which ends at W511, will be exceeded, but the instruction will
be executed without turning ON the Error Flag. In the PLC memory
addresses, the present values for timers are held in memory after the Work
Area, and thus for the following instruction, W500 to W511 will be transferred
to D0 to D11 and the present values for T0 to T7 will be transferred to D12 to
D19.
For specific PLC memory addresses in CP1H CPU Units, refer to Appendix E:
Memory Map in the CP Series CP1H CPU Units Operation Manual (W450).
For specific PLC memory addresses in CP1L CPU Units, refer to Appendix E:
Memory Map in the CP Series CP1L CPU Units Operation Manual (W462).
&20
Number of words
First source word
D0
First destination word
CP-series programs have special program sections that will control instruction
conditions. The following special program sections are available.
Instructions
Instruction condition
Subroutine program is
executed.
Section is interlocked
Break in progress.
Block program is exe-
cuting.
The following table shows which of the special instructions can be used inside
other program sections.
IL - ILC
Step ladder
section
section
Not possible.
Not possible.
Not possible.
Not possible.
OK
Not possible.
OK
Not possible.
OK
Not possible.
OK
OK
W500
Trans-
to
to
ferred.
W511
T0
to
to
T7
The subroutine program section between
SBN and RET instructions is executed.
The output bits are turned OFF and tim-
ers are reset. Other instructions will not
be executed and previous status will be
maintained.
Looping
Jump
The block program listed in mnemonics
between the BPRG and BEND instruc-
tions is executed.
FOR - NEXT
JMP0 - JME0
loop
Not possible.
Not possible.
OK
OK
Not possible.
OK
OK
OK
Not possible.
Not possible.
Not possible.
OK
Section 1-2
D0
to
to
D11
D12
to
to
D19
Status
Block program
section
section
Not possible.
Not possible.
Not possible.
Not possible.
Not possible.
Not possible.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents