Mitsubishi Electronics FX3GC ユーザーズマニュアル

ページ / 964
762
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
35 SFC Program and Step Ladder
35.1 SFC Program
35.1.6 Role of the RET instruction
• Use the RET instruction at the end of an SFC program.
When inputting an SFC program using GX Works2 and GX Developer, however, it is not necessary to input the 
RET instruction (because RET instruction is automatically written).
• In a PLC, two or more SFC blocks can be put between step 0 and the END instruction.
When there are ladder blocks and SFC blocks, put a RET instruction at the end of each SFC program.
35.1.7 Preliminary knowledge for creating SFC program
List of sequence instructions available in states
• STL instruction cannot be used in interrupt programs and subroutine programs.
• When using SFC programs (STL instruction), do not drive state relays S using SET or OUT instructions in an 
interrupt program.
• It is not prohibited to use jump instructions in state relays. However, it is not recommended to use jump instructions 
because complicated movements will result.
*1.
The MPS instruction cannot be used immediately after a state relay (STL instruction), even in a drive
processing circuit.
Special auxiliary relays
For efficiently creating SFC programs, it is necessary to use some special auxiliary relays. The table below shows
major ones.
*2.
Processed when the END instruction is executed.
Instruction
State relay
LD/LDI/LDP/LDF,
AND/ANI/ANDP/ANDF,
OR/ORI/ORP/ORF,
INV,MEP/MEF,OUT,
SET/RST,PLS/PLF
ANB/ORB/MPS/MRD/
MPP
MC/MCR
Initial/general state relay
Available
Available
*1
Not available
Branch/recombination
state relay
Drive processing
Available
Available
*1
Not available
Transfer processing
Available
Not available
Not available
Device 
number
Name
Function and application
M8000
RUN monitor
This relay is normally ON while the PLC is in the RUN mode.
Use this relay as the program input condition requiring the normally driven status or for indicating the PLC
operation status.
M8002
Initial pulse
This relay turns ON and remains ON only momentarily when the PLC mode is changed from STOP to
RUN.
Use this relay for the initial setting of a program or for setting the initial state relay.
M8040
STL transfer 
disable
When this relay is set to ON, transfer to the ON status is disabled among all state relays.
Because programs in state relays are operating even in the transfer disabled status, output coils do not
turn OFF automatically.
M8046
*2
STL state ON
Use this relay to prevent simultaneous startup of another flow or as a process ON/OFF flag.
When M8047 is OFF, M8046 is normally OFF.
When M8047 is ON, M8046 operates as follows:
FX
3S
 PLC
When at least one among the state relays S0 to S255 is ON: ON
When all of the state relays S0 to S255 are OFF: OFF
FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 PLCs
When at least one among the state relays S0 to S899 and S1000 to S4095 is ON: ON
When all of the state relays S0 to S899 and S1000 to S4095 are OFF: OFF
M8047
*2
Enable STL 
monitoring
When this relay is driven, the device number of a state relay in the ON status having the smallest device
number among S0 to S255(FX
3S
 PLC), S0 to S899 and S1000 to S4095(FX
3G
/FX
3GC
/FX
3U
/FX
3UC
PLCs) is stored to D8040, and the state relay number in the ON status having the next smallest device
number is stored to D8041. In this way, up to eight state relays in the ON status are stored in registers up
to D8047.
In the FX-PCS/WIN(-E), FX-30P, FX-20P(-E), and FX-10P(-E), when this relay is driven, the state
relays in the ON status are automatically read and displayed.
For details, refer to the appropriate peripheral equipment manual.
In the SFC monitor in GX Works2 and GX Developer, the automatic scroll monitoring function is valid
even if this relay is not driven.