5 - 11 5 - 11
5 SFC PROGRAM PROCESSING SEQUENCE
MELSEC-Q
5.3.3 Step execution sequence
(1) In the SFC program, the operation outputs of all active steps are processed within one scan.
Block 0
S0
: Active step
: Inactive step
Active steps in corresponding block are executed within 1 scan.
t0
S2
S3
t2
t3
S4
S5
t4
t5
S6
S7
t6
t7
(2) 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.
(a) When the transition condition is not yet satisfied, the operation output of the same step is
also executed in the next scan.
(b) 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.
Example: The execution sequence from a program start till a transition from the initial step to
step 1 is as shown below.
SFC program
CPU module
RUN
(SM321 ON)
END processing
(Transition condition
unsatisfied)
(SM321 ON)
END processing
(Transition condition
satisfied)
(SM321 ON)
END processing
Initial step
(operation
output
executed)
Initial step
(operation
output
executed)
Step 1
(operation
output
executed)
Block 0
(Transition condition
unsatisfied)
REMARKS
• The step whose attribute has been set to a HOLD step is not deactivated (unexecuted).
Processing continues according to the set attribute.