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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Precautions

1-2
Precautions
1-2-1

Condition Flags

Using Condition
Flags
Note
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
Correct Use
Condition Flag
Example: =
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.
Incorrect Use
Preceding rung
Condition Flag
Example: =
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.
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.
Instruction A
Reflects instruction A
execution results.
Instruction B
Instruction A
Reflects the execution results of
the preceding rung if instruction
A is not executed.
Instruction B
Section 1-2
Mnemonic
Instruction Operand
a
LD
Instruction A
=
AN D
Instruction B
33

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents