EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Condition Flags; Precautions

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...
33
Precautions Section 1-2
1-2 Precautions
1-2-1 Condition Flags
Using Condition
Flags
Conditions flags are shared by all instructions, and will change during a cycle
depending on results of executing individual instructions. Therefore, be sure
to use Condition Flags on a branched output with the same execution condi-
tion immediately after an instruction to reflect the results of instruction execu-
tion. Never connect a Condition Flag directly to the bus bar because this will
cause it to reflect execution results for other instructions.
Example: Using Instruction A Execution Results
The same execution condition (a) is used for instructions A and B to execute
instruction B based on the execution results of instruction A. In this case,
instruction B will be executed according to the Condition Flag only if instruc-
tion A is executed.
If the Condition Flag is connected directly to the left bus bar, instruction B will
be executed based on the execution results of a previous rung if instruction A
is not executed.
Note Condition Flags are used by all instruction within a single program (task) but
they are cleared when the task switches. Therefore execution results in the
preceding task will not be reflected later tasks. Since conditions flags are
shared by all instructions, make absolutely sure that they do not interfere with
each other within a single ladder-diagram program. The following is an exam-
ple.
LD
AN
D
a
=
Correct Use
Instruction A
Instruction B
Instruction Operand
Mnemonic
Condition Flag
Example: =
Reflects instruction A
execution results.
Instruction A
Instruction B
Instruction B
Instruction A
Incorrect Use
Preceding rung
Condition Flag
Example: =
Reflects the execution results of
the preceding rung if instruction
A is not executed.

Table of Contents

Related product manuals