Omron FQM1-MMA21 Home Security System User Manual


 
284
Programming Appendix A
2. Using Execution Results from Differentiated Instructions
With differentiated instructions, execution results for instructions are reflected in Condition Flags only when
input condition is met, and results for a previous rung (rather than execution results for the differentiated in-
struction) will be reflected in Condition Flags in the next cycle. You must therefore be aware of what Condi-
tion Flags will do in the next cycle if execution results for differentiated instructions to be used.
In the following for example, instructions A and B will execute only if input condition C is met, but the follow-
ing problem will occur when instruction B picks up execution results from instruction A. If input condition C
remains ON in the next cycle after instruction A was executed, then instruction B will unexpectedly execute
(by the input 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(013) (or DIFD(014))
instruction is used instead as shown below and instructions A and B are both upwardly (or downwardly) dif-
ferentiated and executed for one cycle only.
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.
When the ER Flag is ON, the status of other Condition Flags, such as the <, >, OF, and UF Flags, will not
change and status of the = and N Flags will vary from instruction to instruction.
Refer to the descriptions of individual instructions in the Instructions Reference Manual (O011) for the condi-
tions that will cause the ER Flag to turn ON. Caution is required because some instructions will turn OFF the
ER Flag regardless of conditions.
C
Incorrect
Use
Condition Flag
Example: =
@ Instruction B
@ Instruction A
Reflects execution results for instruction A
when execution condition is met.
Reflects execution results for a previous
rung in the next cycle.
Previous rung
DIFU
D
D
C
Correct
Use
Previous rung
Instruction A
Instruction B
Reflects instruction A execution results.
Condition Flag
Example: =