EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1105 background imageLoading...
Page #1105 background image
1067
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Block Programming Instructions
3
IF/IF NOT/ELSE/IEND
Function
z Operation without an Operand for IF(802)
z Operation with an Operand for IF(802) or IF NOT(802)
Hint
• Instructions in block programs are generally executed unconditionally. Branching, 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.
• Nesting Branches
• Up to 253 branches can be nested within the top level branch.
If an operand bit is not specified, an execution
must be created before IF(802) starting with
LD. If the execution condition is ON, the
instructions between IF(802) and ELSE(803)
will be executed and if the execution condition
is OFF, the instructions between ELSE(803)
and IEND(804) will be executed.
If the ELSE(803) instruction is omitted and the
execution condition is ON, the instructions
between IF(802) and IEND(804) will be
executed and if the execution condition is
OFF, only the instructions after IEND(804) will
be executed.
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 instructions 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.
* The parentheses ( ) in the explanation indicate
the case of the IF NOT instruction.
"B" executed
(after ELSE).
Execution
condition ON?
"A" executed (be-
tween IF and ELSE).
Execution
condition
Execution
condition ON?
"A" executed (be-
tween IF and IEND).
Execution
condition
Operand bit
ON (OFF)*?
IEND
ELSE
IF R (IF NOT R)
A
"B" executed
(after ELSE).
"A" executed (be-
tween IF and ELSE).
B
Operand bit
ON (OFF)*?
"A" executed (be-
tween IF and IEND).

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals