172
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
6 What to Understand before Programming
6.5 General Rules for Applied Instructions
6.5.2 Handling of general flags
In some types of applied instructions, the following flags operate:
Examples: M8020: Zero flag M8021: Borrow flag M8022: Carry flag
M8029: Instruction execution complete flag
M8090: Block comparison signal M8328: Instruction non-execution flag
M8329: Instruction execution abnormal complete flag
M8304: Zero Flag M8306:Carry Flag
These flags turn ON or OFF every time various instructions turn ON, but do not change when various instructions turn
OFF not driven or when errors have occurred.
Because these flags turn ON or OFF in many instructions, the ON/OFF status of flags change every time such
instructions are executed.
Program flag contacts directly under each instruction while referring to the examples below.
1. Program containing many flags (example of instruction execution complete flag M8029)
When two or more instruction execution complete flags M8029 are programmed together for applied instructions, it is
difficult to determine which instruction executes which flag.
For using flags in any positions other than directly under applied instructions, refer to the next page.
M8000
FNC 72
DSW
X10 Y10 D0 K1
FNC 22
MUL
D0 K10 D20
M8029
Execution is
completed
M0
FNC 57
DPLSY
K1000 D20 Y000
RST
M0
M8029
Execution is
completed
X000
SET
M0
M8029 works as
a flag to indicate
that execution of
DSW is
completed.
M8029 works as
a flag to indicate
that execution of
DPLSY is
completed.
Good example
Bad example
M8029 works as
a flag to indicate
that execution of
DSW is
completed.
M8029 works as
a flag to indicate
that execution of
the first DPLSY
is completed.
M8029 works as
a flag to indicate
that execution of
the second
DPLSY is
completed.
RST
M0
FNC 22
MUL
D0 K10 D20
M8000
X10 Y10 D0
Execution is
completed
FNC 72
DSW
K1
X000
M0
SET
M0
K1000 D20 Y000
FNC 57
DPLSY
M8029
M8029
Execution is
completed
M1
K1000 D22 Y001
FNC 57
DPLSY
Program for the second DPLSY
instruction
Program for DSW
instruction
First DPLSY instruction
Second DPLSY
instruction
...
...
...