![background image](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489075.webp)
54
Precautions
Section 2-2
2-2
Precautions
2-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.
Rewrite the rungs on the left. They cannot be executed.
The arrows show signal (power flow) flow when the rung consists of control relays.
A
C
B
D
R1
R2
E
A
C
B
D
E
A
C
E
R1
R2
Correct Use
Instruction A
Condition Flag
Example: =
Reflects instruction A
execution results.
Instruction B
LD
a
Instruction
A
AND
=
Instruction B
Instruction Operand
Mnemonic
Incorrect Use
Preceding r ung
Condition Flag
Example: =
Reflects the execution results of
the preceding rung if instruction
A is not e xecuted.
Instruction B
Instruction A
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...