![Omron CJ1G-CPUxx Instructions Manual Download Page 1031](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_7424911031.webp)
1010
Block Programming Instructions
Section 3-32
Precautions
Loops cannot be nested within loops.
Incorrect:
LOOP(809)
LOOP(809)
LEND(810)
LEND(810)
Do not reverse the order of LOOP and LEND.
Incorrect:
LEND(810)
:
:
LOOP(809)
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 000000 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 000001 is ON, at which time C will be executed and the
block program will end.
Address
Instruction
Operand
000220
LD
000000
000201
BPRG
0
.
.
A
.
.
000210
LOOP
---
Execution
condition
ON
Execution
condition
OFF
Execution
condition
OFF
Repeating
0
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...