3. Instructions
1082
CS/CJ/NSJ Series Instructions Reference Manual (W474)
• 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.
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
Execution
condition
ON
Execution
condition
OFF
Execution
condition
OFF
Repeating
0.00
0.01
Coding
Address Instruction Operand
000220 LD 0.00
000201 BPRG 0
.
.
A
.
.
000210 LOOP 2
.
.
B
.
.
000220 IORF
.
.
0000
0000
000221 LEND 0.01
.
.
C
.
.
000220 BEND ---