EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 1019

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...
986
Block Programming Instructions Section 3-30
Operation with an Operand for IF(802) or IF NOT(802)
An operand bit, B, can be specified for IF(802) or IF NOT(802). If the operand
bit is ON, the instructions between IF(802) and ELSE(803) will be executed. If
the operand bit is OFF, the instructions between ELSE(803) and IEND(804)
will be executed. For IF NOT(802), the instructions between IF(802) and
ELSE(803) will be executed and if the operand bit is ON, the instructions be
ELSE(803) and IEND(804) will be executed is the operand bit is OFF.
If the ELSE(803) instruction is omitted and the operand bit is ON, the instruc-
tions between IF(802) and IEND(804) will be executed and if the operand bit
is OFF, only the instructions after IEND(804) will be executed. The same will
happen for the opposite status of the operand bit if IF NOT(802) is used.
Flags
Precautions Instructions in block programs are generally executed unconditionally. Branch-
ing, however, can be used to create conditional execution based on execution
conditions or operand bits.
Use IF A ELSE B IEND to branch between A and B.
Use IF A IEND to branch between A and doing nothing.
Branches can be nested to up to 253 levels.
A error will occur and the Error Flag will turn ON if the branch instructions are
not in a block program or if more than 254 branches are nested.
Operand bit
ON?
"B" executed
(after ELSE).
"A" executed (be-
tween IF and ELSE).
Operand bit
ON?
"A" executed (be-
tween IF and IEND).
Name Label Operation
Error Flag ER ON if the branch instructions are not in a block program.
ON if more than 254 branches are nested.
OFF in all other cases.

Table of Contents

Related product manuals