Omron CJ2 CPU UNIT SOFTWARE User Manual page 198

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

Advertisement

5 Understanding Programming
Using Execution Results in N.C. and N.O. Inputs
The Condition Flags will pick up instruction B execution results as shown in the example below even
though the N.C. and N.O. input bits are executed from the same output branch.
Make sure each of the results is picked up once by an OUTPUT instruction to ensure that execution
results for instruction B will be not be picked up.
Example: The following example will move #0200 to D200 if D100 contains #0010 and move #0300
to D300 if D100 does not contain #0010.
5-106
Instruction A
Reflects instruction A
execution results.
Condition Flag
P_EQ (Equals Flag)
Instruction B
Reflects instruction B
execution results.
Condition Flag
P_EQ (Equals Flag)
Instruction A
Reflects instruction A
execution results.
Condition Flag
C
P_EQ (Equals Flag)
Reflects instruction A
execution results.
Condition Flag
D
P_EQ (Equals Flag)
C
Instruction B
D
CMP
#0010
D100
Reflects CMP execution results.
P_EQ
MOV
#0200
D200
Reflects MOV execution results.
MOV
P_EQ
#0300
D300
(1)
(2)
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents