EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 1040

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1007
Block Programming Instructions Section 3-30
Conditional block branching can be used within a loop, but the entire branch
operation must be within the loop.
Correct: Incorrect:
LOOP(809) LOOP(809)
IF(802) IF(802)
IF(802) IF(802)
IEND(804) IEND(804)
IEND(804) LEND(810)
LEND(810) IEND(804)
NOP processing will be performed if LOOP(809) is not executed.
An error will occur and the Error Flag will turn ON if a Loop Control Instruction
is not in a block program.
Examples When CIO 0.00 is ON in the following example, the block program is exe-
cuted. After “A” is executed, “B” and the IORF(184) after it will be executed
repeatedly until CIO 0.01 is ON, at which time C will be executed and the
block program will end.
Address Instruction Operand
000220 LD 0.00
000201 BPRG 0
.
.
A.
.
000210 LOOP ---
.
.
B.
.
000220 IORF .
.
0000
0000
000221 LEND 0.01
.
.
C.
.
000220 BEND ---
0
0.00
0.01
Execution
condition
ON
Execution
condition
OFF
Execution
condition
OFF
Repeating

Table of Contents

Related product manuals