![Omron CJ1G-CPU series Programming Manual Download Page 78](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489078.webp)
57
Precautions
Section 2-2
Using Execution Results from Differentiated Instructions
With differentiated instructions, execution results for instructions are reflected
in Condition Flags only when execution condition is met, and results for a pre-
vious rung (rather than execution results for the differentiated instruction) will
be reflected in Condition Flags in the next cycle. You must therefore be aware
of what Condition Flags will do in the next cycle if execution results for differ-
entiated instructions to be used.
In the following for example, instructions A and B will execute only if execution
condition C is met, but the following problem will occur when instruction B
picks up execution results from instruction A. If execution condition C remains
ON in the next cycle after instruction A was executed, then instruction B will
unexpectedly execute (by the execution condition) when the Condition Flag
goes from OFF to ON because of results reflected from a previous rung.
In this case then, instructions A and B are not differentiated instructions, the
DIFU (of DIFD) instruction is used instead as shown below and instructions A
and B are both upwardly (or downwardly) differentiated and executed for one
cycle only.
Note The CS1-H, CJ1-H, or CJ1M CPU Units support instructions to save and load
the Condition Flag status (CCS(282) and CCL(283)). These can be used to
access the status of the Condition Flags at other locations in a task or in a dif-
ferent task.
Main Conditions Turning ON Condition Flags
Error Flag
The ER Flag will turn ON under special conditions, such as when operand
data for an instruction is incorrect. The instruction will not be executed when
the ER Flag turns ON.
Previous rung
Instruction A
Instruction B
Condition Flag
Example: =
Reflects execution results for instruction A
when execution condition is met.
Reflects execution results for a previous
rung in the next cycle.
Incorrect
Use
Previous rung
Instruction A
Instruction B
Condition Flag
Example: =
Reflects instruction A execution results.
Correct
Use
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...