108
8 SFC PROGRAM
8.6 SFC Program Execution
8.6 SFC Program Execution
Starting and stopping the SFC program
The SFC program can be started and stopped by either of the following methods.
• Auto-start by the CPU parameter
• Starting and stopping the program by the special relay (SM321)
Auto-start by the CPU parameter
Set "Start Conditions Setting" to "Auto-start block 0," in the CPU parameter. Block 0 of the SFC program starts automatically
when the CPU module is powered on or reset, or the operating status is changed from STOP to RUN. (Page 98 Start
Conditions Setting)
Starting and stopping the program by the special relay (SM321)
SM321 (Start/stop SFC program) automatically turns on at execution of the SFC program.
• The program execution can be stopped by turning off SM321.
• The terminated SFC program can be re-executed by turning on SM321.
Set the CPU parameter "SFC Program Start Mode Setting" to "Resume Start," and the SFC program can be
resumed. (Page 97 SFC Program Start Mode Setting)
Starting and ending a block
Starting a block
A block in the SFC program can be started by either of the following methods.
Item Method Remarks Reference
Auto-start by the CPU
parameter (only for block 0)
Set "Auto-start block 0" to "Start Conditions
Setting" in the CPU parameter. When the SFC
program is executed, block 0 starts
automatically and processing is performed
sequentially from the initial step.
This method is used to use block 0 as a
control block, preprocessing block, or
continuous monitoring block.
Page 98 Start Conditions
Setting
Start by the block start step Start another block by using a block start step
[BC or BS] in a block.
This method is effective when the control
sequence is clear.
Page 80 Block start step
(with END check) [BC]
Page 81 Block start step
(without END check) [BS]
Start by the SFC control
instruction
Start the block specified by the SFC control
instruction from the action of the SFC program
or another sequence program.
• Use the SET [BL] (Starting a block)
instruction to execute the program from the
initial step of the specified block.
• Use the SET [S/BL\S]/OUT [S/
BL\S] (Activating a step) instruction to
execute the program from the specified step
of the specified block.
This method is effective to restart the error
processing block or execute interrupt
processing.
Page 94 SFC Control
Instructions
Start by the engineering tool Start the specified block by turning on the SFC
block device.
This method is effective for debugging and
test operation.
GX Works3 Operating
Manual