148
FX
3U
/FX
3UC
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
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 just 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 judge by the contents of which instruction executes which flag, and it is disabled to
normally activate each flag corresponding to each instruction.
For using flags in any positions other than just 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
DPLSY (on the
upper side) is
completed.
M8029 works as
a flag to indicate
that execution of
DPLSY (on the
lower side) 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 DPLSY instruction
(on the upper side)
Program for DSW
instruction
DPLSY instruction
(on the upper side)
DPLSY instruction
(on the lower side)
...
...
...