Omron FQM1-MMA21, FQM1-CM001 Programming Precautions, Appendix A, Using Condition Flags

Models: FQM1-MMP21 FQM1-MMA21 FQM1-CM001

1 414
Download 414 pages 44.52 Kb
Page 304
Image 304
Programming Precautions

Programming

Appendix A

Programming Precautions

Condition Flags

Using Condition Flags

Condition flags are shared by all instructions, and will change during a cycle depending on results of executing individual instructions. Therefore, be sure to use Condition Flags on a branched output with the same input condition immediately after an instruction to reflect the results of instruction execution. Never connect a Condi- tion Flag directly to the bus bar because this will cause it to reflect execution results for other instructions.

Example: Using Instruction A Execution Results

Correct Use

a

 

 

 

 

Instruction A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reflects instruction A

 

 

 

 

 

Condition Flag

execution results.

 

Example: =

 

 

 

 

Instruction B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mnemonic

Instruction

Operand

 

 

LD

a

Instruction A

 

AND

=

Instruction B

 

The same input condition (a) is used for instructions A and B to execute instruction B based on the execution results of instruction A. In this case, instruction B will be executed according to the Condition Flag only when instruction A is executed.

Incorrect Use

 

 

Preceding rung

 

Instruction A

 

Reflects the execution results of

 

the preceding rung if instruction

Condition Flag

A is not executed.

Example: =

 

 

Instruction B

If the Condition Flag is connected directly to the left bus bar, instruction B will be executed based on the execu- tion results of a previous rung if instruction A is not executed.

Note Condition Flags are used by all instruction within a single program (task) but they are cleared when the task switches. Therefore execution results in the preceding task will not be reflected later tasks.

281

Page 304
Image 304
Omron FQM1-MMA21, FQM1-CM001, FQM1-MMP21 operation manual Programming Precautions, Appendix A, Using Condition Flags