Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1258

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Block Programming Instructions
Flags
Precautions
Examples
Name
Label
Error Flag
ER
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:
LOOP(809)
IF(802)
IF(802)
IEND(804)
IEND(804)
LEND(810)
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.
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.
Operation
ON if a Loop Control Instruction is not in a block program.
OFF in all other cases.
Incorrect:
LOOP(809)
IF(802)
IF(802)
IEND(804)
LEND(810)
IEND(804)
Section 3-32
1219

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents