Omron CJ2 CPU UNIT SOFTWARE User Manual page 352

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

10 CPU Unit Functions
Programming Example 3
This example shows background execution when referencing Condition Flags.
Programming without Background Execution
To check whether the minimum value found by MIN(183) is 0, the status of the Equals Flag is
checked just after execution of MIN(183).
Execution condition
a
Programming with Background Execution
As shown in the following figure, an AND =(300) instruction is used to check whether the minimum
value found by MIN(183) is 0.
Execution condition
a
Execution condition
A202.00
b
10-18
MIN
D1000
D2000
D0
W0.00
P_EQ
EQ Flag
MIN
D1000
D2000
D0
SET
b
EQ Flag
D0
&0
RSET
b
MIN(183) is executed when
execution condition "a" goes
ON and the minimum value is
stored in D0.
When the minimum value in
D0 is 0, the Equals Flag goes
ON and W0.00 is turned ON.
MIN(183) is executed when
execution condition "a" goes ON
and the minimum value is
stored in D0.
At the same time, execution
condition "b" is turned ON.
W0.00
When D0 contains 0000 hex,
W0.00 is turned ON.
After the comparison, execution
condition "b" is reset to OFF.
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents