SFC Mitsubishi
SFC Mitsubishi
INTRODUCTION
Thank you for purchasing the Mitsubishi MELSEC-Q/L/QnA series programmable controllers.
Before using the product, please read this manual carefully and develop familiarity with the functions and performance of the
MELSEC-Q/L/QnA series programmable controllers to handle the product correctly.
When applying the program examples provided in this manual to an actual system, ensure the applicability and confirm that it
will not cause system control problems.
Please make sure that the end users read this manual.
1
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
CHAPTER 3 SPECIFICATIONS 20
3.1 Performance Specifications Related to SFC Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Device List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Processing Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Processing time for SFC program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Processing time for S(P).SFCSCOMR instruction and S(P).SFCTCOMR instruction. . . . . . . . . . . . . . . . . . . . . 39
3.4 Calculating the SFC Program Capacity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Method for calculating the SFC program capacity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Number of steps required for expressing the SFC diagram as SFC dedicated instructions . . . . . . . . . . . . . . . . 42
2
Active step batch readout (MOV and DMOV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Active step batch readout (BMOV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Block START & END instructions (SET, RST) [BLm]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Block STOP and RESTART instructions (PAUSE, RSTART) [BLm]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Step START and END instructions (SET, RST) [Sn/BLm\Sn] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Forced transition EXECUTE & CANCEL instructions (SET, RST) [TRn/BLm\TRn] . . . . . . . . . . . . . . . . . . . . . 103
Active step change instruction (SCHG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Block switching instruction (BRSET) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.5 SFC Information Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
CONTENTS
Block START/END bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Step transition bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Block STOP/RESTART bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Block STOP mode bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Continuous transition bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Number of active steps register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.6 Step Transition Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.7 SFC Operation Mode Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
SFC program start mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Block 0 START condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Output mode at block STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Periodic execution block setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Operation mode at double block START . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Operation mode at transition to active step (double step START) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.8 SFC Comment Readout Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
SFC comment readout instruction (S(P). SFCSCOMR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
SFC transition comment readout instruction (S(P). SFCTCOMR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
3
6.4 Step START (Activate) and END (Deactivate) Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Step START (activate) methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Step END (deactivate) methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Changing an active step status
(Not available for Basic model QCPU, Universal model QCPU, and LCPU) . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6.5 Operation Methods for Continuous Transition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
6.6 Operation at Program Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Operation at program change made by write to PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Program change by online change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Online change (inactive block) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
APPENDICES 178
Appendix 1 Special Relay and Special Register List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Special Relay (SM) List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Special Register (SD) List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Appendix 2 MELSAP-II and MELSAP3 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
SFC Diagram Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
SFC Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Block/Step START, END, and STOP Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Basic model QCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
High Performance model QCPU, Process CPU, Redundant CPU and QnACPU. . . . . . . . . . . . . . . . . . . . . . . 189
Universal model QCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
LCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU,
and LCPU and Alternative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Step Transition Watchdog Timer Replacement Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Periodic Execution Block Replacement Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Forced Transition Bit (TRn) Replacement Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Active Step Change Instruction (SCHG) Replacement Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
INDEX 200
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206
4
RELEVANT MANUALS
Manual name [manual number] Description Available
form
GX Developer Version 8 Operating Manual (SFC) Describes how to create SFC programs using the software package for Print book
[SH-080374E] creating SFC programs.
PDF
GX Works2 Version1 Operating Manual (Common) Describes system configurations, parameter settings, online operations Print book
[SH-080779ENG] (common to Simple project and Structured project) of GX Works2.
PDF
TYPE SW2IVD/NX-GPPQ GPP Software package Operating Describes how to create SFC programs using the software package for Print book
Manual (SFC) creating SFC programs.
PDF
[IB-66776]
QnUCPU User's Manual (Function Explanation, Program Describes the functions, programming procedures, devices, etc. Print book
Fundamentals) necessary to create programs using the QCPU.
PDF
[SH-080807ENG]
Qn(H)/QnPH/QnPRHCPU User's Manual(Function Describes the functions, programming procedures, devices, etc. Print book
Explanation, Program Fundamentals) necessary to create programs using the QCPU.
PDF
[SH-080808ENG]
MELSEC-L CPU Module User's Manual (Function Explanation, Describes the functions required for programming, programming Print book
Program Fundamentals) methods, and devices.
e-Manual
[SH-080889ENG]
PDF
MELSEC-Q/L Programming Manual (Common Instruction) Describes how to use sequence instructions, basic instructions, and Print book
[SH-080809ENG] application instructions.
e-Manual
PDF
QnACPU Programming Manual (Common Instructions) Describes how to use sequence instructions, basic instructions, and Print book
[SH-080810ENG] application instructions. PDF
QnACPU Programming Manual (Fundamentals) Describes the programming procedures, device names, parameters, Print book
[IB-66614] program types, etc. necessary to create programs.
PDF
e-Manual refers to the Mitsubishi FA electronic book manuals that can be browsed using a dedicated tool.
e-Manual has the following features:
• Required information can be cross-searched in multiple manuals.
• Other manuals can be accessed from the links in the manual.
• The hardware specifications of each part can be found from the product figures.
• Pages that users often browse can be bookmarked.
5
TERMS
Unless otherwise specified, this manual uses the following generic terms and abbreviations.
Generic term Description
Basic A generic term for the Q00JCPU, Q00CPU, and Q01CPU
Basic model QCPU
High Performance A generic term for the Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, and Q25HCPU
High Performance model QCPU
High-speed Universal model A generic term for the Q03UDVCPU, Q04UDVCPU, Q06UDVCPU, Q13UDVCPU, and Q26UDVCPU
QCPU
LCPU A generic term for the L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-
BT, and L26CPU-PBT
Process CPU A generic term for the Q02PHCPU, Q06PHCPU, Q12PHCPU, and Q25PHCPU
QCPU A generic term for the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant CPU, and
Universal model QCPU
QnACPU A generic term for the Q2ASCPU, Q2ASCPU-S1, Q2ASHCPU, Q2ASHCPU-S1, Q2ACPU, Q2ACPU-S1, Q3ACPU,
Q4ACPU, and Q4ARCPU
QnCPU A generic term for the Q02CPU
QnHCPU A generic term for the Q02HCPU, Q06HCPU, Q12HCPU, and Q25HCPU
QnPHCPU A generic term for the Q02PHCPU, Q06PHCPU, Q12PHCPU, and Q25PHCPU
QnPRHCPU A generic term for the Q12PRHCPU and Q25PRHCPU
QnUD(E)(H)CPU A generic term for the Q03UDCPU, Q03UDECPU, Q04UDHCPU, Q04UDEHCPU, Q06UDHCPU, Q06UDEHCPU,
Q10UDHCPU, Q10UDEHCPU, Q13UDHCPU, Q13UDEHCPU, Q20UDHCPU, Q20UDEHCPU, Q26UDHCPU,
Q26UDEHCPU, Q50UDEHCPU, and Q100UDEHCPU
QnUDVCPU A generic term for the Q03UDVCPU, Q04UDVCPU, Q06UDVCPU, Q13UDVCPU, and Q26UDVCPU
QnUDPVCPU A generic term for the Q04UDPVCPU, Q06UDPVCPU, Q13UDPVCPU, and Q26UDPVCPU
Redundant CPU A generic term for the Q12PRHCPU and Q25PRHCPU
Universal A generic term for the Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, Q03UDCPU, Q03UDVCPU, Q03UDECPU,
Universal model QCPU Q04UDHCPU, Q04UDVCPU, Q04UDPVCPU, Q04UDEHCPU, Q06UDHCPU, Q06UDVCPU, Q06UDPVCPU,
Q06UDEHCPU, Q10UDHCPU, Q10UDEHCPU, Q13UDHCPU, Q13UDVCPU, Q13UDPVCPU, Q13UDEHCPU,
Q20UDHCPU, Q20UDEHCPU, Q26UDHCPU, Q26UDVCPU, Q26UDPVCPU, Q26UDEHCPU, Q50UDEHCPU, and
Q100UDEHCPU
Universal model Process CPU A generic term for the Q04UDPVCPU, Q06UDPVCPU, Q13UDPVCPU, and Q26UDPVCPU
6
1 GENERAL DESCRIPTION
1
SFC, an abbreviation for "Sequential Function Chart", is a control specification description format in which a sequence of
control operations is split into a series of steps to enable a clear expression of the program execution sequence and execution
conditions.
This manual describes the specifications, functions, instructions, programming procedures, etc. used to perform programming
with an SFC program using MELSAP3.
MELSAP3 can be used with the following CPU modules.
MELSAP3 conforms to the IEC Standard for SFC.
• Basic model QCPU whose serial number (first five digits) is 04122 or later
• High Performance model QCPU
• Process CPU
• Redundant CPU
• Universal model QCPU
• LCPU
• QnACPU
In this manual, MELSAP3 is referred to as SFC (program, diagram).
• The following functions cannot be executed if a parameter that sets the "high speed interrupt cyclic interval"
is loaded into a High Performance model QCPU of which the first 5 digits of the serial number are "04012"
or later. ( Step Transition Watchdog Timer, Periodic execution block setting)
• The Qn(H)CPU-A (A mode) cannot use MELSAP3 described in this manual. The SFC function that can be
used by the Qn(H)CPU-A (A mode) is "MELSAP-II". For MELSAP-II, refer to the "MELSAP-II (SFC)
Programming Manual".
1 GENERAL DESCRIPTION
7
1.1 Description of SFC Program
The SFC program consists of steps that represent units of operations in a series of machine operations. In each step, the
actual detailed control is programmed by using a ladder circuit.
The SFC program performs a series of operations, beginning from the initial step, proceeding to execute each subsequent
step as the transition conditions are satisfied, and ending with the END step.
• When the SFC program is started, the "initial" step is executed first.
• Execution of the initial step continues until transition condition 1 is satisfied. When this transition condition is satisfied,
execution of the initial step is stopped, and processing proceeds to the step which follows the initial step.
Processing of the SFC program continues from step to step in this manner until the END step has been executed.
1 GENERAL DESCRIPTION
8 1.1 Description of SFC Program
1.2 SFC (MELSAP3) Features
This section describes the SFC (MELSAP3) features.
1
1 GENERAL DESCRIPTION
1.2 SFC (MELSAP3) Features 9
Requires no complex interlock circuitry
Interlock circuits are used only in the operation output program for each step. Because no interlocks are required between
steps in the SFC program, it is not necessary to consider interlocks with regard to the entire system.
1 GENERAL DESCRIPTION
10 1.2 SFC (MELSAP3) Features
Block and step configurations can easily be changed for new control applications
• A total of 320 blocks *1 can be created in an SFC program.
1
• Up to 512 steps *1 can be created per block.
• Up to 2k sequence steps can be created for all blocks for operation outputs.
• Each transition condition can be created in only one ladder block.
Reduced tact times, as well as easier debugging and trial run operations are possible by dividing blocks and steps as follows:
• Divide blocks properly according to the operation units of machines.
• Divide steps in each block properly.
*1 For the following CPU modules, 128 blocks and 128 steps can be created.
Basic model QCPU
Universal model QCPU (Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU)
LCPU (L02SCPU, L02SCPU-P, L02CPU, L02CPU-P)
1 GENERAL DESCRIPTION
1.2 SFC (MELSAP3) Features 11
Creation of multiple initial steps is possible
Multiple processes can easily be executed and combined. Initial steps are linked using a "selection coupling" format. When
multiple initial steps (S0 to S3) are active, the step where the transition condition (t4 to t7) immediately prior to the selected
coupling is satisfied becomes inactive, and a transition to the next step occurs.
Moreover, when the transition condition immediately prior to an active step is satisfied, the next step is executed in
accordance with the parameter settings.
Basic model QCPU, Universal model QCPU, and LCPU cannot be selected in the parameter setting. It
operates in the default "Transfer" mode.
• Wait: Transition to the next step occurs after waiting for the next step to become inactive.
• Transfer: Transition to the next step occurs even if the next step is active. (Default)
• Pause: An error occurs if the next step is active.
1 GENERAL DESCRIPTION
12 1.2 SFC (MELSAP3) Features
Program design is easy due to a wealth of step attributes
A variety of step attributes can be assigned to each step. Used singly for a given control operation, or in combination, these
1
attributes greatly simplify program design procedures.
1 GENERAL DESCRIPTION
1.2 SFC (MELSAP3) Features 13
■Reset step
When a HOLD status becomes unnecessary for machine control, or on selective branching to a manual
ladder occurs after an error detection, etc., a reset request can be designated for the HOLD step, deactivating
the step in question.
1 GENERAL DESCRIPTION
14 1.2 SFC (MELSAP3) Features
A given function can be controlled in a variety of ways according to the application
Block functions such as START, END, temporary stop, restart, and forced activation and ending of specified steps can be
1
controlled by SFC diagram symbols, SFC control instructions, or by SFC information registers.
Control method Description
Control by SFC diagram symbols Convenient for control of automatic operations with easy sequential control.
Control by SFC instructions Enables requests from program files other than the SFC, and is convenient for error processing, for example
after emergency stops, and interrupt control.
Control by SFC information devices Enables control of SFC peripheral devices, and is convenient for partial operations such as debugging or trial
runs.
In cases where the same function can be executed by a number of methods, the first control method which has been
designated by the request output to the block or step in question will be the effective control method. Functions controlled by
a given control method can be canceled by another control method.
Ex.
For block START, the active block started by the SFC diagram can be forcibly ended by executing the SFC control instruction
before the END step or by turning OFF the block START/END bit of the SFC information devices.
1 GENERAL DESCRIPTION
1.2 SFC (MELSAP3) Features 15
Displays with comments for easy understanding
Comments can be entered at each step and transition condition item. Up to 32 characters can be entered.
MELSAP3
1 GENERAL DESCRIPTION
16 1.2 SFC (MELSAP3) Features
Convenient trace function (when using GPPQ with QnACPU)
Blocks can be synchronized and traced, enabling the user to check the operation timing of multiple blocks. Moreover, the
1
trace results display screen can be switched to display the trace result details for each block.
The trace function can be used during using GPPQ with QnACPU.
1 GENERAL DESCRIPTION
1.2 SFC (MELSAP3) Features 17
2 SYSTEM CONFIGURATION
This chapter describes the system configuration of the SFC program.
2 SYSTEM CONFIGURATION
18 2.1 Applicable CPU modules
2.2 Peripheral devices for SFC programs
The following peripheral devices can be used to create, edit and monitor SFC programs. The numbers in the following table
mean (1): Basic model QCPU, (2): High Performance model QCPU, (3): Process CPU, (4): Redundant CPU, (5): Universal
model QCPU, (6): LCPU,. and (7): QnACPU.
: Available, : Not available, : Partly available
2
Peripheral Software package to be installed in a personal CPU module
device computer (1) (2) (3) (4) (5) (6) (7)
Personal computer SW3D5C/F-GPPW-E
(Windows
SW4D5C-GPPW-E or later
compatible)
GX Developer Version 7.10L (SW7D5C-GPPW-E) or *2
later
GX Developer Version 8 (SW8D5C-GPPW-E) or later *2
*2
GX Developer Version 8.18U (SW8D5C-GPPW-E) or
later
GX Developer Version 8.48A (SW8D5C-GPPW-E) or *2 *1
later
GX Developer Version 8.62Q (SW8D5C-GPPW-E) or *2 *3
later
GX Developer Version 8.68W (SW8D5C-GPPW-E) or *4
later
GX Developer Version 8.78G (SW8D5C-GPPW-E) or *5
later
GX Developer Version 8.89T (SW8D5C-GPPW-E) or *5 *8
later
GX Works2 Version 1.24A (SW1DNC-GXW2-E) or later *5 *8
GX Works2 Version 1.25B (SW1DNC-GXW2-E) or later *6 *8
*6 *7
GX Works2 Version 1.56J (SW1DNC-GXW2-E) or later
GX Works2 Version 1.98C (SW1DNC-GXW2-E) or later *9 *10
GX Works2 Version 1.492N (SW1DNC-GXW2-E) or later
PC/AT compatible SW2IVD-GPPQ-E
personal computer
Q6PU *11
2 SYSTEM CONFIGURATION
2.2 Peripheral devices for SFC programs 19
3 SPECIFICATIONS
This chapter describes the specifications of SFC programs.
• The created sequence program and SFC program names are MAIN.QPG and MAIN-SFC.QPG. (The file
names cannot be changed.)
• The SFC program and sequence program are processed in order of "sequence program" and "SFC
program". (The processing order of the SFC program and sequence program cannot be changed.)
3 SPECIFICATIONS
20 3.1 Performance Specifications Related to SFC Programs
QCPU (except Basic model QCPU), LCPU
■Performance specifications
Item Q02CPU, Q06HCPU, Q12HCPU, Q25HCPU,
Q02HCPU, Q06PHCPU Q12PHCPU, Q25PHCPU,
Q02PHCPU Q12PRHCPU Q25PRHCPU
SFC Capacity Max. 28k steps Max. 60k steps Max. 124k steps Max. 252k steps
program
Number of files Scannable SFC program: 2 files (1 normal SFC program and 1 program execution management
SFC program)*1
Number of blocks Max. 320 blocks (0 to 319) 3
Number of SFC steps Max. 8192 steps for all blocks, max. 512 steps for one block
Number of branches Max. of 32
Number of concurrently active steps Max. 1280 steps for all blocks, max. 256 steps for one block
(including HOLD steps)
Number of operation output sequence Max. 2k steps for all blocks*2, no restriction on one step
steps
Number of transition condition sequence One ladder block only
steps
Step transition watchdog timer function Function exists (10 timers)
3 SPECIFICATIONS
3.1 Performance Specifications Related to SFC Programs 21
Item Q20UDHCPU, Q26UDHCPU, Q50UDEHCPU Q100UDEHCPU
Q20UDEHCPU Q26UDVCPU,
Q26UDPVCPU,
Q26UDEHCPU
SFC Capacity Max. 200k steps Max. 260k steps Max. 500k steps Max. 1000k steps
program
Number of files Scannable SFC program: 1 (normal SFC program only)
Number of blocks Max. 320 blocks (0 to 319)
Number of SFC steps Max. 16384 steps for all blocks*3*4, max. 512 steps for one block
Number of branches Max. of 32
Number of concurrently active steps Max. 1280 steps for all blocks, max. 256 steps for one block
(including HOLD steps)
Number of operation output sequence Max. 2k steps for all blocks*2, no restriction on one step
steps
Number of transition condition sequence One ladder block only
steps
Step transition watchdog timer function None
3 SPECIFICATIONS
22 3.1 Performance Specifications Related to SFC Programs
Item L02SCPU, L02SCPU-P, L06CPU, L06CPU-P L26CPU, L26CPU-P,
L02CPU, L02CPU-P L26CPU-BT, L26CPU-PBT
SFC Capacity Max. 20k steps Max. 60k steps Max. 260k steps
program
Number of files Scannable SFC program: 1 (normal SFC program only)
Number of blocks Max. 128 blocks (0 to 127) Max. 320 blocks (0 to 319)
Number of SFC steps Max. 1024 steps for all blocks, Max. 16384 steps for all blocks*5, max. 512 steps for one block
max. 128 steps for one block
Number of branches Max. of 32
Number of concurrently active steps
(including HOLD steps)
Max. 1024 steps for all blocks,
max. 128 steps for one block
Max. 1280 steps for all blocks, max. 256 steps for one block
3
Number of operation output sequence Max. 2k steps for all blocks*2, no restriction on one step
steps
Number of transition condition sequence One ladder block only
steps
Step transition watchdog timer function None
*1 Refer to Page 152 SFC program for program execution management for the program execution management SFC program.
*2 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
*3 For the Universal model QCPU whose serial number (first five digits) is "12051" or earlier, the maximum number of SFC steps is 8192
for all blocks.
*4 For the Universal model QCPU whose serial number (first five digits) is "12052" or later, the maximum number of SFC steps can be
changed by changing the step relay (S) points in the Device tab of the PLC parameter dialog box. For settings, refer to the QnUCPU
User's Manual (Function Explanation, Program Fundamentals).
*5 For the modules whose serial number (first five digits) is "15101" or earlier, the maximum number of steps is 8,192.
3 SPECIFICATIONS
3.1 Performance Specifications Related to SFC Programs 23
■Precautions for creating SFC programs
• The SFC programs that can be created are "scan execution type program" and "stand-by type program".
• Two SFC programs (one normal SFC program and one program execution management SFC program) can be set as a
scan execution type program.*2
• More than one SFC program can be set as a stand-by type program.
• The stand-by type SFC program is executed in the following procedure.
1. The currently executed scan execution type program is switched to the stand-by type program by using the POFF
instruction.
2. The stand-by type program to be executed is switched to the scan execution type program by using the PSCAN
instruction. Use the PSCAN instruction to switch the execution type of the program.
For details on the PSCAN and POFF instructions, refer to the Programming Manual (Common Instructions) for the CPU
module used.
*2
*1
*1 The Redundant CPU, Universal model QCPU, and LCPU cannot execute the low-speed execution type program.
*2 The program execution management cannot set on the Universal model QCPU and LCPU.
3 SPECIFICATIONS
24 3.1 Performance Specifications Related to SFC Programs
QnACPU
■Performance specifications
Item Q2ACPU, Q2ACPU-S1, Q3ACPU Q4ACPU,
Q2ASCPU, Q2ASCPU-S1, Q4ARCPU
Q2ASHCPU Q2ASHCPU-S1
SFC program Capacity Max. 28k steps Max. 60k steps Max. 92k steps Max. 124k steps
Number of files Scannable SFC program: 2 files (1 normal SFC program and 1 program execution
management SFC program)*1
Number of blocks Max. 320 blocks (0 to 319) 3
Number of SFC steps Max. 8192 steps for all blocks, max. 512 steps for one block
Number of branches Max. of 32
Number of concurrently active steps Max. 1280 steps for all blocks, max. 256 steps for one block
(including HOLD steps)
Number of operation output sequence Max. 2k steps for all blocks*3, no restriction on one step
steps
Number of transition condition One ladder block only
sequence steps
STEP- Break All-block break Batch break setting for all blocks
RUN Designated block break Up to 64 blocks can be set for the designated blocks.
operation
function Designated step break/number of Up to 64 points can be set for the designated steps./1 to 255 times
cycles
Continue Designated block continue 1 block is set for the designated block.
Designated step continue 1 point is set for the designated step.
Continue from designated step 1 point is set for the designated step.
Forced Forced block execution 1 block is set for the designated block.
execution Forced 1 step execution for 1 point is set for the designated step.
designated step
Forced block end 1 block is set for the designated block.
Forced step end 1 point is set for the designated step.
Step trace function*2 Trace memory capacity Max. 48k bytes for all blocks, 1 to 48k bytes for one block (1k byte units)
(A memory card is
Trace memory capacity after trigger 128 bytes to capacity setting of each block
required.)
Block designation Max. 12 blocks
Trigger step 1 step per block
Execution condition Per designated time or per scan
Step transition watchdog timer function Function exists (10 timers)
*1 Refer to Page 152 SFC program for program execution management for the program execution management SFC program.
*2 This function can be executed only when the software package for personal computer is SW2IVD-GPPW/SW2NX-GPPW.
*3 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
3 SPECIFICATIONS
3.1 Performance Specifications Related to SFC Programs 25
■Precautions for creating SFC programs
• The SFC programs that can be created are "scan execution type program" and "stand-by type program".
• Two SFC programs (one normal SFC program and one program execution management SFC program) can be set as a
scan execution type program.
• More than one SFC program can be set as a stand-by type program.
• The stand-by type SFC program is executed in the following procedure.
1. The currently executed scan execution type program is switched to the stand-by type program. Use the POFF instruction
to switch the execution type of the program. (Refer to the Programming Manual (Common Instructions) for the CPU
module used.)
2. The stand-by type program to be executed is switched to the scan execution type program. Use the PSCAN instruction
to switch the execution type of the program. (Refer to the Programming Manual (Common Instructions) for the CPU
module used.)
3 SPECIFICATIONS
26 3.1 Performance Specifications Related to SFC Programs
3.2 Device List
This section describes the transition conditions of SFC programs and devices used for operation output.
Internal user
device
Bit device Input 2048 points X0 to X7FF Hexadecimal Can be changed within
16.4k words.*3
3
Output 2048 points Y0 to Y7FF Hexadecimal
Internal relay 8192 points M0 to M8191 Decimal
Latch relay 2048 points L0 to L2047 Decimal
Annunciator 1024 points F0 to F1023 Decimal
Edge relay 1024 points V0 to V1023 Decimal
Step relay 2048 points S0 to S127/block Decimal
Link relay 2048 points B0 to B7FF Hexadecimal
Link special relay 1024 points SB0 to SB3FF Hexadecimal
Word Timer*1 512 points T0 to T511 Decimal
device
Retentive timer*1 0 point (ST0 to ST511) Decimal
Counter*1 512 points C0 to C511 Decimal
Data register 11136 points D0 to D1135 Hexadecimal
Link register 2048 points W0 to W7FF Hexadecimal
Link special register 1024 points SW0 to SW3FF Hexadecimal
Internal system Bit device Function input 16 points FX0 to FXF Hexadecimal N/A
device
Function output 16 points FY0 to FYF Hexadecimal
Special relay 1024 points SM0 to SM1023 Decimal
Word Function register 5 points FD0 to FD4 Decimal
device
Special register 1024 points SD0 to SD1023 Decimal
Link direct Bit device Link input 8192 points Jn\X0 to Jn\X1FFF Hexadecimal N/A
device
Link output 8192 points Jn\Y0 to Jn\Y1FFF Hexadecimal
Link relay 16384 points Jn\B0 to Jn\B3FFF Hexadecimal
Link special relay 512 points Jn\SB0 to Jn\SB1FF Hexadecimal
Word Link register 16384 points Jn\W0 to Jn\W3FFF Hexadecimal
device
Link special register 512 points Jn\SW0 to Jn\SW1FF Hexadecimal
Module access Word Intelligent function module device 65536 points Un\G0 to Decimal N/A
device device Un\G65535*2
Index register Word Index register 10 points Z0 to Z9 Decimal N/A
device
File register*5 Word File register 64K points • R0 to R32767 Decimal N/A
device • ZR0 to 65535
Nesting Nesting 15 points N0 to N14 Decimal N/A
Pointer Pointer 300 points P0 to P299 Decimal N/A
Interrupt pointer 128 points I0 to I27 Decimal N/A
Others Bit device SFC block device 128 points BL0 to BL127 Decimal N/A
Network No. specification device 239 points J1 to J239 Decimal N/A
I/O No. specification Q00JCPU U0 to UF Hexadecimal N/A
device
Q00CPU, U0 to U3F
Q01CPU
Macro instruction argument device VD0 to VD Decimal N/A
Constant Decimal constant K-2147483648 to K2147483647
Hexadecimal constant H0 to HFFFFFFFF
Real constant E1.17550-38 to E3.40282+38
Character string constant "ABC", "123"*4
3 SPECIFICATIONS
3.2 Device List 27
*1 For the timer, retentive timer, and counter, contact/coil values are stored in bit devices, and current values are stored in word devices.
*2 The number of points that can be actually used varies depending on the intelligent function module. For the points in the buffer memory,
refer to the manual for the intelligent function module used.
*3 The value can be changed in the Device setting of the PLC parameter dialog box. (Except for input, output, step relay, link special relay,
and link special register) Refer to the User's Manual (Function Description/Program Fundamentals) of the CPU module used.
*4 Character strings can be used only for the $MOV, STR, DSTR, VAL, DVAL, ESTR, and EVAL instructions. They cannot be used for the
other instructions.
*5 Because the Q00JCPU does not have the standard RAM, the file register cannot be used.
3 SPECIFICATIONS
28 3.2 Device List
Device list of High Performance model QCPU, Process CPU, and Redundant CPU
Classification Type Device name Default Parameter setting
Point Range range
Internal user Bit device Input 8192 points X0 to X1FFF Hexadecimal Can be changed within
device 29k words.*3
Output 8192 points Y0 to Y1FFF Hexadecimal
Internal relay 8192 points M0 to M8191 Decimal
Latch relay 8192 points L0 to L8191 Decimal
Annunciator
Edge relay
2048 points
2048 points
F0 to F2047
V0 to V2047
Decimal
Decimal
3
Step relay 8192 points S0 to S511/block Decimal
Link relay 8192 points B0 to B1FFF Hexadecimal
Link special relay 2048 points SB0 to SB7FF Hexadecimal
Word Timer*1 2048 points T0 to T2047 Decimal
device
Retentive timer*1 0 point (ST0 to ST2047) Decimal
Counter*1 1024 points C0 to C1023 Decimal
Data register 12288 points D0 to D12287 Hexadecimal
Link register 8192 points W0 to W1FFF Hexadecimal
Link special register 2048 points SW0 to SW7FF Hexadecimal
Internal system Bit device Function input 16 points FX0 to FXF Hexadecimal N/A
device
Function output 16 points FY0 to FYF Hexadecimal
Special relay 2048 points SM0 to SM2047 Decimal
Word Function register 5 points FD0 to FD4 Decimal
device
Special register 2048 points SD0 to SD2047 Decimal
Link direct Bit device Link input 8192 points Jn\X0 to Jn\X1FFF Hexadecimal N/A
device
Link output 8192 points Jn\Y0 to Jn\Y1FFF Hexadecimal
Link relay 16384 points Jn\B0 to Jn\B3FFF Hexadecimal
Link special relay 512 points Jn\SB0 to Jn\SB1FF Hexadecimal
Word Link register 16384 points Jn\W0 to Jn\W3FFF Hexadecimal
device
Link special register 512 points Jn\SW0 to Jn\SW1FF Hexadecimal
Module access Word Intelligent function module device 65536 points Un\G0 to Decimal N/A
device device Un\G65535*2
Word Cyclic transmission area device*4 4096 points U3En\G0 to Decimal Setting available
device U3En\G4095
Index register Word Index register 16 points Z0 to Z15 Decimal N/A
device
File register Word File register 0 point 0 to 1018K points
device
Nesting Nesting 15 points N0 to N14 Decimal N/A
Pointer Pointer 4096 points P0 to P4095 Decimal N/A
Interrupt pointer 256 points I0 to I255 Decimal N/A
Others Bit device SFC block device 320 points BL0 to BL319 Decimal N/A
Bit device SFC transition device 512 points TR0 to TR511 Decimal N/A
Network No. specification device 255 points J1 to J255 Decimal N/A
I/O No. specification device U0 to UFF Hexadecimal N/A
Macro instruction argument device VD0 to VD Decimal N/A
Constant Decimal constant K-2147483648 to K2147483647
Hexadecimal constant H0 to HFFFFFFFF
Real constant • Single-precision floating-point data: E1.17549435-38 to E3.40282347+38
• Double-precision floating-point data: E2.2250738585072014-308 to
E1.7976931348623157+308
Character string constant "ABC", "123"
3 SPECIFICATIONS
3.2 Device List 29
*1 For the timer, retentive timer, and counter, contact/coil values are stored in bit devices, and current values are stored in word devices.
*2 The number of points that can be actually used varies depending on the intelligent function module. For the points in the buffer memory,
refer to the manual for the intelligent function module used.
*3 The value can be changed in the Device setting of the PLC parameter dialog box. (Except for input, output, step relay, link special relay,
and link special register) Refer to the User's Manual (Function Description/Program Fundamentals) of the CPU module used.
*4 Available only in a multiple CPU system configuration.
3 SPECIFICATIONS
30 3.2 Device List
Device list of Universal model QCPU
Classification Type Device name Default Parameter setting
Point Range range
Internal user Bit device Input 8192 points X0 to X1FFF Hexadecimal Can be changed within
device 29k words.*3*19
Output 8192 points Y0 to Y1FFF Hexadecimal
Internal relay 8192 points*20 M0 to M8191*21 Decimal
Latch relay 8192 points L0 to L8191 Decimal
Annunciator
Edge relay
2048 points
2048 points
F0 to F2047
V0 to V2047
Decimal
Decimal
3
Step relay 8192 points S0 to S511/block Decimal
Link relay 8192 points B0 to B1FFF Hexadecimal
Link special relay 2048 points SB0 to SB7FF Hexadecimal
Word Timer*1 2048 points T0 to T2047 Decimal
device
Retentive timer*1 0 point (ST0 to ST2047) Decimal
Counter*1 1024 points C0 to C1023 Decimal
Data register 12288 points*22 D0 to D12287*23 Hexadecimal
Link register 8192 points W0 to W1FFF Hexadecimal
Link special register 2048 points SW0 to SW7FF Hexadecimal
Internal system Bit device Function input 16 points FX0 to FXF Hexadecimal N/A
device
Function output 16 points FY0 to FYF Hexadecimal
Special relay 2048 points SM0 to SM2047 Decimal
Word Function register 5 points FD0 to FD4 Decimal
device
Special register 2048 points SD0 to SD2047 Decimal
Link direct Bit device Link input 16384 points*14 Jn\X0 to Jn\X3FFF*15 Hexadecimal N/A
device *14 *15
Link output 16384 points Jn\Y0 to Jn\Y3FFF Hexadecimal
Link relay 32768 points Jn\B0 to Jn\B7FFF Hexadecimal
Link special relay 512 points Jn\SB0 to Jn\SB1FF Hexadecimal
Word Link register 131072 points Jn\W0 to Jn\W1FFFF Hexadecimal
device
Link special register 512 points Jn\SW0 to Jn\SW1FF Hexadecimal
Module access Word Intelligent function module device 65536 points Un\G0 to Decimal N/A
device device Un\G65535*2
Word Cyclic transmission area device*4 4096 points U3En\G0 to Decimal N/A
device U3En\G4095
14336 points U3En\G10000 to Decimal Setting available
U3En\G24335
Index register/ Word Index register/standard device register 20 points Z0 to Z19 Decimal N/A
standard device device
register
File register*7 Word File register 0 point 0 to 4086K points*6
device
Extended data Word Extended data register 0 point*16
register*7 device
Extended link Word Extended link register 0 point
register*7 device
Nesting Nesting 15 points N0 to N14 Decimal N/A
Pointer Pointer 4096 P0 to P4095*9*18 Decimal N/A
points*8*17
Interrupt pointer 256 points*10 I0 to I255*11 Decimal N/A
Others Bit device SFC block device 320 points*25 BL0 to BL319*12 Decimal N/A
Network No. specification device 255 points J1 to J255 Decimal N/A
I/O No. specification device 516 points U0 to FF, U3E0 to Hexadecimal N/A
U3E3*13
Macro instruction argument device 10 points VD0 to VD9 Decimal N/A
3 SPECIFICATIONS
3.2 Device List 31
Classification Type Device name Default Parameter setting
Point Range range
*1 For the timer, retentive timer, and counter, contact/coil values are stored in bit devices, and current values are stored in word devices.
*2 The number of points that can be actually used varies depending on the intelligent function module. For the points in the buffer memory,
refer to the manual for the intelligent function module used.
*3 The number of points can be changed (except for input, output, and step relay) in the Device tab of the PLC parameter dialog box. Note
that the step relay points can be changed to 0 point for the Universal model QCPU whose serial number (first five digits) is "10042" or
later. For the Universal model QCPU whose serial number (first five digits) is "12052" or later, the step relay points can be set in
increments of 1k points and up to the following points.
Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU: 8192 points
Universal model QCPUs other than the Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU: 16384 points
*4 Available only in a multiple CPU system configuration.
*5 Up to 15 digits can be entered in GX Developer.
*6 The total of the points for the file register, extended data register (D), and extended link register (W)
*7 The device cannot be used on the Q00UJCPU.
*8 For the Q00UJCPU, Q00UCPU, and Q01UCPU, the number of points is 512.
*9 For the Q00UJCPU, Q00UCPU, and Q01UCPU, the range is P0 to P511.
*10 For the Q00UJCPU, Q00UCPU, and Q01UCPU, the number of points is 128.
*11 For the Q00UJCPU, Q00UCPU, and Q01UCPU, the range is I0 to I127.
*12 For the Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU, the range is BL0 to BL127.
*13 The range differs depending on the CPU module: U0 to UF for the Q00UJCPU; U0 to U3F and U3E0 to 3E2 for the Q00UCPU and
Q01UCPU; and U0 to U7F and U3E0 to U3E2 for the Q02UCPU.
*14 For the Universal model QCPU whose serial number (first five digits) is "12011" or earlier, the number of points is 8192.
*15 For the Universal model QCPU whose serial number (first five digits) is "12011" or earlier, the range is Jn\X/Y0 to Jn\1FFF.
*16 For the Q50UDEHCPU and Q100UDEHCPU, the number of points is 128k.
*17 For the Q50UDEHCPU and Q100UDEHCPU, the number of points is 8192.
*18 For the Q50UDEHCPU and Q100UDEHCPU, the range is P0 to P8191.
*19 The changeable range differs depending on the CPU module: within 30k words for the Q03UDVCPU; within 40k words for the
Q04UDVCPU, Q04UDPVCPU, Q06UDVCPU, and Q06UDPVCPU; and within 60k words for the Q13UDVCPU, Q13UDPVCPU,
Q26UDVCPU, and Q26UDPVCPU.
*20 The number of points differs depending on the CPU module: 9216 for the Q03UDVCPU; 15360 for the Q04UDVCPU, Q04UDPVCPU,
Q06UDVCPU, and Q06UDPVCPU; and 28672 for the Q13UDVCPU, Q13UDPVCPU, Q26UDVCPU, and Q26UDPVCPU.
*21 The range differs depending on the CPU module: M0 to M9215 for the Q03UDVCPU; M0 to M15359 for the Q04UDVCPU,
Q04UDPVCPU, Q06UDVCPU, and Q06UDPVCPU; and M0 to M28671 for the Q13UDVCPU, Q13UDPVCPU, Q26UDVCPU, and
Q26UDPVCPU.
*22 The number of points differs depending on the CPU module: 13312 for the Q03UDVCPU; 22528 for the Q04UDVCPU, Q04UDPVCPU,
Q06UDVCPU, and Q06UDPVCPU; and 41984 for the Q13UDVCPU, Q13UDPVCPU, Q26UDVCPU, and Q26UDPVCPU.
*23 The range differs depending on the CPU module: D0 to D13311 for the Q03UDVCPU; D0 to D22527 for the Q04UDVCPU,
Q04UDPVCPU, Q06UDVCPU, and Q06UDPVCPU; and D0 to D41983 for the Q13UDVCPU, Q13UDPVCPU, Q26UDVCPU, and
Q26UDPVCPU.
*24 The setting range differs depending on the CPU module: 0 to 4192k points for the Q03UDVCPU, 0 to 4224k points for the Q04UDVCPU
and Q04UDPVCPU, 0 to 4480k points for Q06UDVCPU and Q06UDPVCPU, 0 to 4608k points for the Q13UDVCPU and
Q13UDPVCPU, and 0 to 4736k points for the Q26UDVCPU and Q26UDPVCPU.
*25 For the Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU, the number of points is 128.
3 SPECIFICATIONS
32 3.2 Device List
Device list of LCPU
Classification Type Device name Default Parameter setting
Point Range range
Internal user Bit device Input 8192 points X0 to X1FFF Hexadecimal Setting available (Up to
device 29K words for the
Output 8192 points Y0 to Y1FFF Hexadecimal
internal user device)*6
Internal relay 8192 points M0 to M8191 Decimal
Latch relay 8192 points L0 to L8191 Decimal
Link relay
Annunciator
8192 points
2048 points
B0 to B1FFF
F0 to F2047
Hexadecimal
Decimal
3
Link special relay 2048 points SB0 to SB7FF Hexadecimal
Edge relay 2048 points V0 to V2047 Decimal
Step relay 8192 points S0 to S8191 Decimal
Word Timer*8 2048 points T0 to T2047 Decimal
device
Retentive timer*8 0 point (ST0 to ST2047) Decimal
Counter*8 1024 points C0 to C1023 Decimal
Data register 12288 points D0 to D12287 Hexadecimal
Link register 8192 points W0 to W1FFF Hexadecimal
Link special register 2048 points SW0 to SW7FF Hexadecimal
Internal system Bit device Function input 16 points FX0 to FXF Hexadecimal N/A
device
Function output 16 points FY0 to FYF Hexadecimal
Special relay 2048 points SM0 to SM2047 Decimal
Word Function register 5 points FD0 to FD4 Decimal
device
Special register 2048 points SD0 to SD2047 Decimal
Module access Word Intelligent function module device 65536 points Un\G0 to Decimal N/A
device device Un\G65535*2
Index register/ Word Index register/standard device register 20 points Z0 to Z19 Decimal N/A
standard device device
register
File register Word File register 0 point Decimal 0 to 384K points in
device total*3 (in 1K units)
Extended data Word Extended data register 128K points D12288 to D143359 *1 Decimal
register device
Extended link Word Extended link register 0 point Hexadecimal
register device
Nesting Nesting 15 points N0 to N14 Decimal N/A
Pointer Pointer 4096 points*7 P0 to P4095*7 Decimal N/A*7
Interrupt pointer 256 points I0 to I255 Decimal N/A
Others Bit device SFC block device 320 points BL0 to BL319*4 Decimal N/A
*5
I/O No. specification device U0 to FF Hexadecimal N/A
Macro instruction argument device 10 points VD0 to VD9 Decimal N/A
*1 For the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P, the number of points is 32K (D12288 to D45055).
*2 The number of points that can be actually used varies depending on the intelligent function module. Refer to the manual for each
intelligent function module.
*3 For the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P, the total number of points is 0 to 64K.
*4 For the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P, the number of points is 128 (BL0 to B127).
*5 For the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P, the range is U0 to U3F.
*6 For the LCPU whose serial number (first five digits) is "15101" or earlier, either 0K point or 8K point can be set for the step relay. For the
LCPU whose serial number (first five digits) is "15102" or later, the step relay points can be set up to the following points.
L02(S)CPU, L02(S)CPU-P: 8192 points
Other models: 16384 points
*7 For the L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, and L26CPU-PBT whose serial number (first five digits) is "16042" or
later, the pointer for automatic-assign device is extended up to 32768 points in the Device tab of the PLC parameter dialog box. For
details, refer to the MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals).
*8 For the timer, retentive timer, and counter, contact/coil values are stored in bit devices, and current values are stored in word devices.
3 SPECIFICATIONS
3.2 Device List 33
Device list of QnACPU
Classification Type Device name Default Parameter setting
Point Range range
Internal user Bit device Input*3 8192 points X0 to X1FFF Hexadecimal Setting available (Up to
device 29K words for the
Output*3 8192 points Y0 to Y1FFF Hexadecimal
internal user device)*3
Internal relay 8192 points M0 to M8191 Decimal
Latch relay 8192 points L0 to L8191 Decimal
Annunciator 2048 points F0 to F2047 Decimal
Edge relay 2048 points V0 to V2047 Decimal
Step relay *3 8192 points S0 to S8191 Decimal
Link relay 8192 points B0 to B1FFF Hexadecimal
Link special relay*3 2048 points SB0 to SB7FF Hexadecimal
Word Timer*1 2048 points T0 to T2047 Decimal
device
Retentive timer*1 0 point (ST0 to ST2047) Decimal
Counter*1 1024 points C0 to C1023 Decimal
Data register 12288 points D0 to D12287 Hexadecimal
Link register 8192 points W0 to W1FFF Hexadecimal
Link special register*3 2048 points SW0 to SW7FF Hexadecimal
Internal system Bit device Function input 16 points FX0 to FXF Hexadecimal N/A
device
Function output 16 points FY0 to FYF Hexadecimal
Special relay 2048 points SM0 to SM2047 Decimal
Word Function register 5 points FD0 to FD4 Decimal
device
Special register 2048 points SD0 to SD2047 Decimal
Link direct Bit device Link input 8192 points Jn\X0 to Jn\X1FFF Hexadecimal N/A
device
Link output 8192 points Jn\Y0 to Jn\Y1FFF Hexadecimal
Link relay 8192 points Jn\B0 to Jn\B1FFF Hexadecimal
Link special relay 512 points Jn\SB0 to Jn\SB1FF Hexadecimal
Word Link register 8192 points Jn\W0 to Jn\W1FFF Hexadecimal
device
Link special register 512 points Jn\SW0 to Jn\SW1FF Hexadecimal
Special function Word Buffer register 16384 points Un\G0 to Decimal N/A
module device device Un\G16383*2
Index register Word Index register/standard device register 16 points Z0 to Z15 Decimal N/A
device
File register Word File register 0 point Decimal 0 to 1024K points
device
Nesting Nesting 15 points N0 to N14 Decimal N/A
Pointer Pointer 4096 points P0 to P4095 Decimal N/A
Interrupt pointer 48 points I0 to I47 Decimal N/A
Others Bit device SFC block device 320 points BL0 to BL319 Decimal N/A
Bit device SFC transition device 512 points TR0 to TR511 Decimal
Network No. specification device 255 points J1 to J255 Decimal
I/O No. specification device U0 to FF Hexadecimal
Constant Decimal constant K-2147483648 to K2147483647
Hexadecimal constant H0 to HFFFFFFFF
Real constant E1.17549435-38 to E3.40282347+38
Character string constant "ABC", "123"
*1 For the timer, retentive timer, and counter, contact/coil values are stored in bit devices, and current values are stored in word devices.
*2 The number of points that can be actually used varies depending on the intelligent function module. Refer to the manual for each
intelligent function module.
*3 The values of the input, output, step relay, link special relay, and link special register are fixed to the default values, and cannot be
changed.
3 SPECIFICATIONS
34 3.2 Device List
3.3 Processing Time
This section describes the processing time for SFC programs.
3 SPECIFICATIONS
3.3 Processing Time 35
■System processing times for different CPU module models
This section describes the system processing time for each CPU module.
• When Basic model QCPU is used
Item Q00JCPU Q00CPU Q01CPU
Active block processing time coefficient 41.9s 35.5s 27.3s
Inactive block processing time coefficient 10.5s 8.8s 6.8s
Nonexistent block processing time coefficient 1.1s 0.9s 0.7s
Active step processing time coefficient 31.6s 26.7s 20.5s
Active transition processing time coefficient 10.2s 8.7s 6.7s
Transition condition- With HOLD step 216.0s 182.8s 140.6s
satisfied step processing designation*1
time coefficient
Normal step designation 263.5s 222.9s 171.5s
SFC end processing time 66.8s 56.5s 43.5s
• When High Performance model QCPU, Process CPU or Redundant CPU is used
Item QnCPU QnHCPU QnPHCPU QnPRHCPU
Active block processing time coefficient 33.7s 14.5s 14.5s 14.5s
Inactive block processing time coefficient 12.0s 5.2s 5.2s 5.2s
Nonexistent block processing time coefficient 4.1s 1.8s 1.8s 1.8s
Active step processing time coefficient 24.5s 10.6s 10.6s 10.6s
Active transition processing time coefficient 10.0s 4.3s 4.3s 4.3s
Transition condition- With HOLD step 130.4s 56.2s 56.2s 56.2s
satisfied step processing designation*1
time coefficient
Normal step designation 119.4s 51.5s 51.5s 51.5s
SFC end processing time 108.2s 46.6s 46.6s 46.6s
3 SPECIFICATIONS
36 3.3 Processing Time
• LCPU
Item L02SCPU, L02CPU, L06CPU, L06CPU-P, L26CPU, L26CPU-P,
L02SCPU-P L02CPU-P L26CPU-BT, L26CPU-PBT
Active block processing time coefficient 12.7s 8.5s 7.0s
Inactive block processing time coefficient 5.3s 3.8s 3.4s
Nonexistent block processing time coefficient 0.9s 1.2s 0.6s
Active step processing time coefficient 11.9s 8.7s 6.4s
Active transition processing time coefficient 3.4s 2.0s 1.6s
Transition condition- With HOLD step 86.7s 66.1s 42.7s
satisfied step processing designation*1 3
time coefficient
Normal step designation 106.9s 79.4s 52.0s
SFC end processing time 67.5s 44.7s 26.9s
• QnACPU
Item Q4ACPU, Q4ARCPU, Q3ACPU Q2ACPU(S1),
Q2ASHCPU(S1) Q2ASCPU(S1)
Active block processing time coefficient 30.6s 61.2s 32.6s
Inactive block processing time coefficient 10.7s 21.3s 28.8s
Nonexistent block processing time coefficient 4.6s 9.2s 12.5s
Active step processing time coefficient 23.2s 46.4s 62.7s
Active transition processing time coefficient 9.4s 18.7s 25.2s
Transition condition- With HOLD step 137.2s 274.3s 370.4s
satisfied step processing designation*1
time coefficient
Normal step designation 122.5s 245.1s 330.9s
SFC end processing time 89.7s 179.3s 242.1s
*1 The HOLD step includes all of the coil hold steps and operation hold steps (with or without transition check). The Normal step represents
steps other than the above.
Ex.
[SFC system processing time calculation example]
Using the Q25HCPU as an example, the processing time for the SFC system is calculated as shown below, given the
following conditions.
• Designated at initial START
• Number of active blocks: 30 (active blocks at SFC program)
• Number of inactive blocks: 70 (inactive blocks at SFC program)
• Number of nonexistent blocks: 50 (number of blocks between 0 and the max. created block No. which have no SFC
program)
• Number of active steps: 60 (active steps within active blocks)
• Active step transition conditions: 60
• Steps with satisfied transition conditions: 10 (active steps (no HOLD steps) with satisfied transition conditions)
SFC system process time = (14.5 30) + (5.2 70) + (1.8 50)+ (10.6 60) + (4.3 60) + (56.2 10) + 46.6 =
2391.6s 2.40 ms
In this case, calculation using the equation shown above results in an SFC system processing time of 2.40 ms.
With the Q4ACPU, given the same conditions, the processing time would be 5.32 ms. The scan time is the total of the
following times: SFC system processing time, main sequence program processing time, processing time of ladder circuit
having transition conditions associated with SFC's active steps, and CPU module's END processing time.
The number of active steps, the number of transition conditions, and the number of steps with satisfied transition conditions
varies according to the conditions shown below.
• When transition condition is unsatisfied
• When transition condition is satisfied (without continuous transition)
• When transition condition is satisfied (with continuous transition)
3 SPECIFICATIONS
3.3 Processing Time 37
The method for determining the number of the above items is illustrated in the SFC diagram below.
The following table indicates the number of active steps, number of active transitions, and number of transition condition-
satisfied steps when Step 2 and Step 6 are active.
Whether Transition Presence/Absence of Number of Active Steps Number of Active Number of Transition
Conditions Are Satisfied Continuous Transitions Condition-Satisfied
or Not Transition Steps
Transition conditions not 2 (Steps 2, 6) 2 (Transition conditions 2, 5) 0
satisfied
• Transition conditions 2, 5 Absence 2 (Steps 2, 6) 2 (Transition conditions 2, 5) 2 (Steps 2, 6)
satisfied
Presence 4 (Steps 2, 3, 6, 7) 4 (Transition conditions 2, 3, 2 (Steps 2, 6)
• Transition conditions 3, 6 not
5, 6)
satisfied
Transition conditions 2, 3, 5, 6 Absence 2 (Steps 2, 6) 2 (Transition conditions 2, 5) 2 (Steps 2, 6)
satisfied
Presence 6 (Steps 2 to 4, 6 to 8) 6 (Transition conditions 2 to 4 (Steps 2, 3, 6, 7)
7)
3 SPECIFICATIONS
38 3.3 Processing Time
Processing time for S(P).SFCSCOMR instruction and
S(P).SFCTCOMR instruction
Processing time for S(P).SFCSCOMR instruction and S(P).SFCTCOMR instruction is shown below.
[Condition]
• The number of comments to be stored in the comment file: 1000
• Sequence steps in the SFC step in the SFC program: 1000 sequence steps
• The number of active steps: 40
Instruction Condition High Performance model QCPU Process CPU Redundant 3
QnCPU QnHCPU CPU
*1 Indicates that the sequence steps in SFC steps consist of 800 sequence steps.
3 SPECIFICATIONS
3.3 Processing Time 39
Instruction Condition Universal model QCPU
Q03UDVCPU Q04UDVCPU, Q04UDPVCPU,
Q06UDVCPU, Q06UDPVCPU,
Q13UDVCPU, Q13UDPVCPU,
Q26UDVCPU, Q26UDPVCPU
Min. Max. Min. Max.
S(P).SFCSCOMR At instruction execution 54.7s 60.0s 51.8s 56.8s
S(P).SFCTCOMR 55.3s 60.2s 52.6s 57.1s
*2 Processing time for the program shown in the condition (scan time: 15ms). The processing time varies depending on the number of files
in standard ROM and the SFC program (transition conditions and the number of active steps).
3 SPECIFICATIONS
40 3.3 Processing Time
3.4 Calculating the SFC Program Capacity
In order to express the SFC diagram using instructions, the memory capacity shown below is required. The method for
calculating the SFC program capacity and the number of steps when the SFC diagram is expressed by SFC dedicated
instructions is described in this section.
(1) Step
(1)
3 sequence steps for step START and END instructions
(2) Ò (2) Transition condition
: For serial transition or selective branching coupling
4 sequence steps for transition START instruction and transition destination instruction
(2) Ó : For parallel branching
Total number of steps for the transition START instruction, and transition destination instructions for the number of parallel
branches in question
: For parallel coupling
Total number of steps for the transition START instruction, and the transition destination instructions and coupling check
instructions for the number of parallel branchings in question -1.
(2) Ô (2) Jump, end step
(3) Calculated as step 0 because it is included in the previous transition condition.
• Operation outputs for each step: The capacity per step is total number of sequence steps for all instructions.
For details regarding the number of sequence steps for each instruction, refer to the Programming Manual
(Common Instructions) for the CPU module used.
• Transition conditions: The capacity per transition condition is total number of sequence steps for all
instructions. For details regarding the number of sequence steps for each instruction, refer to the
Programming Manual (Common Instructions) for the CPU module used.
3 SPECIFICATIONS
3.4 Calculating the SFC Program Capacity 41
Number of steps required for expressing the SFC diagram as SFC
dedicated instructions
The following table shows the number of steps required for expressing the SFC diagram as SFC dedicated instructions.
Name Ladder Number of Description Required Number of Steps
Expression Steps
SFCP START instruction [SFCP] 1 Indicates the SFC program START 1 per program
SFCP END instruction [SFCPEND] 1 Indicates the SFC program END 1 per program
Block START instruction [BLOCK BLm] 1 Indicates the block START 1 per block
Block END instruction [BEND] 1 Indicates the block END 1 per block
Step START instruction [STEP Si] 2 Indicates the step START (" " varies 1 per step
according to the step attribute)
Transition START [TRAN TRj] 2 Indicates the transition START (" " varies 1 per transition condition
instruction according to the step attribute)
Coupling check [TAND Si] 2 "Coupling completed" check occurs at parallel "[Number of parallel couplings] - [1]"
instruction coupling per parallel coupling
Transition designation [TSET Si] 2 Designates the transition destination step For serial transitions and selection
instruction transitions, 1 per transition condition;
for parallel branching transitions, the
number of steps is the same as the
number of parallel couplings
Step END instruction [SEND] 1 Indicates the step / transition END 1 per step
3 SPECIFICATIONS
42 3.4 Calculating the SFC Program Capacity
4 SFC PROGRAM CONFIGURATION
This chapter describes the SFC program symbols, SFC control instructions and SFC information devices that comprise an
SFC program.
When applying the program examples introduced in this manual to an actual system, ensure the applicability and confirm that
it will not cause system control problems.
As shown below, an SFC program consists of an initial step, transition conditions, intermediate steps, and an END step. The
data beginning from the initial step and ending at the END step is referred to as a block.
An SFC program starts at an initial step, executes a step following a transition condition in due order every time that transition
condition is satisfied, and ends a series of operations at an end step.
• When the SFC program is started, the initial step is executed first. While the initial step is being executed, whether the
transition condition following the initial step (transition condition 0 (t0) in the figure) has been satisfied or not is checked.
• Only the initial step is executed until transition condition 0 (t0) is satisfied. When transition condition 0 (t0) is satisfied, the
execution of the initial step is stopped, and the step following the initial step (step 1 (S1) in the figure) is executed. While
step 1 (S1) is being executed, whether the transition condition following step 1 (transition condition 1 (t1) in the figure) has
been satisfied or not is checked.
• When transition condition 1 (t1) is satisfied, the execution of step 1 (S1) is stopped, and the next step (step 2 (S2) in the
figure) is executed.
• Every time the transition condition is satisfied in order, the next step is executed, and the block ends when the end step is
executed.
Selection branching
Selection coupling
4
Parallel branching
Parallel coupling
*1 For the Universal model QCPU whose serial number (first five digits) is "12051" or earlier, the maximum number of steps for all blocks is
8192.
*2 For the modules whose serial number (first five digits) is "15101" or earlier, the maximum number of steps is 8192 for all blocks.
• Serial step numbers are assigned to the steps in creation order at the time of SFC program creation. The user can specify
the step numbers to change them within the range of the maximum number of steps in one block. The step numbers are
used for monitoring the executed step and for making a forced start or end with the SFC control instruction.
• When a transition to the next step occurs before the reset instruction of the counter is executed, the present value of the
counter and the ON/OFF status of the contact are held if the corresponding step becomes inactive. To reset the counter,
use the RST instruction, etc. at another step.
When the counter (C0) is reset at step "n+1" (or subsequent step), the present value
will be cleared, and the contact will be switched OFF.
The ladder shown above is actually executed as shown below. Because the step conditions contact is ON when the step is
active and OFF when the step is inactive, the PLS or P instruction will be executed when the step becomes active, even
though the execution condition contact is always ON.
If steps are selectively coupled in the block that has more than one active initial steps, the step immediately after the coupling
becomes active if any of the transition conditions immediately before the coupling is satisfied. In the above program example,
step 8 (S8) becomes active when any of transition conditions t4 to t7 is satisfied. When, after the step immediately after the
coupling (S8 in the above program example) becomes active, another transition condition immediately before the coupling
(any of t4 to t7 in the above program example) is satisfied, reactivation processing is performed as a follow-up function. The
processing, which will be performed when another transition condition is satisfied with the step immediately after coupling
being active, can be selected between STOP, WAIT and TRANSFER in the "Operation mode at transition to active step
(double step START)" in the block parameter setting of the SFC setting dialog box in the Tools menu. ( Page 130
Operation mode at transition to active step (double step START))
For the Basic model QCPU, Universal model QCPU, and LCPU, setting of "Operation mode at transition to
active step (double step START)" is not allowed. It operates in the default "TRANSFER" mode.
Dummy step
A dummy step is a waiting step, etc., which contains no operation output program.
• The transition condition following the corresponding step is always checked during execution of a dummy step, and
execution proceeds to the next step when the transition condition is satisfied.
• The dummy step changes to a step (without step attribute, indication: ) when an operation output program is created.
Coil switched ON by the OUT instruction when the transition condition is satisfied
During normal SFC program operation, the coil ON status (switched ON by OUT instruction when transition condition is
satisfied) is automatically switched OFF before proceeding to the next step. By designating an operation output step as a "coil
HOLD step", the coil ON status will remain in effect when proceeding to the next step.
• When designated as a coil HOLD step • When not designated as a coil HOLD step
1. When step n is executed 1. When step n is executed
2. When a transition to step (n+1) occurs 2. When a transition to step (n+1) occurs
At a designated coil HOLD step, "Y10" (switched ON by OUT instruction) will At steps not designated as coil HOLD steps, "Y10" (switched ON by OUT
remain ON even when the transition condition is satisfied. instruction) is automatically switched OFF when the transition condition is
satisfied.
Y10
Timing at coil is turned off when coil at coil HOLD step has been turned on to next step
When a coil ON status (at coil HOLD step) has been maintained to the next step, the coil will be switched OFF at any of the
following times:
• When the end step of the corresponding block is executed. (Except when SM327 is ON)
• When an SFC control instruction (RST, BLm) designates a forced END at the block in question.
• When an SFC control instruction (RST, BLm\Sn, RST Sn) designates a reset at the block in question.
• When a reset occurs at the device designated as the SFC information register's block START/END device.
• When a reset step for resetting the step in question becomes active.
• When the SFC START/STOP command (SM321) is switched OFF.
• When the coil in question is reset by the program.
• When the STOP instruction is executed with the stop-time output mode OFF.
• When S999 is designated at the reset step in the corresponding block.
■When the "block STOP-time operation output flag (SM325)" is OFF (coil output OFF)
• The step becomes inactive when the processing of the corresponding block is performed first after a block STOP request.
• All coil outputs turn OFF. However, the coils turned ON by the SET instruction remain ON.
■When the "block STOP-time operation output flag (SM325)" is ON (coil output held)
The coil outputs remain ON during a block STOP and after a block RESTART.
Coil switched ON by the OUT instruction when the transition condition is satisfied
During normal SFC program operation, the coil ON status (switched ON by OUT instruction when transition condition is
satisfied) is automatically switched OFF before proceeding to the next step. When an operation output step is designated as
an operation HOLD step (without transition check), the corresponding step will remain active after a transition to the next step,
and operation output processing will continue. Therefore, when the input condition changes, the coil status also changes.
4
■Coil output
A coil output OFF or HOLD status will be established, depending on the output mode setting at the time of the block STOP
designated in the SFC operation mode. ( Page 126 Output mode at block STOP)
However, an ON status will be maintained for coil outputs which were switched ON by the SET instruction.
• When the transition condition immediately before the corresponding step is satisfied or when the step is
reactivated by a JUMP transition, a transition will occur again when the transition condition is satisfied.
• Double STARTs do not apply to reactivated steps.
Coil switched ON by the OUT instruction when the transition condition is satisfied
During normal SFC program operation, the coil ON status (switched ON by OUT instruction when transition condition is
satisfied) is automatically switched OFF before proceeding to the next step. When an operation output step is designated as
an operation HOLD step (with transition check), the corresponding step will remain active after a transition to the next step,
and operation output processing will continue. Therefore, when the input condition changes, the coil status also changes.
• Convert the transition conditions into pulses. If they are not pulsed, transition processing to the next step is
performed every scan while the condition is satisfied.
• When a double START occurs as the transition condition was satisfied with the transition destination step
being active, the processing changes depending on the parameter setting. The Basic model QCPU does
not allow the parameters to be selected. It operates in the default "Transfer" mode. Refer to Page 130
Operation mode at transition to active step (double step START) for the parameter setting and the
processing performed for each setting.
• The difference between the operation HOLD step (with transition check) and the operation HOLD step
(without transition check) is whether the next step will be activated or not as a follow-up when the transition
condition is satisfied again.
■When the "block STOP-time operation output flag (SM325)" is OFF (coil output OFF)
• The step becomes inactive when the processing of the corresponding block is performed first after a block STOP request.
• All coil outputs turn OFF. However, the coils turned ON by the SET instruction remain ON.
■When the "block STOP-time operation output flag (SM325)" is ON (coil output held)
The coil outputs remain ON during a block STOP and after a block RESTART.
• Only held steps can be deactivated by the reset step. HOLD steps that are active but not held and steps that
are not specified as the HOLD steps are not the targets of the reset step.
• For the Basic model QCPU, Universal model QCPU, and LCPU, a step of the CPU itself cannot be specified
as a reset step.
The operation of the block START step (with END check) is described below.
• When activated, the block START step (with END check) starts the specified block.
• No processing is performed until the START destination block is deactivated after its execution has ended.
• When the START destination block is deactivated after its execution has ended, only the transition condition check is
performed.
• When the transition condition is satisfied, a transition to the next step occurs.
4
■When the setting of the operation mode at block double START is "STOP"
A "BLOCK EXE. ERROR" (error code: 4620) occurs and the CPU module stops processing.
■When the setting of the operation mode at block double START is the default setting of
"WAIT"
Processing is not performed and waits until the START destination block ends its execution.
For the following CPU modules, the operation mode at double block START cannot be set. The operation
mode at double block START is limited to the "WAIT" mode.
• Basic model QCPU
• Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCP
• Universal model QCPU whose serial number (first five digits) is "12051" or earlier
• L02SCPU, L02SCPU-P, L02CPU, L02CPU-P
• LCPU whose serial number (first five digits) is "15101" or earlier
• The block START step (with END check) cannot be described immediately before the coupling of a parallel
coupling. (The block START step (with END check) cannot be used for a wait.) The block START step
(without END check) can be described immediately before the coupling of a parallel coupling.
• The execution status of each block can be checked at another block using the block START/END bit of the
SFC information devices or the block activation check instruction of the SFC control instructions.
■When the setting of the operation mode at block double START is "STOP"
A "BLOCK EXE. ERROR" (error code: 4620) occurs and the CPU module stops processing.
■When the setting of the operation mode at block double START is the default setting of
"WAIT"
Processing is not performed and waits until the START destination block ends its execution.
4
For the following CPU modules, the operation mode at double block START cannot be set. The operation
mode at double block START is limited to the "WAIT" mode.
• Basic model QCPU
• Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCP
• Universal model QCPU whose serial number (first five digits) is "12051" or earlier
• L02SCPU, L02SCPU-P, L02CPU, L02CPU-P
• LCPU whose serial number (first five digits) is "15101" or earlier
The execution status of each block can be checked at another block using the block START/END bit or the
block activation check instruction of the SFC control instructions.
• SM327 is valid only when the end step is reached. When a forced end is made by the block END instruction,
etc., the coil outputs of all steps are turned OFF.
• SM327 is valid for only the HOLD steps being held. The outputs of the HOLD steps that are not held as the
transition conditions are not satisfied are all turned OFF.
For the Basic model QCPU, Universal model QCPU, and LCPU, SM328 can be used to continue execution of
active steps other than the one held in the block.
• When the transition condition immediately after the operation HOLD step (with transition check) is always
satisfied, the next step is kept in a "non-held active status". Therefore, the block cannot be ended when
SM328 is ON. Further, if this block has been started at the block START step (with END check), processing
cannot be returned to the START source step.
• When it is desired to describe an always satisfied transition condition immediately after the operation HOLD
step (with transition check), make provision so that the block can be forcibly ended from outside.
4
Serial transition
"Serial transition" is the transition format in which processing proceeds to the step immediately below the current step when
the transition condition is satisfied.
When transition condition "b" becomes satisfied at step "n" (operation output [A]) execution, operation output [A]
will be deactivated, and processing will proceed to step "n+1" (operation output [B]).
A maximum of 512 serial transition steps can be described in each block.*1 Therefore, a maximum of 512 serial transitions (+)
can be described. However, there is a restriction on the number of lines as indicated below depending on the SFC display
column setting.
*1 128 for the Basic model QCPU, Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P.
Coupling When the transition condition ("b" or "c") at the executed branch is
satisfied, the executed step ([A] or [B]) will be deactivated, and
processing will proceed to step "n+2".
When two or more selection step transition conditions are satisfied simultaneously, the left-most condition will take
precedence.
If transition conditions "c" and "d" are satisfied simultaneously, the step "n+2"
operation output will be executed.
In a selective transition, the number of branches and the number of couplings may be different. However, a
selection branch and parallel coupling or a parallel branch and selection coupling cannot be combined.
Coupling • When transition conditions "b" and "c" are satisfied at step "n" and
step "n+1" execution, steps "n" and "n+1" will be deactivated, and
processing will proceed to the waiting steps.
• Waiting steps are used to synchronize parallel processing
operations. Parallel processing steps always proceed to a waiting
step. When condition "d" is satisfied at the waiting steps, processing
will proceed to step "n+2".
• Waiting steps are dummy steps which require no operation output
ladder.
If another block is started by the parallel processing operation, the START source block and START destination block will be
executed simultaneously. (In the example below, processing from step "n+1" will be executed simultaneously with block 1.)
When condition "b" is satisfied at step "n" execution, processing will proceed to step "n+1" and block 1
will be started. Blocks "0" and "1" will then be processed simultaneously.
Couplings must be provided when the parallel transition format is used. Program creation is impossible without couplings.
Ex.
Program without couplings (Cannot be designated)
As a rule, a waiting step must be created prior to the coupling. However, in cases such as the example below where each of
the parallel transition columns consist of only 1 step (program without a transition condition between the parallel transition
branch and the coupling), a waiting step is not required.
There are no restrictions regarding the number of jump transitions within a single block.
In the parallel transition format, only jumps in the vertical direction are possible at each of the branches. 4
Ex.
Jump transition program in vertical direction from branch to coupling
A program of a jump transition to another vertically branched ladder, a jump transition for exiting from a parallel branch, or a
jump transition to a parallel branch from outside a parallel branch cannot be created.
Ex.
Program for exiting from parallel branch (cannot be designated)
Do not specify a jump transition to the current step when the transition condition is satisfied as shown below.
The lack of a sequence program at a given step will not result in an error. In such cases, no processing will
occur until the transition condition immediately following the step in question is satisfied.
• When using the leading edge pulse instructions mentioned below for the execution condition (<a> on the
right) of "Tran" instruction on the transition condition, the "Tran" instruction becomes conductive only when
the condition of the leading edge pulse instruction turns from OFF to ON after the step (<b> on the right)
that is associated with the transition condition becomes active. As described in the following time chart,
"Tran" instruction is executed and the active step moves to the next step. (Leading edge pulse instruction:
LDP, ANDP, ORP, MEP, and EGP)
• When the execution condition (<a> on the right) of "Tran" instruction on the transition condition has been
turned ON before the step (<b> on the right) becomes active, the "Tran" instruction does not become
conductive and the active step does not move to the next step.
• When using the leading edge pulse instruction mentioned above for the execution condition (<a> on the
right) of "Tran" instruction, specify a device whose condition turns from OFF to ON after the step (<b> on the
right) becomes active.
BMOV(P) BLm\K4Sn(d) Kn
: Usable, : Unusable
*1 In a sequence program, block 0 is the instruction execution target block.
In an SFC program, the current block is the instruction execution target block.
The instruction execution target block can be changed with the block switching instruction (BRSET).
Note, however, that the following CPU modules cannot use the BRSET instruction.
Basic model QCPU
Universal model QCPU whose serial number (first five digits) is "13101" or earlier
LCPU
*2 Can be used at the step of an SFC program.
An error occurs if it is executed in a sequence program other than an SFC program.
*3 The Universal model QCPU whose serial number (first five digits) is "13102" or later can execute this instruction.
• Either of the following errors occurs if the SFC control instruction is executed from the sequence program
when the special relay for SFC program start/stop (SM321) is OFF.
Instruction that specifies a block: BLOCK EXE. ERROR (error No.: 4621)
Instruction that specifies a step: STEP EXE. ERROR (error No.: 4631)
• Do not use the SFC control instructions in interrupt programs or fixed scan execution type programs. If
used, operation of the SFC program cannot be guaranteed.
Ex.
If "K, H" is indicated in the "constant" column
Only a decimal (K) or hexadecimal (H) constant may be used.
Real number constants (E) and character string constants ($) may not be used.
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Others
(System, User) Function K, H SFC
Module U\G BLm\Sn 4
Bit Word Bit Word
*2
(s)
Function
• Checks a specified step in a specified block to determine if the step is active or inactive.
• The contact status changes as described below depending on whether the specified step is inactive or active.
Contact of N/O Contact Instruction Contact of N/C Contact Instruction
Inactive OFF ON
Active ON OFF
*1 Note that the following CPU modules cannot use the BRSET instruction. When no block number is specified, the block 0 is set.
Basic model QCPU
Universal model QCPU whose serial number (first five digits) is "13101" or earlier
LCPU
• If the step does not exist in the SFC program is specified, the contact remains OFF.
• As the "Sn" device is treated as a virtual device, the contact on the monitor of a peripheral device does not
turn ON/OFF. If the internal device is ON, the coil instruction is switched ON for operations.
• In the High-speed Universal model QCPU and Universal model Process CPU, the number of steps in the
step activation check instruction increases by one step from that in the QnUDE(H)CPU.
Program example
• The following program checks the status of step 5 in block 3 and turns ON Y20 when step 5 becomes active.
When step is designated by operation output of block 3
When step is designated by operation output of other than block 3 or sequence program
• The following program executes a step synchronously with another step of a parallel branch.
■Related Instructions
SFC control instructions
• Block switching instruction (BRSET): See Page 106 Block switching instruction (BRSET).
• Step control instruction (SCHG): See Page 105 Active step change instruction (SCHG).
• Active step batch readout instruction (MOV(P), DMOV(P), BMOV(P)): See Page 87 Active step batch readout (MOV and
DMOV) and Page 90 Active step batch readout (BMOV).
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function K, H SFC BLm/ TRn
Module U\G TRn
Bit Word Bit Word 4
(s)
Function
• Checks whether or not the specified transition condition of the specified block is specified for forced transition by the forced
transition EXECUTE instruction (SET BLm\TRn).
• The contact status changes as described below depending on whether the specified transition condition is specified for a
forced transition or not.
Contact of N/O Contact Instruction Contact of N/C Contact Instruction
When specified for forced transition ON OFF
When not specified for forced transition OFF ON
• If the transition condition in question does not exist in the SFC program, it will remain OFF.
Program Examples
• The following program turns ON Y20 when transition condition 5 of block 3 is specified for a forced transition.
When transition condition is designated by operation output of block 3
When transition condition is designated by operation output of other than block 3 or sequence program
■Related Instructions
SFC control instructions
• Transition control instructions (SET TRn, SET BLm\TRn): See Page 103 Forced transition EXECUTE & CANCEL
instructions (SET, RST) [TRn/BLm\TRn].
• Transition control instructions (RST TRn, RST BLm\TRn): See Page 103 Forced transition EXECUTE & CANCEL
instructions (SET, RST) [TRn/BLm\TRn].
• Block switching instruction (BRSET): See Page 106 Block switching instruction (BRSET).
This instruction checks, from the first sequence step of the specified block in series, whether or not the
specified transition condition number is existed.
Because of this, processing time of the instruction differs depending on the program capacity of the specified
block (number of sequence steps), a maximum of hundred and several tens ms may be taken.
In case of occurring WDT error (error code: 5001), change the WDT setting value with the PLC RAS setting in
the PLC parameter.
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function K, H SFC BLm
Module U\G 4
Bit Word Bit Word
(s)
Function
• Checks whether the specified block is active or inactive.
• The contact status changes as described below depending on whether the specified block is active or inactive.
Block Status Contact of N/O Contact Instruction Contact of N/C Contact Instruction
Active ON OFF
Inactive OFF ON
• The contact is always OFF if the block that does not exist in the SFC program is specified.
• As the "BLm" device is treated as a virtual device, the contact on the monitor of a peripheral device does not
turn ON/OFF. If the internal device is ON, the coil instruction is switched ON for operations.
• In the High-speed Universal model QCPU and Universal model Process CPU, the number of steps in the
step activation check instruction increases by one step from that in the QnUDE(H)CPU.
■Related Instructions
SFC control instructions
• Block START instruction (SET BLm), block END instruction (RST BLm): See Page 94 Block START & END instructions
(SET, RST) [BLm].
SFC diagram symbols
• Block START step ( m, m): See Page 57 Block START step (with END check) and Page 58 Block START step
(without END check).
SFC information device
• Block START/END bit: See Page 109 Block START/END bit.
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Others
(System, User) Function Module K, H SFC
U\G BLm\Sn
Bit Word Bit Word 4
(s) *2
(d)
(d)
Function
• Executes a batch readout of the operation statuses (active/inactive) of steps in a specified block.
• The readout results are stored at the "(d)" device as shown below.
• When the block is not specified, specify the step number with which the read data range does not exceed the maximum
step No. in the block.
Item Description
If the maximum number of steps data will be undefined. For example, when the last step of the block to be read is step 10 (S10), data in b11 to 15 will be
is exceeded undefined.
When the block has been "0" is stored into the remaining bits. When block 1 is specified, "0" is stored into B11 - 15 if the last step of block 1 is step
specified 10 (S10).
• In the activation step batch read instruction, do not specify a nonexistent block/step. An error will not occur if a nonexistent
block/step is specified. However, the read data are undefined. The OPERATION ERROR (error code: 4101) will occur in
the Universal model QCPU and LCPU if a nonexistent step is specified when the block specification is not performed.
• Specify the step as described below.
Item Description
In the case of SFC program Use "K4Sn" when specifying the step in the current block.
Use "BLm\K4Sn" when specifying the step in the SFC program.
In the case of sequence program Use "BLm\K4Sn" when executing the step activation check instruction.
When the block number is not specified, specify the block number with the BRSET instruction.*1
*1 Note that the following CPU modules cannot use the BRSET instruction. When no block number is specified, the block 0 is set.
Basic model QCPU
Universal model QCPU whose serial number (first five digits) is "13101" or earlier
LCPU
• Note that the following CPU modules cannot use the BRSET instruction. When no block number is
specified, the block 0 is set.
Basic model QCPU
Universal model QCPU whose serial number (first five digits) is "13101" or earlier
LCPU
• In the High-speed Universal model QCPU and Universal model Process CPU, the number of steps in the
step activation check instruction increases by one step from that in the QnUDE(H)CPU.
Program Examples
• The following program reads 32 active steps, starting from step 0 of block 3, to D0 and D1 when X0 turns ON.
When step is designated by operation output of block 3
When step is designated by operation output of other than block 3 or sequence program
4
■Related Instructions
SFC control instructions
• Block switching instruction (BRSET): See Page 106 Block switching instruction (BRSET).
• Step operation status check instruction (LD, LDI, AND, ANI, OR, ORI): See Page 81 Step operation status check instruction
(LD, LDI, AND, ANI, OR, ORI) [Sn/BLm\Sn].
• Active step batch readout instruction (BMOV): See Page 90 Active step batch readout (BMOV).
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function Module K, H SFC s
U\G BLm\Sn
Bit Word Bit Word
(s) *2
(d)
(n)
(d)
(n)
Function
• A batch readout (designated number of words) of step operation statuses is executed at the specified block.
• The readout results are stored at the "(d)" device as shown below.
Ex.
When "BMOV BL1\S2 D0 K2" is executed in the following case,
• Block 1: The maximum step No. is 10 (S10) and step 5 (S5) and step 8 (S8) do not exist
• Block 2: The maximum step No. is 12 (S12) and step 3 (S3) does not exist
• Block 3 and later: Do not exist
data are stored as shown below.
Ex.
When "BMOV BL1\S2 D0 K2" is executed in the following case,
• Block 1: The maximum step No. is 10 (S10)
• Block 2: Nonexistent
• Block 3: The maximum step No. is 12 (S12)
• Block 4: The maximum step No. is 15 (S15)
data are stored as shown below.
• In the activation step batch read instruction, do not specify a nonexistent block/step. An error will not occur if a nonexistent
block/step is specified. However, the read data are undefined.
• Specify the step as described below.
Item Description
In the case of SFC program Use "K4Sn" when specifying the step in the current block.
Use "BLm\K4Sn" when specifying the step in the SFC program.
In the case of sequence program Use "BLm\K4Sn" when executing the step activation check instruction.
When the block number is not specified, specify the block number with the BRSET instruction. Note, however, that the
following CPU modules cannot use the BRSET instruction. When no block number is specified, the block 0 is set.
• Basic model QCPU
• Universal model QCPU whose serial number (first five digits) is "13101" or earlier
• LCPU
Operation Error
Error code Description
4101 When the step relay (S) range is exceeded
When step is designated by operation output of other than block 3 or sequence program
■Related Instructions
SFC control instructions
• Block switching instruction (BRSET): See Page 106 Block switching instruction (BRSET).
• Step operation status check instruction (LD, LDI, AND, ANI, OR, ORI): See Page 81 Step operation status check instruction
(LD, LDI, AND, ANI, OR, ORI) [Sn/BLm\Sn].
• Active step batch readout instruction (MOV, DMOV): See Page 87 Active step batch readout (MOV and DMOV).
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function Module K, H SFC BLm
U\G
Bit Word Bit Word
(d)
Function
■Block START instruction (SET BLm)
• A specified block is forcibly activated independently and is executed from its initial step. When there are multiple initial
steps, all initial steps become active. When the bock START/END bit of the SFC information devices has been set, the
corresponding bit device changes from OFF to ON.
• If the specified block is already active when this instruction is executed, the instruction will be ignored (equivalent to the
NOP instruction), and processing will continue.
• While online change (inactive block) is executed to the specified block when this instruction is executed, the instruction will
be ignored (equivalent to the NOP instruction), and the online change processing will continue. (Universal model QCPU
whose serial number (first five digits) is "12052" or later, and the LCPU whose serial number (first five digits) is "15102" or
later only)
Program Examples
• When X1 switches ON, the following program forcibly activates block1. When X2 switches ON, it ends and forcibly
deactivates block1.
4
■Related Instructions
SFC diagram symbols
• Block START step ( m, m): See Page 57 Block START step (with END check) and Page 58 Block START step
(without END check).
SFC information device
• Block START/END bit: See Page 109 Block START/END bit.
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function Module K, H SFC BLm
U\G
Bit Word Bit Word
(d)
Function
■Block STOP instruction (PAUSE)
• Executes a temporary stop at the specified block.
• As shown below, processing varies, depending on when the stop occurs and on the coil output status setting (designated
by OUT instruction).
Setting of Operation Status of Operation
Output Mode Output at STOP-time Active step other than Held step*1
at Block Stop Block Stop Mode Bit held step (including Coil HOLD step Operation HOLD Operation HOLD
in PLC (SM325) HOLD step whose (SC) step (without step (with
Parameter transition condition is transition check) transition check)
not satisfied) (SE) (ST)
Turns OFF OFF OFF or no • Immediately after a STOP • Immediately after • Immediately after a STOP request is
(coil output OFF) (coil output OFF) setting request is made, the coil a STOP request is made, the coil output of the operation
Remains ON (immediate output of the operation made, the coil output is turned OFF and the block is
(coil output held) stop) output is turned OFF and the output of the stopped.
block is stopped. operation output • The status remains active.
• The status remains active. is turned OFF and
ON • Normal operation is the block is
(STOP after performed until the transition stopped.
transition) condition is satisfied. • The status
• When the transition becomes inactive.
condition is satisfied, the
end processing of the
corresponding step is
performed. At the same
time, the transition
destination step becomes
active and the block is
stopped before execution of
the operation output.
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
• The STOP/RESTART bit switches ON when the SFC control "block STOP" instruction (PAUSE BLm) is executed.
Program Examples
• Block 1 is stopped when X1 switches ON, and is restarted when X2 switches ON.
■Related Instructions
SFC information device
• Block STOP/RESTART bit: See Page 112 Block STOP/RESTART bit.
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function Module K, H SFC Sn
U\G BLm\Sn
Bit Word Bit Word 4
(d) *2
Function
■Step START instruction (SET)
• A specified step at a specified block is activated forcibly. Operation at the block in question varies as follows, depending on
whether the block is active or inactive.
Item Description
When the specified block is The specified block is activated when the instruction is executed, and processing starts from the specified step.
inactive: Processing is performed as shown below when step 1 in block 1 is started in the sequence program.
When the block START/END bit of the SFC information devices has been set, the corresponding bit device changes from OFF
to ON.
• When multiple initial steps exist, an initial step selection START will occur when a given step is specified and activated.
• When designating a step located in a parallel branch, all the parallel steps should be activated. An inactive parallel branch
ladder at such a time will prevent the parallel coupling condition from being satisfied.
• If a specified step is already active when this instruction is executed, the instruction will be ignored (equivalent to the NOP
instruction), and processing will continue. To hold a specified step with the HOLD step, the processing is "Transition to
HOLD step by double START". For details, refer to Page 130 Operation mode at transition to active step (double step
START).
• When the operation output is used to start the step, do not specify the current step number as the specified step number. If
the current step is designated as the specified step number, normal operation will not be performed.
S0
M0
S1 SET S1
S2
S0
M0
S1 RST S1
S2
Operation Error
Error code Description
4631 When no specified step is present or the SFC program is in stand-by mode
4505 If using the own step as the specification step No. (Basic model QCPU, Universal model QCPU, and LCPU)
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function K, H SFC TRn
Module U\G BLm\TRn
Bit Word Bit Word 4
(d)
Function
■Forced transition EXECUTE instruction (SET)
• A specified transition condition in a specified block is forcibly satisfied, and an unconditional transition is executed at the
step which precedes the condition.
• After execution of the instruction, the forced transition status remains effective until a reset instruction is executed.
Program Examples
• When X1 switches ON, the following program executes a forced transition at transition condition 1 of block 1. The forced
transition setting is canceled when X2 switches ON.
When step is designated by operation output of block 1
When step is designated by operation output of other than block 1 or sequence program
This instruction checks, from the first sequence step of the specified block in series, whether or not the
specified transition condition number is existed.
Because of this, processing time of the instruction differs depending on the program capacity of the specified
block (number of sequence steps), a maximum of hundred and several tens ms may be taken.
In case of occurring WDT error (error code: 5001), change the WDT setting value with the PLC RAS setting in
the PLC parameter.
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function Module SFC
U\G
Bit Word Bit Word
(d) 4
Data Type Programs Using Instructions Execution Site
Sequence SFC Program Block Step Transition
Program Step Transition Condition
Condition
(d) BIN16
Function
• Deactivates the step that executed an instruction, and forcibly activates the specified step (set with the device designated
by (d)) in the same block.
• When the destination step is already active, the step that executed the SCHG instruction is deactivated and the destination
step continues processing as-is.
• The step where this instruction is executed is deactivated when processing proceeds to the transition condition status
check following the completion of that step's program operation.
• This instruction can only be used at SFC program steps.
Operation Error
Error code Description
4631 When the specified destination step does not exist
4001 When this instruction is used at a sequence program other than an SFC program. An error is activated on switching from STOP to RUN.
Program Examples
• When X1 switches ON, the following program deactivates step 5, and activates step 6.
*1
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Other
(System, User) Function K, H SFC
Module U\G
Bit Word Bit Word
(s)
Function
• Switches the target block number of the SFC control instruction that specifies only a step (Sn) and transition condition
(TRn) to the number set for the device designated by (s).
• Although "BLm\Sn" or "BLm/TRn" may be used as the instruction device when designating the destination block number,
only a constant (K, H) may be designated at the "m" of "BLm", thereby fixing the designation destination. When block
switching is executed by this BRSET instruction, a word device can be used for indirect designation, index modification, etc.
• The effective operation range when block switching occurs (by BRSET instruction) varies according to the program being
run at the time, as shown below.
When this instruction is executed in a sequence program, target block switching is valid from instruction execution to SFC
execution.
At the next scan, the target block is block 0 as the default until the instruction is executed again.
If the BRSET instruction is executed at an SFC program, block switching will be effective only for the step currently being
executed.
Even if the step in question is the same step, the BRSET instruction must be executed at each block where the Sn and TRn
instructions are used.
Moreover, within a single step, block switching will be effective from the point where the BRSET instruction is executed to that
step's processing END point.
When processing is repeated at the next scan following the processing END for that step, the block in question will be
designated as the "current block" until the point when the BRSET instruction is executed again.
Operation Error
Error code Description
4621 When the specified block does not exist or when the SFC program is in the stand-by status.
Program Examples
• When X1 switches ON, the following program switches the Sn or TRn block number to the block number stored at the D0
data register.
• When X2 switches ON, the following program switches the Sn or TRn block number according to the constant at the Z1
index register.
: Usable
For settings to use SFC information devices, refer to the manual for the programming tool used.
• When the corresponding block is inactive, it can be started independently by forcibly turning ON the block START/END bit.
While the corresponding block is active, the processing of the corresponding block can be forcibly ended by forcibly turning
OFF the block START/END bit. The block START/END bit can also be turned ON/OFF in the test mode of the peripheral
device.
• When a forced OFF is executed by the block START/END bit, and the block in question becomes inactive, processing will
occur as follows:
Execution of the block in question will stop together with all outputs from the step which was being executed.
(Devices switched ON by the SET instruction will not switch OFF.)
If another block is being started by the block START step in the corresponding block, the corresponding block stops.
However, the start destination block remains active and continues processing.
To also end the start destination block simultaneously, the block START/END bit of the start destination must also be turned
OFF.
• A block which has been forcibly deactivated is restarted as shown below.
Relevant Block Restart Status
Block 0 When the START condition of block 0 is "Auto START ON" in the Operation is restarted from the initial step following END step
SFC setting of the PLC parameter dialog box. processing.
When the START condition of block 0 is "Auto START OFF" in The block is deactivated after END step processing, and processing is
the SFC setting of the PLC parameter dialog box. restarted from the initial step when another START request occurs for
that block.
Other than block 0
■Related Instructions
SFC control instructions
• Block START instruction (SET BLm), block END instruction (RST BLm): See Page 94 Block START & END instructions
(SET, RST) [BLm].
SFC diagram symbols
• Block START step ( m, m): See Page 57 Block START step (with END check) and Page 58 Block START step
(without END check).
Ex.
Step transition bit = M1
• If a continuous transition is designated (continuous transition bit ON), the transition bit will remain ON during the next step's
operation output after the transition condition is satisfied. It will also remain ON following the execution of multiple steps,
even if the transition condition is unsatisfied. In these cases, the transition bit will switch OFF when block execution occurs
at the next scan.
Ex.
Step transition bit = M1
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
• The execution of the corresponding block is restarted from the step where it had stopped when the "block STOP/RESTART
bit" is turned OFF in the sequence program, SFC program or peripheral device. An "operation HOLD status" step (with
transition check or without transition check) which has been stopped will be restarted with the operation HOLD status in
effect. A coil output HOLD step cannot be restarted after being stopped as it is deactivated at that time.
• When a block STOP is canceled, the PLS or P instruction is executed. When the special relay for operation output
selection at block STOP (SM325) is turned ON, the PLS or P instruction is not executed if a block STOP is canceled.
• When the SFC control "block STOP" instruction (PAUSE BLm) is executed, the block in question is stopped, and the block
STOP/RESTART bit switches ON. When the "block RESTART" instruction (RSTART BLm) is executed while the block is
stopped, the block in question is restarted, and the block STOP/RESTART bit switches OFF.
• Stopping of program processing by a block STOP/RESTART bit being switched ON, or by a block STOP
instruction, applies only to the specified block.
• Even if a block stop is executed for the START destination block, the START source block will not be
stopped.
• Even if a block stop is executed for the START source block, the START destination block will not be
stopped.
• When the corresponding block is stopped, the stop timing is as described below.
Setting of Operation Status of Operation
Output Mode Output at STOP-time Active step other than held step Held step*1
at Block Stop Block Mode Bit (including HOLD step whose Coil HOLD step Operation Operation
in PLC Stop transition condition is not (SC) HOLD step HOLD step
Parameter (SM325) satisfied) (without (with transition
transition check) (ST)
check) (SE)
Turns OFF OFF OFF or no • Immediately after a STOP request is • Immediately • Immediately after a STOP request is
(coil output OFF) (coil output setting made, the coil output of the operation after a STOP made, the coil output of the operation
Remains ON OFF) (immediate output is turned OFF and the block is request is made, output is turned OFF and the block is
(coil output held) stop) stopped. the coil output of stopped.
• The status remains active. the operation • The status remains active.
ON • Normal operation is performed until output is turned
(STOP after the transition condition is satisfied. OFF and the
block is stopped.
transition) • When the transition condition is
satisfied, the end processing of the • The status
corresponding step is performed. At becomes
inactive.
the same time, the transition
destination step becomes active and
the block is stopped before execution
of the operation output.
Remains ON ON OFF or no • Immediately after a STOP request is • Immediately after a STOP request is made, the block is
(coil output held) (coil output setting made, the block is stopped with the stopped with the coil output of the operation output being
held) (immediate coil output of the operation output held.
stop) being held. • The status remains active.
• The status remains active.
ON • Normal operation is performed until
(STOP after the transition condition is satisfied.
transition) • When the transition condition is
satisfied, the end processing of the
corresponding step is performed. At
the same time, the transition
destination step becomes active and
the block is stopped before execution
of the operation output.
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
Related Instructions
SFC information device
• Block STOP/RESTART bit: See Page 112 Block STOP/RESTART bit.
SFC control instruction
• Block STOP instruction (PAUSE BLm): See Page 96 Block STOP and RESTART instructions (PAUSE, RSTART) [BLm].
Ex. 4
Sample program processing
• Continuous transition ON
When the corresponding block becomes active, the processings of all steps are executed in the same scan, and end step
processing is performed to deactivate the block.
• Continuous transition OFF
When the corresponding block becomes active, steps are executed in a 1-step-per-scan format, and end step processing is
performed in the third scan to deactivate the block.
• A continuous transition can be designated for individual blocks by the continuous transition bit ON/OFF setting, or for all
blocks using the batch setting special relay. As indicated below, whether a continuous transition is executed or not changes
depending on the combination of the continuous transition bit and the special relay that sets "whether continuous transition
of all blocks is executed or not" (SM323).
SM323 status Continuous Transition Bit Status SFC Program Operation
ON Continuous transition bit OFF Operation occurs without continuous transition
No continuous transition bit setting Operation occurs with continuous transition
Continuous transition bit ON
OFF Continuous transition bit OFF Operation occurs without continuous transition
No continuous transition bit setting
Continuous transition bit ON Operation occurs with continuous transition
Ex.
[SFC program]
[Operation]
2. Since SM324 is added as the AND condition to the transition condition following step 3, the transition condition following
step 3 is not satisfied after execution of step 3.
3. When step 3 is executed in the next scan, execution proceeds to step 4 in the same scan since SM324 is ON.
• When a jump transition or selection coupling causes a transition from multiple steps to one step, the
operation output of one step may be executed twice in a single scan. When the setting is "with continuous
transition" in the case as shown above, execution passes through step 3 twice in a single scan.
• In the case of "with continuous transition", a step start/end is made within one scan. Since the END
processing is not executed in this case, the coil output turned on by the OUT instruction in the operation
output is not reflected on the device. When the coil output is the Y output, actual output is not provided. In
addition, ON of the step relay cannot be detected.
• In the case of a program that uses a jump transition for looping, care must be taken when the transition
conditions in the loop are all satisfied during execution at the "with continuous transition" setting, since an
endless loop will occur within one scan, resulting in WDT Err. (No. 5001).
to to
• When the parameter where the "High speed interrupt I49 fixed scan interval" has been set is written to the
High Performance model QCPU whose first five digits of serial No. are "04012" or later, the step transition
watchdog timers cannot be used. No processing is performed if the step transition watchdog timers are
executed.
• The step transition watchdog timers are not available for the Basic model QCPU, Universal model QCPU,
and LCPU.
When SM90 is turned ON in the operation output of the step that performs a time check as shown below, the step transition
watchdog timer starts timing.
If transition condition a is not satisfied within the set time (10s) after SM90 has turned ON, annunciator F1 turns ON.
(However, the SFC program continues operation.)
When transition condition a is satisfied within the set time and SM90 turns OFF, the step transition watchdog timer stops 4
timing and is reset.
• If the annunciators (F0 to F255) turn ON, the number of detected annunciators that turned ON and the annunciator
numbers are not stored into SD62, SD63 and SD64 - SD79.
• The step transition watchdog timers of the same number can be used at different steps if they do not become active
simultaneously.
Ex.
As there is no chance that steps 5 and 6 will be concurrently active, the same watch dog timer can be used at both steps.
■Initial start
The program is started after the active status at a previous stop is cleared.
The operation after a start is performed according to the setting of block 0 START condition.
■Resume start 4
The program is started with the active status at a previous stop (ON to OFF of SM321 or RUN to STOP of CPU module) held.
The SFC program start mode changes depending on the combination of the setting of the "SFC program start mode" in the
PLC parameter dialog box and the ON/OFF status of the "special relay for setting SFC program start status (SM322)" as
indicated below.
SFC Program Start Mode Operation Initial Start Resume Start
Start Mode SM322: OFF SM322: ON SM322: ON SM322: OFF
Operation (Initial status)*1 (When changed by (Initial status)*1 (When changed
user) by user)
SM321: Turned ON Initial Initial Resume Initial
Programmable controller: Powered ON Resume/Initial*3 Initial
Programmable controller: Powered OFF and then ON Resume*2 Initial
after SM321 is switched from ON to OFF or the CPU
module is switched from RUN to STOP
CPU module: Reset and RUN Resume/Initial*6 Initial
CPU module: Reset and RUN after SM321 is switched Resume*2 Initial
from ON to OFF or the CPU module is switched from
RUN to STOP
STOPRUN Resume*7
CPU module: STOP, write a program, and then RUN Initial*4*5
• When the programmable controller is powered OFF or the CPU module is reset, the intelligent function
modules and special function modules are initialized. When making a resume start, create an initial program
for the intelligent function module/special function module in the block that is always active or in the
sequence program.
• When the programmable controller is powered OFF or the CPU module is reset, values in the devices
without a latch setting are cleared. To hold the values in the SFC information devices, set a latch range.
Use the block 0 START condition when it is desired to specify the START block at SFC program START according to the
product type, etc.
"Auto START ON" is useful when block 0 is used as described below.
• Used as a control block
• Used as a preprocessing block
• Used as an always watched block
4
Settings and corresponding operations
Set block 0 to "Auto START ON" or "Auto START OFF".
At SFC program START and END step execution, operations are performed as described below.
Setting Operation
At SFC Program START At end step execution in block 0
Autostart block 0 Block 0 is automatically activated, and is executed from its When the end step is reached, the initial step is
(default) initial step. automatically activated again.
Do not autostart block 0 Block 0 is activated by a START request resulting from an When the end step is reached, block 0 is deactivated and
SFC control "block START" instruction or a block START waits for another START request to be issued again.
step, in the same manner as other blocks.
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
■SM325
The operation of SM325 differs depending on the CPU module.
• For the Basic model QCPU, High Performance model QCPU, Process CPU, and QnACPU
SM325 turns ON/OFF according to the parameter setting (output mode setting at block stop) at STOP to RUN of the CPU
module.
• For the Universal model QCPU and LCPU
SM325 turns ON/OFF according to the parameter setting (output mode setting at block stop) when the CPU module is
powered ON or is reset.
Parameter setting SM325
4
Turns OFF (coil output OFF) OFF
The output mode at block stop can be changed by turning ON/OFF SM325 during the operation of the SFC program.
(During the operation of the SFC program, the parameter setting is ignored.)
Setting items
Designate the first block number and the time of execution for the periodic execution blocks.
When these settings are designated, the "first block" and all subsequent blocks will become periodic execution blocks.
The execution time interval setting can be designated in 1 ms units within a 1 to 65535 ms range.
• Until the specified time interval elapses, only the sequence programs and blocks designated for execution at each scan will
be executed.
• When the specified time interval elapses, the periodic execution blocks will be executed following execution of blocks
designated for execution at each scan. If the specified time interval is shorter than the scan time, the periodic execution
blocks will be executed at each scan in the same manner as the other blocks.
• The specified time interval countdown is executed in a continuous manner.
• When the parameter where the "High speed interrupt I49 fixed scan interval" has been set is written to the
High Performance model QCPU whose first five digits of serial No. are "04012" or later, the fixed-cycle
execution block setting cannot be used. If the fixed-cycle execution block setting is made, no processing is
performed and the block remains unchanged from the every scan execution block.
• To execute the periodic execution block, the block to be executed periodically must be activated.
• The fixed-cycle execution block setting is not available for the Basic model QCPU, Universal model QCPU,
and LCPU.
• When a START request is issued to the block that is already active by execution of the following, the START
request is ignored and the processing of the SFC program is continued as is.
Block START instruction (SET BLm) of SFC control instructions
ON of Block START/END bit of SFC information devices
• For the following CPU modules, the operation mode at double block START cannot be set. The operation
mode at double block START is limited to the "WAIT" mode.
Basic model QCPU
Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCP
Universal model QCPU whose serial number (first five digits) is "12051" or earlier
L02(S)CPU, L02(S)CPU-P
LCPU whose serial number (first five digits) is "15101" or earlier
• When changing a setting for the operation mode at double block START, write both SFC programs and
parameters to PLC. If both SFC programs and parameters are not written, the changed setting content may
not be reflected.
• When setting is "WAIT": Execution waits until the transition destination step becomes inactive. When the transition
destination step becomes inactive, a transition is executed and the transition destination step becomes active. In a WAIT
status, the previous step is deactivated. 4
• When setting is "TRANSFER": A transition is executed and the previous step becomes inactive.
• When setting is "WAIT": Execution waits until all the transition destination steps of the parallel branch become inactive.
When the transition destination steps all become inactive, a transition is executed and all the first steps of the parallel
branch become active. In a WAIT status, the previous step is deactivated.
• When setting is "TRANSFER": When any one of the transition destination steps of the parallel branch is active, a transition
is executed and the previous step becomes inactive.
• When the transition destination steps are all inactive, normal transition processing is performed and all the
transition destination steps become active.
• The operation mode for transition to active step (at step double START) applies to a transition to be
executed when a transition condition is satisfied or to a forced transition set using the transition control
instruction (SET TRn) of the SFC control instructions. When the step control instruction (SET Sn) of the
SFC control instructions is used to issue a START request to the step that is already active, the request is
ignored and the processing continues.
• For the Basic model QCPU, Universal model QCPU, and LCPU, setting of the transition to active step (at
step double START) is not allowed. The transition to active step (at step double start) is fixed to "Transition"
or them.
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Others
(System, User) Function K, H SFC
Module BLm\Sn
U\G
Bit Word Bit Word Bit Word
n1
(d1) *6
n2
n3
*6 *5
(d2)
*5 This item cannot be set when "Use the same file name as the program" has been selected in "File Register" in the PLC File tab of the
PLC parameter dialog box.
*6 Local device cannot be used.
Set Data
Set Data Meaning Range
n1 Indicates block No. of an SFC program that read comments or device number where block No. is stored. 0 to 319
(d1) Indicates the first number of device that stores comment read.*3
n2 Indicates the device number where the number of comments to read or the number of comments is stored. 0 to 256*1
n3 Indicates the number of comments to read in a single scan or device number where the number of comments is 0 to 256*2
stored.
(d2) Indicates a device that turns ON for 1 scan at completion of the instruction.
*4 The number of characters for each comment in the comment range setting is set in the programming tool.
For details, refer to the manual for the programming tool.
With S(P) .SFCSCOMR instruction, the points calculated by the following formula are occupied from the device No. specified
at (d1).
(Points to be used for storing a comment) = 2 + 20 (number of comment to read (n2))
For (d1), make sure to set device No. that can store the above points successively.
Processing
for material B
• Executing S(P).SFCSCOMR instruction, SM735 of the special relay (SFC comment readout instruction executing flag)
turns ON. Confirms whether or not S(P).SFCSCOMR instruction is executed by SM735.
• In case comments are not set into active steps, "2DH()" is stored to the comment area (word length of 32 characters).
• Read comments are stored in ascending order of the step No.
• Comments are read from the comment file specified when S(P). SFCSCOMR instruction is executed.
• Comments to be read with S(P). SFCSCOMR instruction are those of steps*1 being activated when executing
S(P).SFCSCOMR instruction.
*1 As steps retaining coil outputs are not active steps, reading comments is not enabled.
For the Universal model QCPU and LCPU, when the standard ROM is selected in corresponding memory in
"Comment File Used in a Command" in the PLC File tab of the PLC parameter dialog box, the number of
comments read at END processing is determined by the system.
• The operation when a command of S(P).SFCSCOMR instruction is in ON status at S(P).SFCSCOMR instruction execution
completed is as follows.
S.SFCSCOMR instruction re-executes when a command for S.SFCSCOMR instruction is in ON status.
• For the comment files to be used with S(P).SFCSCOMR, set them in the PLC File tab of the PLC parameter dialog box or
at "file set instruction (QCDSET(P)) for comments". Executing S(P). SFCSCOMR without setting the comment file to use, 0
is stored to "the total number of steps ((d1) +0)" and "the number of steps that have read comments ((d1) +1)" At this time,
the device specified in (d2) turns ON for 1 scan. When the comment file setting is configured in the PLC File tab of the PLC
parameter dialog box but the file does not exist at power-on or reset, "FILE SET ERROR" (error code: 2400) will occur.
• The following table lists the availability of reading comments stored in the memories by the S(P).SFCSCOMR instruction.
Readable, Not readable
Memory type Availability of reading comments
SRAM card (drive 1)
Flash card (drive 2)
Standard ROM (drive 4)
ATA card *2
SD memory card *2
*2 If the S(P).SFCSCOMR instruction is executed to the ATA card or SD memory card where the comments are stored, an operation error
(error code: 4130) occurs.
• While SFC program is not executed, reading comments is not performed even if executing S(P).SFCSCOMR instruction.
Executing S(P).SFCSCOMR instruction at a status without SFC program being executed, 0 is stored to "the total number of
steps ((d1) +0)" and "the number of steps that have read comments ((d1) +1)". At this time, the device specified in (d2)
turns ON for 1 scan.
• With S(P). SFCSCOMR instruction, comments for the normal SFC program can be read. Comments of a SFC program to
control program execution are not read. Executing S(P).SFCSCOMR instruction specifying a SFC program for program
execution control, 0 is stored to "the total number of transit conditions ((d1) +0)" and "the number of steps that have read
comments ((d1) +1)". At this time, the device specified in (d2) turns ON for 1 scan.
• S(P).SFCSCOMR instruction cannot be executed simultaneously with S(P).SFCSCOMR instruction or S(P).SFCTCOMR
instruction. Executing S(P).SFCSOMR, and if S(P).SFCSCOMR instruction or S(P).SFCTCOMR instruction is executed
before reading comments completed, the 2nd instruction will be de-activated.
• When the S(P).SFCSCOMR instruction is attempted to be executed while SM721 is on, the instruction will not be executed.
However, when the execution condition is met, the instruction will be executed in the next scan. SM721 turns on in the
following operations:
Function
The S(P).SFCSCOMR instruction or the S(P).SFCTCOMR instruction is executed.
The COMRD(P), S(P).FWRITE, S(P).FREAD, or SP.DEVST instruction is executed.
A file in the ATA card, SD memory card, or standard ROM is accessed by the read from PLC or write to PLC function, or by other file access operations.*3
Operation Errors
Error code Description
2410 When a comment file specified at execution of S(P).SFCSCOMR instruction does not existed
4100 • When SFC block No. specified at n1 is other than 0 to 319
• When the number of readout comment specified at n2 is other than 0 to 256
• When the number of readout comments in a single scan specified at n3 is other than 0 to 256
4101 When the number of readout comments specified at n2 exceeds the device range of D1
4130 When the S(P).SFCSCOMR instruction is executed to the comment file in the ATA card or SD memory card
Program Example
• This program reads 2 comments being activated at the SFC block No.1 when X1 is turned ON, and stores those to the
storage device after D0. (The number of comment to be read in a single scan is also set in 2.) An interlock ladder to execute
"batch write of SFC program in RUN status", "online change (inactive block)", and "write of comment file in RUN status" is
included in the following program.
• Procedure for "batch writes of SFC program in RUN status", "online change (inactive block)", or "write of comment file in
RUN status"
1. Turns ON the X0 (write execution command in RUN status).
2. M0 (write enable flag in RUN status) is turned ON when SP.SFCSCOMR instruction is deactivated.
4. Performs "batch write of SFC program in RUN status", "online change (inactive block)", or "write of comment file in RUN
status".
5. Turns OFF the M0 (write enable flag in RUN status) in the device test of the programming tool.
6. SP.SFCTCOMR instruction is executed again when M0 (write enable flag in RUN status) is turned OFF.
Usable Devices
Internal device File Register R Link Direct J\ Intelligent Index Z Constant Expansion Others
(System, User) Function K, H SFC
Module BLm\Sn
U\G
Bit Word Bit Word Bit Word
n1
(d1) *6
n2
n3
*6 *5
(d2)
*5 This item cannot be set when "Use the same file name as the program" has been selected in "File Register" in the PLC File tab of the
PLC parameter dialog box.
*6 Local device cannot be used.
Set Data
Set Data Meaning Range
n1 Indicates block No. of an SFC program that read comments or device number where block No. is stored. 0 to 319
(d1) Indicates the first number of device that stores comment read.*3
n2 Indicates the device number where the number of comments to read or the number of comments is stored. 0 to 256*1
n3 Indicates the number of comments to read in a single scan or device number where the number of comments is 0 to 256*2
stored.
(d2) Indicates a device that turns ON for 1 scan at completion of the instruction.
*4 The number of characters for each comment in the comment range setting is set in the programming tool.
For details, refer to the manual for the programming tool.
With S(P) .SFCTCOMR instruction, the points calculated by the following formula are occupied from the device No. specified
at (d1).
(Points to be used for storing a comment) = 2 + 20 (number of comment to read (n2))
For (d1), make sure to set device No. that can store the above points successively.
For the Universal model QCPU, when the standard ROM is selected in "Corresponding Memory" in
"Comment File Used in a Command" in the PLC File tab of the PLC parameter dialog box, the number of
comments read at END processing is determined by the system.
Even if a command for SP.SFCTCOMR instruction turns ON, SP.SFCTCOMR instruction is not executed.
• For the comment files to be used with S(P).SFCTCOMR, set them in the PLC File tab of the PLC parameter dialog box or
at "file set instruction (QCDSET(P)) for comments". Executing S(P).SFCTCOMR without setting of comment file to use, 0 is
stored to "the total number of transition conditions ((d1) +0)" and "the number of transit condition that have read
comments((d1) +1)". At this time, the device specified in (d2) turns ON for 1 scan. When the comment file setting is
configured in the PLC File tab of the PLC parameter dialog box but the file does not exist at power-on or reset, "FILE SET
ERROR" (error code: 2400) will occur.
• The following table lists the availability of reading comments stored in the memories by the S(P).SFCTCOMR instruction.
Readable, Not readable
Memory type Availability of reading comments
SRAM card (drive 1)
Flash card (drive 2)
Standard ROM (drive 4)
ATA card *3
SD memory card *3
*3 If the S(P).SFCSCOMR instruction is executed to the ATA card or SD memory card where the comments are stored, an operation error
(error code: 4130) occurs.
Precautions
• Make sure to use comments to be read with S(P).SFCTCOMR after the device specified at (d2) turns ON. Comments to be
read before the device specified at (d2) turns ON become an indefinite value.
• If the number of transition conditions associated with active steps is larger than that of comments to be read in a single (n3),
the active step comments are divided into the number to be read in a single scan. Counting the total number of steps is also
performed with the same comment number (n3) for 1 scan. In case transition conditions are remained without being
counted when reading comments completed, the counting will be continued for the remained. Because of this, the number
of scans calculated in the following formula is required. (Comments to be actually stored are the same points stored in (d1)
+1)
Operation Errors
Error code Description
2410 When a comment file specified at execution of S(P).SFCSCOMR instruction does not existed
4100 • When SFC block No. specified at n1 is other than 0 to 319
• When the number of readout comment specified at n2 is other than 0 to 256
• When the number of readout comments in a single scan specified at n3 is other than 0 to 256
4101 When the number of readout comments specified at n2 exceeds the device range of D1
4130 When the S(P).SFCSCOMR instruction is executed to the comment file in the ATA card or SD memory card
• Procedure for "batch writes of SFC program in RUN status", "online change (inactive block)", or "write of comment file in
RUN status"
1. Turns ON the X0 (write execution command in RUN status).
2. M0 (write enable flag in RUN status) is turned ON when SP.SFCTCOMR instruction is deactivated.
4. Performs "batch write of SFC program in RUN status", "online change (inactive block)", or "write of comment file in RUN
status".
5. Turns OFF the M0 (write enable flag in RUN status) in the device test of the programming tool.
6. SP.SFCTCOMR instruction is executed again when M0 (write enable flag in RUN status) is turned OFF.
• The execution types of the sequence program and SFC program are fixed to the "scan execution type". (The execution
types of the sequence program and SFC program are fixed.)
• The Basic model QCPU executes the SFC program after execution of the sequence program. (The execution order of the
sequence program and SFC program is fixed.)
• The file name of the sequence program is fixed to "MAIN". Also, the file name of the SFC program is fixed to "MAIN-SFC".
When both the "sequence program" and "SFC program" exist in the program memory, both programs are
executed. Delete the programs, which will not be executed, from the program memory. When ROM operation
is performed, delete the programs, which will not be executed, from the standard ROM.
*1 The low-speed execution type program execution is not available for the Redundant CPU, Universal model QCPU, and LCPU.
*2 Only one program is allowed for the Universal model QCPU and LCPU.
*3 The Universal model QCPU and LCPU do not support SFC programs for program execution management.
• When the SFC program set as a stand-by type program is to be started, the SFC program in execution must
be switched to a stand-by type program before it is started. Refer to Page 150 Execution type designation
by instructions for the method of switching between the scan execution type program and stand-by type
program.
5
• Specify the execution type of each program file in "Program" of the PLC parameter dialog box.
• In the "Program" of the PLC parameter dialog box, set the normal SFC program to the number higher than
that of the SFC program for program execution management. If the normal SFC program is set to the
number lower than that of the SFC program for program execution management, an error may occur when
the SFC program set as a stand-by type program is started.
Instruction format
The following shows how to create an instruction.
■Usable instructions
The SFC diagram symbols (except the block START steps) and steps that can be used in an SFC program and the sequence
instructions that can be used in transition conditions can all be used.
If block start steps are described, a "BLOCK EXE. ERROR" error (error No. 4621) will occur during SFC
program execution and the CPU module will stop the execution.
Execution procedure
The program is started automatically when registered as a scan execution type program. At end step processing, the initial
step is reactivated and processing is repeated.
• Use the peripheral device to select between the SFC program for program execution management and the
normal SFC program. For details regarding the setting procedure, refer to the GX Developer Operating
Manual (SFC).
• Periodic execution block settings cannot be defined the SFC programs for program execution control. If a
SFC program for program execution control is set in a periodic execution block, the execution of the SFC
program will not be performed.
• The Basic model QCPU, Universal model QCPU, and LCPU do not support SFC programs for program
execution management.
• The SFC program for program execution management cannot be set as a stand-by type program. In
addition, execution designation by POFF or PSCAN instruction cannot be applied to the program.
• The SFC control instructions cannot be executed for the SFC program for program execution management.
The processing sequence when transition condition t4 is satisfied is the same as that shown above except for
a different "product type".
*1 For the Universal model QCPU and LCPU, only one SFC program (one normal SFC program) can be scanned.
Refer to Page 161 SFC Program START and STOP for the SFC program start/stop method.
5
At the end of the operation output execution at each step, whether the transition condition to the next step is satisfied or not is
checked.
• When the transition condition is not yet satisfied, the operation output of the same step is also executed in the next scan.
• When the transition condition is satisfied, the outputs turned ON by the OUT instruction at the executed steps are all turned
OFF. When the next scan is executed, the operation output of the next step is executed. At this time, the operation output of
the step executed previously is deactivated (unexecuted).
The CPU module processes only the program of the operation output of the currently active step and the transition condition
to the next step.
Ex.
The execution sequence from a program start till a transition from the initial step to step 1 is as shown below.
The step whose attribute has been set to a HOLD step is not deactivated (unexecuted). Processing continues
according to the set attribute.
The tact time can be shortened by setting "with continuous transition". This resolves the problem of waiting
time from when the transition condition is satisfied until the operation output of the transition destination step
is executed. However, when "with continuous transition" is set, the operations of the other blocks and
sequence program may become slower.
END processing is performed after all the program files set to the "scan execution type" in the program setting
of the PLC parameter dialog box have been executed. Refer to the QCPU User's Manual (Function
Explanation, Programming Fundamentals) for the detailed processing order of the programs other than the
SFC program and their processings.
END processing is performed after all the program files set to the "scan execution type" in the program setting
of the PLC parameter dialog box have been executed. Refer to the QCPU User's Manual (Function
Explanation, Programming Fundamentals) for the detailed processing order of the programs other than the
SFC program and their processings.
Start and stop using the special relay for SFC program start/stop (SM321)
SM321 turns ON when an Auto START is made using the PLC parameter.
• Turn OFF SM321 to stop the SFC program execution.
• Turn ON SM321 to start the SFC program.
Start and stop using the PSCAN/POFF instruction (except the Basic model QCPU)
• When the POFF instruction is executed, the SFC program in execution turns off the output and then stops. The execution
type changes to the "stand-by type".
• When the PSCAN instruction is executed, the stand-by type SFC program can be started. However, when the SFC
program has not been set to the "scan execution type" (SM321 is OFF) in the program setting of the PLC parameter dialog
box, the SFC program is started by turning ON Sm321. The execution type changes to the "scan execution type".
Block operation status resulting from "SFC program START mode" setting
At an SFC program start, whether an initial start or resume start will be made is determined by the combination of the setting
of the "SFC program start mode" in the PLC parameter dialog box and the ON/OFF status of the "special relay for setting SFC
program start status (SM322)".
Operation SFC Program Start Mode
Initial Start Resume Start
SM322: OFF SM322: ON SM322: ON SM322: OFF
(Initial status)*1 (When changed by (Initial status)*1 (When changed
user) by user)
SM321: Turned ON Initial Initial Resume Initial
Programmable controller: Powered ON Resume/Initial*3
Programmable controller: Powered OFF and then Resume*2
ON after SM321 is switched from ON to OFF or the
CPU module is switched from RUN to STOP
CPU module: Reset and RUN Resume/Initial*6
CPU module: Reset and RUN after SM321 is Resume*2
switched from ON to OFF or the CPU module is
switched from RUN to STOP
CPU module: Switched from STOP to RUN Resume
CPU module: STOP, write a program, and then RUN Initial*4*5
*1 SM322 is turned ON/OFF by the system according to the setting of the "SFC program start mode" in the PLC parameter dialog box
when the CPU module switches from STOP RUN.
At initial start setting: OFF
At resume start setting: ON
*2 Operation at resume start
At a resume start, the SFC program stop position is held but the status of each device used for the operation output is not held.
Therefore, make latch setting for the devices whose statuses must be held in making a resume start.
The held coil HOLD step SC becomes inactive, and is not kept held. In the Basic model QCPU, Universal model QCPU, and LCPU, the
held coil HOLD step SC restarts in the held status. However, the output is not held. To hold the output, make latch setting for the devices
desired to be held.
*3 Depending on the timing, a resume start is disabled and an initial start may be made. To perform a resume start, turn ON and then OFF
SM321 or switch the CPU module from RUN to STOP, and power OFF and then ON the programmable controller. Note that the Basic
model QCPU and the Universal model QCPU with serial number "11042" (first five digits) or earlier always perform an initial start.
*4 A resume start may be made depending on the SFC program change. If a resume start is made as-is, a start is made from the old step
number, leading to a malfunction of the mechanical system. When any SFC program change (SFC diagram correction such as step
addition and deletion) has been made, make an initial start once and then return it to a resume start. Note that the Basic model QCPU
and the Universal model QCPU with serial number "11042" (first five digits) or earlier always perform an initial start.
*5 In the Universal model QCPU and LCPU, a resume start is performed if data other than SFC programs are changed.
*6 The Basic model QCPU and Universal model QCPU of which the first 5 digits of the serial number are "11042" always makes an initial
start.
• When the programmable controller is powered OFF or the CPU module is reset, the intelligent function
modules and special function modules are initialized. When making a resume start, create an initial program
for the intelligent function module/special function module in the block that is always active or in the
sequence program.
• When the programmable controller is powered OFF or the CPU module is reset, values in the devices
without a latch setting are cleared. To hold the values in the SFC information devices, set a latch range.
Block START by SFC Using an SFC control instruction, a specified block is Convenient when starting an error reset
control instruction forcibly started from an SFC program step (operation processing block at error detection, etc., and
output), or from another sequence program. for executing interrupt processing, for example.
• When specified block is executed from its initial step:
Block START by SFC The corresponding block is activated by forcibly turning Convenient for debugging and test operations
information device ON the "block START/END bit", which was set to each in 1-block units because the block can be
block as the SFC information device, in the program or started from a peripheral device without
peripheral device. requiring a program.
Block END by SFC control instruction Using an SFC control instruction, a specified block is Convenient for executing a forced STOP (at emergency
forcibly ended and deactivated from an SFC program stops, etc.) without regard to the operation status.
step (operation output), or from another sequence
program.*1
Block END by SFC information device The processing of the corresponding block is ended to Convenient for debugging and test operations because
deactivate it by forcibly turning OFF the "block START/ block processing can be ended from a peripheral device
END bit", which was set to each block as the SFC without requiring a program.
information device, in the program or peripheral device.
*1 Block processing is also ended when the RST BLm\Sn instruction is used to deactivate all steps at a specified block.
A forced end to block processing is possible using a method which is different from that used to start the
block.
• A block started by an SFC diagram symbol can be ended by an SFC control instruction (RST BLm).
• A block started by an SFC control instruction (SET BLm) can be ended by forcibly turning OFF the block
START/END bit of the SFC information devices.
STOP by SFC information device The execution of the specified block is temporarily Convenient for confirming operation by step control at 6
stopped by forcibly turning ON the "block STOP/ debugging and test operations, because block
RESTART bit", which was set to each block as the SFC processing can be stopped from a peripheral device
information device, in the program or peripheral device. without requiring a program.
Block STOP timing and coil output status when STOP occurs
The STOP timing in response to a block STOP request, and the coil output status during the STOP are as shown below.
Setting of Operation Status of Operation
Output Output at STOP-time Active step other than held Held step*1
Mode at Block Mode Bit step Coil HOLD step (SC) Operation Operation
Block Stop Stop (including HOLD step whose HOLD step HOLD step
in PLC (SM325) transition condition is not (without (with
Parameter satisfied) transition transition
check) (SE) check) (ST)
Turns OFF OFF OFF • Immediately after a STOP request • Immediately after a • Immediately after a STOP request is
(coil output (coil output No setting is made, the coil output of the STOP request is made, the coil output of the operation
OFF) OFF) (immediate operation output is turned OFF made, the coil output output is turned OFF and the block is
Remains ON stop) and the block is stopped. of the operation output stopped.
(coil output • The status remains active. is turned OFF and the • The status remains active.
held) ON • Normal operation is performed block is stopped.
(STOP after until the transition condition is • The status becomes
transition) satisfied. inactive.
• When the transition condition is
satisfied, the end processing of
the corresponding step is
performed. At the same time, the
transition destination step
becomes active and the block
stops immediately.
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
Operation of SM325
The operation of SM325 differs depending on the CPU module.
■For the Basic model QCPU, High Performance model QCPU, Process CPU, and QnACPU
SM325 turns ON/OFF according to the parameter setting (output mode setting at block stop) at STOP RUN of the CPU
module.
Note that the output mode at block stop can be changed regardless of the parameter setting by turning ON/
OFF SM325 in the user program.
RESTART by SFC information device The execution of the corresponding block is restarted by Convenient for confirming operation by step control at
forcibly turning OFF the "block STOP/RESTART bit", debugging and test operations, because block
which was set to each block as the SFC information processing can be restarted from a peripheral device
device, in the program or peripheral device. without requiring a program.
6
Active step when restart occurs
The step which is active when a block is restarted varies according to the status which existed when the STOP occurred, as
shown below.
Output Mode Operation Output at Block RESTART
Setting at Block Active step other than held Held step*1
STOP step Coil HOLD step (SC) Operation HOLD step Operation HOLD step
(including HOLD step whose (without transition (with transition
transition condition is not check) (SE) check) (ST)
satisfied)
At coil output OFF Returns to normal operation. Restart disabled. (Since the Restarts the execution of • Restarts the operation
step is deactivated at a block the operation output in a output in a HOLD
STOP) HOLD status. status.
• Also checks the
At coil output HOLD Restarts as held.
transition condition.
*1 The held step indicates the step whose attribute has been set to the HOLD step (SC, SE, ST) and which is being held with the transition
condition satisfied.
Operation of SM325
The operation of SM325 is the same as one of the block STOP methods. ( Page 166 Operation of SM325)
Condition
TRAN
Started when condition
is satisfied.
Step START by SFC control instruction The specified step is forcibly started by the SFC control • Jump to other blocks can be made.
instruction at the step (operation output) of the SFC • When the block of the destination step is inactive, a
program or in another sequence program. block forced START is made from the specified step.
• When there are initial steps in multiple blocks, a
selection START is made.
Set the step to a reset step as the step attribute and • Convenient for ending the HOLD step when the
specify the step number to be ended. machine operation condition is satisfied during SFC
program execution, when a transition to the error
processing step is performed by selection branch, for
example.
• The step number to be ended can be specified in only
the same block.
END by SFC control instruction The specified step is forcibly ended by the SFC control • The steps in different blocks can also be ended.
instruction at the step (operation output) of the SFC • The block is ended when all steps of the corresponding
program or in another sequence program. block are deactivated by the RST instruction.
*1 For the L02(S)CPU, L02(S)CPU-P, and the LCPU whose serial number (first five digits) is "15101" or earlier, online change (inactive
block) cannot be performed.
*2 This function can be executed only when a CPU module and programming tool are used in the following combination.
*3 The Universal model QCPU and LCPU do not support the use of this function in the RUN status.
*4 This function can be executed only when a CPU module and GX Works2 are used in the following combination.
The setting of SM326 is valid only when an SFC program exists after write to PLC. When sequence program
and/or parameter write is performed, the setting of SM326 is also valid. (The setting of SM326 is ignored when
only the data other than the SFC program, sequence program and parameters are written.)
This function can be executed only when a CPU module and GX Works2 are used in the following
combination.
• Universal model QCPU other than the Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU (serial number
(first five digits) is "12052" or later): GX Works2 Version 1.34L or later
• LCPU other than the L02(S)CPU and L02(S)CPU-P (serial number (first five digits) is "15102" or later): GX
Works2 Version 1.501X or later
Supported program
This function can be executed to an SFC program registered in the Program tab of the PLC parameter dialog box.
When there are multiple programs in the program memory, this function cannot be executed to a program not
registered in the Program tab.
Available operations
The following operations can be executed to an inactive block with GX Works2.
Operation Description
Changing a block • An SFC block program in the CPU module can be changed.
• An SFC information device for the target SFC block can be changed.
Adding a block • An SFC block can be added to an SFC program in the CPU module.
• An SFC information device can be added to the target SFC block.
Deleting a block • The specified SFC block can be deleted from the SFC program in the CPU module.
• An SFC information device for the target SFC block can be deleted.
• When the target block is not in an SFC program in the CPU module, deleting a block cannot be performed.
■Area to be changed
All programs of the target block are overwritten. Multiple blocks cannot be batch-written. In online change (inactive block), a
program (before change) in a programming tool is not verified with the program in the CPU module. Therefore, verifying an
SFC program in the programming tool with that in the CPU module beforehand is recommended.
Before an SFC program is changed, the above devices are checked if they are within the device range. If any
of them are outside the device range, the online change (inactive block) cannot be performed.
■Changing the execution type of a program during online change (inactive block)
The execution type of a program being written by online change (inactive block) cannot be changed with Program control
instructions (POFF and PSCAN instructions).
*1 For how to end processing of a block and set it to inactive, refer to Page 164 Block END methods.
*2 While SM321 is off, online change (inactive block) can be executed, regardless of the target block status immediately before the relay
turns off. Note when online change (inactive step) is executed while SM321 is off, the SFC program always starts in initial start mode,
regardless of settings configured in "SFC Program Start Mode" in the SFC tab of the PLC parameter dialog box and SM322 (SFC
program start status).
In the STOP or PAUSE status, an active step holds the activated status. Therefore, when the CPU module is
set to STOP or PAUSE while the target block is active, online change (inactive block) cannot be executed to 6
the block.
Ex.
Program example to execute the Block START instruction during online change (inactive block)
Adding an SFC block (No relevant SFC blocks) 10 + Number of steps in step 0 + Number
of steps of transition condition 0 (When
SFC information device is set, further 9
steps are reduced.)
APPX
178 Appendix 1 Special Relay and Special Register List
Special Relay (SM) List
The following table lists the special relays that can be used in the SFC programs.
Number Name Meaning Explanation Set by Corresponding CPU
(When set) (1) (2) (3) (4) (5) (6)
SM90 Step transition watch OFF: Not started (Watch • Switched ON to begin the U
dog timer START dog timer reset) step transition watch dog
(corresponds to SD90) ON: Started (Watch dog timer count.
SM91 Step transition watch timer start) • Watch dog timer is reset
when switched OFF.
dog timer START
(corresponds to SD91)
SM92 Step transition watch
dog timer START
(corresponds to SD92)
SM93 Step transition watch
dog timer START
(corresponds to SD93)
SM94 Step transition watch
dog timer START
(corresponds to SD94)
SM95 Step transition watch
dog timer START
(corresponds to SD95)
SM96 Step transition watch
dog timer START
(corresponds to SD96)
SM97 Step transition watch
dog timer START
(corresponds to SD97)
SM98 Step transition watch
dog timer START
(corresponds to SD98)
SM99 Step transition watch
A
dog timer START
(corresponds to SD99)
APPX
Appendix 1 Special Relay and Special Register List 179
Number Name Meaning Explanation Set by Corresponding CPU
(When set) (1) (2) (3) (4) (5) (6)
SM320 SFC program OFF: Not started (Watch • Switched ON to begin the S (Initial)
presence/absence dog timer reset) step transition watch dog *1
APPX
180 Appendix 1 Special Relay and Special Register List
Number Name Meaning Explanation Set by Corresponding CPU
(When set) (1) (2) (3) (4) (5) (6)
SM324 Continuous transition OFF: After transition • OFF during operation in S (Instruction
disable flag ON: Before transition the "with continuous execution) *1
APPX
Appendix 1 Special Relay and Special Register List 181
Number Name Meaning Explanation Set by Corresponding CPU
(When set) (1) (2) (3) (4) (5) (6)
SM329 Online change OFF: Not executed This relay indicates the S (Status change)
(inactive block) status ON: Being executed execution status of online *5
APPX
182 Appendix 1 Special Relay and Special Register List
Special Register (SD) List
The following table lists the special registers that can be used in the SFC programs.
Number Name Meaning Explanation Set by Corresponding CPU
(When set) (1) (2) (3) (4) (5) (6)
SD90 Corresponding to Timer set value • Set the set time of the step transition U
SM90 and F No. at watch dog timer and the annunciator
SD91 Corresponding to time-out No. (F No.) that will turn ON at time-out
SM91 of the watch dog timer.
SD92 Corresponding to
SM92
SD93 Corresponding to
SM93
SD94 Corresponding to
SM94
SD95 Corresponding to
• The timer starts when any of SM90 to
SM95
SM99 is turned ON during an active
SD96 Corresponding to step, and the set annunciator (F) turns
SM96 ON if the transition condition following
SD97 Corresponding to the corresponding step is not satisfied
SM97 within the timer time limit.
SD98 Corresponding to
SM98
SD99 Corresponding to
SM99
SD329 Online change SFC block • While online change (inactive block) is S (Status
(inactive block) target number executed (SM329 is on.), this register change) *1
*1 Available with the Universal model QCPU other than the Q00U(J), Q01U, Q02UCPU, whose serial number (first five digits) is "12052" or A
later. Available with the LCPU other than the L02(S)CPU(-P), whose serial number (first five digits) is "15102" or later.
The special registers SD90 to SD99 correspond to the following special relays.
Special register Special relay
SD90 SM90
SD91 SM91
SD92 SM92
SD93 SM93
SD94 SM94
SD95 SM95
SD96 SM96
SD97 SM97
SD98 SM98
SD99 SM99
APPX
Appendix 1 Special Relay and Special Register List 183
Appendix 2 MELSAP-II and MELSAP3 Comparison
Compared to MELSAP-II, the improved MELSAP3 has additional functions which facilitate the use of SFC programs.
MELSAP-II and MELSAP3 are compared below.
APPX
184 Appendix 2 MELSAP-II and MELSAP3 Comparison
SFC Diagram Symbols
The following table lists the comparison of the SFC diagram symbols.
Name MELSAP- MELSAP3
Step
, ,
Reset step
APPX
Appendix 2 MELSAP-II and MELSAP3 Comparison 185
SFC Control Instructions
The SFC control instruction shown below are available at MELSAP3. MELSAP-II has no SFC control instructions.
Name Ladder Expression Function Corresponding CPU*1
(1) (2) (3) (4) (5) (6)
Step status (active/ [LD, AND, OR, LDI, ANI, ORI] Sn Executes a check to determine if a specified
inactive) check step at a specified block is active or inactive.
[LD, AND, OR, LDI, ANI, ORI] BLmSn
instruction
Forced transition [LD, AND, OR, LDI, ANI, ORI] TRn Checks a specified step in a specified block
check instruction to determine if the transition condition (by
[LD, AND, OR, LDI, ANI, ORI] BLmTRn
transition control instruction) for that step
was satisfied forcibly or not.
Block operation status [LD, AND, OR, LDI, ANI, ORI] BLm Checks a specified block to determine if it is
check instruction active or inactive.
Active steps batch MOV(P) K4Sn (d) Active steps in a specified block are read to a
readout instruction specified device as bit information.
MOV(P) BLm\K4Sn (d)
DMOV(P) K8Sn (d)
DMOV(P) BLm\K8Sn (d)
BMOV(P) K4Sn (d) Kn
BMOV(P) BLm\K4Sn (d) Kn
Block START SET BLm A specified block is forcibly started
instruction (activated) independently, and is executed
from its initial step.
Block END instruction RST BLm A specified block is forcibly ended
(deactivated).
Block STOP instruction PAUSE BLm A specified block is temporarily stopped.
Block restart RSTART BLm The temporary stop status at a specified
instruction block is canceled, with operation resuming
from the STOP step.
Step control instruction SET Sn A specified block is forcibly started
SET BLm\Sn (activated) independently, and is executed
from a specified step.
RST Sn A specified step in a specified block is
forcibly ended (deactivated).
RST BLm\Sn
SCHG (d) The instruction execution step is deactivated,
and a specified step is activated.
Transition control SET TRn A specified transition condition at a specified
instruction block is forcibly satisfied.
SET BLm\TRn
RST TRn The forced transition at a specified transition
RST BLm\TRn condition in a specified block is canceled.
Block switching BRSET (s) Blocks subject to the "*1" SFC control *2
instruction instruction are designated.
APPX
186 Appendix 2 MELSAP-II and MELSAP3 Comparison
Block/Step START, END, and STOP Methods
The following table lists the comparison of the block/step START, END, and STOP methods.
Item MELSAP- MELSAP3
By SFC Diagram By Block By SFC Diagram By Block By SFC
Symbol Information Symbol Information control
Instruction
Block START (with END check)
m m
Block START (without END check) Block active bit ON Block START/END bit SET BLm
m
ON SET BLm\Sn
Block END Block clear bit ON Block START/END bit RST BLm
OFF OFF
*1 The Basic model QCPU cannot use active step change, active step forced transition, and forced transition cancel.
APPX
Appendix 2 MELSAP-II and MELSAP3 Comparison 187
Basic model QCPU
The following table lists the comparison between MELSAP- and MELSAP3 when the Basic model QCPU is used.
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
188 Appendix 2 MELSAP-II and MELSAP3 Comparison
High Performance model QCPU, Process CPU, Redundant CPU
and QnACPU
The following table lists the comparison between MELSAP- and MELSAP3 when the High Performance model QCPU,
Process CPU, Redundant CPU, or QnACPU is used.
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
Appendix 2 MELSAP-II and MELSAP3 Comparison 189
Universal model QCPU
The following table lists the comparison between MELSAP- and MELSAP3 when the Universal model QCPU is used.
• Q00U(J)CPU, Q01UCPU, Q02UCPU
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
190 Appendix 2 MELSAP-II and MELSAP3 Comparison
• QnUD(E)(H)CPU
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
Appendix 2 MELSAP-II and MELSAP3 Comparison 191
• QnUDVCPU, QnUDPVCPU
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
192 Appendix 2 MELSAP-II and MELSAP3 Comparison
LCPU
The following table lists the comparison between MELSAP- and MELSAP3 when the LCPU is used.
• L02SCPU, L02SCPU-P, L02CPU, L02CPU-P
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
Appendix 2 MELSAP-II and MELSAP3 Comparison 193
• L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT
*1 The maximum number of sequence steps per block depends on the instruction used for operation output or a note editing setting. The
number of steps (2k steps) indicated in the table applies when "Unite (United Note)" is selected for note editing. Note that 2k sequence
steps per block may not be secured when "Peripheral (Peripheral Note)" is selected. If note editing is not set, 2k sequence steps or more
per block may be secured depending on an instruction used.
APPX
194 Appendix 2 MELSAP-II and MELSAP3 Comparison
Appendix 3 Restrictions on Basic Model QCPU,
Universal Model QCPU, and LCPU and
Alternative Methods
This section describes the restrictions on use of SFC programs for the Basic model QCPU, Universal model QCPU, and
LCPU.
Function comparison
Item Basic Model QCPU, High Performance Model Alternative
Universal model QCPU, QCPU, Process CPU, Method
LCPU Redundant CPU, QnACPU
Step transition watchdog timer Not provided Provided Page 196 Step
Transition
Watchdog Timer
Replacement
Method
SFC operation mode Operation mode at block double START Not provided*2 Provided
setting (Fixed to "WAIT")
Operation mode for transition to active Not provided Provided
step (at step double START) (Fixed to "TRANSFER")
Fixed scan execution block setting Not provided Provided Page 197 Periodic
Execution Block
Replacement
Method
SFC control Forced transition LD TRn Not provided Provided
instruction check instruction
AND TRn
OR TRn
LDI TRn
ANI TRn A
ORI TRn
LD BLm\TRn
AND BLm\TRn
AR BLm\TRn
LDI BLm\TRn
ANI BLm\TRn
ORI BLm\TRn
Active step change SCHG (d) Not provided Provided Page 199 Active
instruction Step Change
Instruction (SCHG)
Replacement
Method
Transition control SET TRn Not provided Provided Page 198 Forced
instruction SET BLm\TRn Transition Bit (TRn)
Replacement
RST TRn Method
RST BLm\TRn
Block switching BRSET (s) Not provided*3 Provided
instruction
SFC program for program execution management Not provided Provided
Program execution type setting Not provided*1 Provided
(Fixed to "scan execution type")
*1 For the Universal model QCPU and LCPU, the execution type of the program can be set.
*2 For the following CPU modules, the operation mode at double block START cannot be set.
Universal model QCPU other than the Q00UJCPU, Q00UCPU, Q01UCPU, and Q02UCPU, whose serial number (first five digits) is
"12052" or later
LCPU other than the L02(S)CPU and L02(S)CPU-P, whose serial number (first five digits) is "15102" or later
*3 The instruction can be used with the Universal model QCPU whose serial number (first five digits) is "13102" or later.
APPX
Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU, and LCPU and Alternative Methods 195
Step Transition Watchdog Timer Replacement Method
APPX
196 Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU, and LCPU and Alternative Methods
Periodic Execution Block Replacement Method
APPX
Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU, and LCPU and Alternative Methods 197
Forced Transition Bit (TRn) Replacement Method
APPX
198 Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU, and LCPU and Alternative Methods
Active Step Change Instruction (SCHG) Replacement Method
APPX
Appendix 3 Restrictions on Basic Model QCPU, Universal Model QCPU, and LCPU and Alternative Methods 199
INDEX
B
Basic model QCPU . . . . . . . . . . . . . . . . . . . . . . . 6
H
High Performance model QCPU . . . . . . . . . . . . . . 6
High-speed Universal model QCPU . . . . . . . . . . . 6
L
LCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
M
MELSAP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
P
Process CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Q
QCPU . . . . . . . . . . ...................... 6
QnACPU . . . . . . . . ...................... 6
QnCPU . . . . . . . . . ...................... 6
QnHCPU . . . . . . . . ...................... 6
QnPHCPU . . . . . . . ...................... 6
QnPRHCPU . . . . . . ...................... 6
QnUD(E)(H)CPU . . ...................... 6
QnUDPVCPU . . . . . ...................... 6
QnUDVCPU . . . . . . ...................... 6
R
Redundant CPU . . . . . . . . . . . . . . . . . . . . . . . . . 6
S
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
U
Universal model Process CPU . . . . . . . . . . . . . . . 6
Universal model QCPU . . . . . . . . . . . . . . . . . . . . 6
200
MEMO
201
INSTRUCTION INDEX
A
AND . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
ANI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
B
BMOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
BRSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
D
DMOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
L
LD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
LDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
M
MOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
O
OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
ORI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81,83,85
P
PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
R
RST. . . . . . . . . . . . . . . . . . . . . . . . . . . 94,99,103
RSTART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
S
S(P).SFCSCOMR . . . . . . . . . . . . . . . . . . . . . . 134
S(P).SFCTCOMR . . . . . . . . . . . . . . . . . . . . . . 140
SCHG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
SET . . . . . . . . . . . . . . . . . . . . . . . . . . . 94,99,103
202
MEMO
203
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
Dec., 1999 SH(NA)-080041-A Due to the transition to the e-Manual, the details of revision have been deleted.
to to
Jun., 2014 SH(NA)-080041-V
May, 2016 SH(NA)-080041-W Complete revision (layout change)
Sep., 2018 SH(NA)-080041-X Descriptions regarding the QnUDPVCPU is added.
204
WARRANTY
Please confirm the following product warranty details before using this product.
1. Gratis Warranty Term and Gratis Warranty Range
If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product
within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service
Company.
However, if repairs are required onsite at domestic or overseas location, expenses to send an engineer will be solely at
the customer's discretion. Mitsubishi shall not be held responsible for any re-commissioning, maintenance, or testing
on-site that involves replacement of the failed module.
[Gratis Warranty Term]
The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place.
Note that after manufacture and shipment from Mitsubishi, the maximum distribution period shall be six (6) months, and
the longest gratis warranty term after manufacturing shall be eighteen (18) months. The gratis warranty term of repair
parts shall not exceed the gratis warranty term before repairs.
[Gratis Warranty Range]
(1) The range shall be limited to normal use within the usage state, usage methods and usage environment, etc., which
follow the conditions and precautions, etc., given in the instruction manual, user's manual and caution labels on the
product.
(2) Even within the gratis warranty term, repairs shall be charged for in the following cases.
1. Failure occurring from inappropriate storage or handling, carelessness or negligence by the user. Failure caused
by the user's hardware or software design.
2. Failure caused by unapproved modifications, etc., to the product by the user.
3. When the Mitsubishi product is assembled into a user's device, Failure that could have been avoided if functions
or structures, judged as necessary in the legal safety measures the user's device is subject to or as necessary by
industry standards, had been provided.
4. Failure that could have been avoided if consumable parts (battery, backlight, fuse, etc.) designated in the
instruction manual had been correctly serviced or replaced.
5. Failure caused by external irresistible forces such as fires or abnormal voltages, and Failure caused by force
majeure such as earthquakes, lightning, wind and water damage.
6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi.
7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user.
2. Onerous repair term after discontinuation of production
(1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
Discontinuation of production shall be notified with Mitsubishi Technical Bulletins, etc.
(2) Product supply (including repair parts) is not available after production is discontinued.
3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local overseas FA Center. Note that the repair conditions at each FA
Center may differ.
4. Exclusion of loss in opportunity and secondary loss from warranty liability
Regardless of the gratis warranty term, Mitsubishi shall not be liable for compensation to:
(1) Damages caused by any cause found not to be the responsibility of Mitsubishi.
(2) Loss in opportunity, lost profits incurred to the user by Failures of Mitsubishi products.
(3) Special damages and secondary damages whether foreseeable or not, compensation for accidents, and
compensation for damages to products other than Mitsubishi products.
(4) Replacement by the user, maintenance of on-site equipment, start-up test run and other tasks.
5. Changes in product specifications
The specifications given in the catalogs, manuals or technical documents are subject to change without prior notice.
205
TRADEMARKS
Ethernet is a registered trademark of Fuji Xerox Corporation in Japan.
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries.
Unicode is either a registered trademark or a trademark of Unicode, Inc. in the United States and other countries.
The company names, system names and product names mentioned in this manual are either registered trademarks or
trademarks of their respective companies.
In some cases, trademark symbols such as '' or '' are not specified in this manual.
206 SH(NA)-080041-X
SH(NA)-080041-X(1809)MEE
MODEL: QNA/QCPU-P(SF)-E
MODEL CODE: 13JF60
HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.