Omron CJ - INSTRUCTIONS Reference Manual page 1120

Table of Contents

Advertisement

3. Instructions
• 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:
LOOP(809)
IF(802)
IF(802)
IEND(804)
IEND(804)
LEND(810)
• NOP processing will be performed if LOOP(809) is not executed.
Example Programming
• Operation of LOOP(809)
When CIO 0.00 is ON in the following example, the block program is executed. 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.
0.00
1082
Incorrect:
LOOP(809)
IF(802)
IF(802)
IEND(804)
LEND(810)
IEND(804)
Execution
Execution
Execution
condition
condition
condition
ON
OFF
OFF
0
0.01
Repeating
Coding
Address
Instruction
000220
LD
000201
BPRG
.
A
.
000210
LOOP
.
B
.
000220
IORF
000221
LEND
.
C
.
000220
BEND
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Operand
0.00
0
.
.
2
.
.
.
.
0000
0000
0.01
.
.
---

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents