Omron CJ - PROGRAMMING MANUAL 12-2009 Programming Manual page 101

Programmable controllers
Table of Contents

Advertisement

Precautions
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.
Incorrect
Use
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.
Correct
Use
Note The CONDITION FLAG SAVE and CONDITION FLAG LOAD (CCS(282) and
CCL(283)) instructions can be used to save and load the Condition Flag sta-
tus. These can be used to access the status of the Condition Flags at other
locations in a task or in a different task.
The CS1G/H-CPU@@(-V1) and CJ1@-CPU@@ CPU Units do not support the
CCS and CCL instructions.
Previous rung
Instruction A
Reflects execution results for instruction A
when execution condition is met.
Reflects execution results for a previous
Condition Flag
rung in the next cycle.
Example: =
Instruction B
Previous rung
Instruction A
Reflects instruction A execution results.
Condition Flag
Example: =
Instruction B
Section 2-2
61

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents