T315C-14 Sequential Function Charts - RevE
T315C-14 Sequential Function Charts - RevE
TABLE OF CONTENTS
Chapter 14 - 1
T315C-14 Sequential Function Charts - RevE
14.1.1 Objectives
On completion of this chapter you will be able to:
• Describe the components of SFC
• Create simple sequences
• Use online functions of SFC
• Describe and use the different sequence control variables
• Tell the use of a Two direction SFC
14.1.2 Legend
> Indicates when you go from one menu to a sub-menu
Italic Indicates object and file names
“ “ Indicates dialog box buttons, tabs, menus etc.
Bold Indicates important topics
Indicates start/explanation of student activity
Chapter 14 - 2
System 800xA Training
14.2.1 General
The Sequential Function Chart (SFC) programming language allows the user to
describe the sequential behavior of the control program graphically. This is quoted as
the fifth IEC 61131-3 language but it’s not really a new language just a specialized
editor for coding sequences.
The SFC standard has been evolved from Grafcet, a graphical method of describing
sequential behavior.
Chapter 14 - 3
T315C-14 Sequential Function Charts - RevE
Theoretically, there are two types of logic which are required to solve all process
control problems. These are:
Logical Function
Input 1 Output 1
Input 2 Output 2
Input 3 Output 3
Input n Output n
Chapter 14 - 4
System 800xA Training
It is not possible to have a sequence without any steps or transitions. The sequence
must consist of at least one step and one transition.
Chapter 14 - 5
T315C-14 Sequential Function Charts - RevE
Select “Sequential Function Chart ( SFC)” and type in a name for the new code block.
NOTE! To delete a step, you must select the step AND the
corresponding transition.
Chapter 14 - 6
System 800xA Training
Tools > Make Subsequence Turn the selected steps and transitions
into a subsequence.
Tools > Dissolve Subsequence Dissolves the selected subsequence.
View > Step into Subsequence Steps into the selected subsequence.
View > Step Out of Subsequence Steps out of the open subsequence.
NOTE! Use the online help (F1) to read about these functions.
Chapter 14 - 7
T315C-14 Sequential Function Charts - RevE
There are functions only available in the online mode. Some of them are:
NOTE! Use the online help (F1) to read about these functions.
Chapter 14 - 8
System 800xA Training
The initial step becomes active at a cold start of the application(s) or when the
sequence is reset by the SequenceName.Reset variable.
14.4.2 Steps
A step is a basic element, which is activated by its preceding transition. The step
becomes active until its succeeding transition is true, and then next step is activated.
Each step has a name, that can be changed, and each step can have up to three
associated set of actions. It is not possible to change the action names.
The step is used to hold instructions which perform actions on the process devices.
Double clicking on any step will result in that step being “opened” in the editor:
Chapter 14 - 9
T315C-14 Sequential Function Charts - RevE
Each of the boxes represents one code block (or tab) in a program editor, written in
Structured Text. There are three blocks called ‘Entry’, ‘Active’ and ‘Exit’.
• Instructions written in the Entry block (P1 = Pulse rising edge) are executed once
and once only on entry into the step. (During transition from the previous step)
• Instructions written in the Active block (N = Non-stored) are executed on each
scan whilst the step is active.
• Instructions written in the Exit block (P0 = Pulse falling edge) are executed once
and once only on exit from the step. (During transition to the next step).
NOTE! Any of the three may be used, left empty or even deleted.
2. Filling_N : The level of the tank is monitored by a conditional sentence and when
the medium level switch is reached the motor is started
3. Filling_P0: The steps finalizes closing the inlet valves V1 and V5.
Chapter 14 - 10
System 800xA Training
Activated outputs in
the Draining_P1 step
Chapter 14 - 11
T315C-14 Sequential Function Charts - RevE
Activated outputs in a
separate code block
The advantage for this is that all activation code associated with the entire sequence
could be collected in one code block, instead of being scattered among the actions for
all steps.
14.4.5 Transition
The transition from one step to the next holds a Boolean expression. (Note that it is
NOT a code block as such and requires a slightly different syntax).
A Boolean expression is any sequence of terms and operators that results in a single
Boolean result – True or False. The sequence will transit from one step to the next
when the transition following the currently active step goes true.
Chapter 14 - 12
System 800xA Training
Transit
When Tr12 goes true the actions are executed in the following order during that scan:
1. S11_N executes for one final time
2. S11_P0 executes once
3. S14_P1 executes once
4. S14_N becomes active
Chapter 14 - 13
T315C-14 Sequential Function Charts - RevE
When the transition Tr7 becomes true, Step S7 is left and each of the three steps S8, S9
and S10 become active.
When a parallel branch is left all preceding steps must be active AND the following
transition must become true. In the above steps S12, S9 and S13 must be active
together with Tr9 being true before the exit from the branch takes place.
Chapter 14 - 14
System 800xA Training
If Tr15a becomes true then branching will occur to S16. However, if TR15b becomes
true then branching will occur to S17.
If both transitions become active at the same time, then the system will choose S16.
Chapter 14 - 15
T315C-14 Sequential Function Charts - RevE
In this example the branch Shutdown_Tank has the same priority as all other branches.
We change now the priority to “Highest”, since it is critical for our process. In case
several branches have a true transition condition at the same time, the branch
Shutdown_Tank will be executed.
NOTE! The execution order is from left to right that is why the
Shutdown_Tank is shown on the left side.
Chapter 14 - 16
System 800xA Training
A jump is a link from a named single transition to a named single step, located
anywhere in the same sequence structure. Multiple jumps can be connected to a step.
A jump can be considered as a sequence selection. It is a transition where the
execution is transferred from the preceding step to the jump destination step, when the
transition condition becomes true.
NOTE! It is not possible to jump between different sequences.
A forward jump is typically used when some sort of exception occurs. A backward
jump is typically used when a sequence loop is needed inside the overall sequence
loop.
Chapter 14 - 17
T315C-14 Sequential Function Charts - RevE
14.5.4 Subsequence
For documentation and overview reasons, it is sometimes convenient to graphically
structure the sequence into smaller parts, subsequences, thus hiding details until they
are requested. The subsequence is usually put around a sequence part, which performs
a set of logically related actions.
The subsequence function is a way to structure the sequence using a graphic hierarchy.
The sequence can be graphically structured into any number of hierarchical levels.
Chapter 14 - 18
System 800xA Training
Chapter 14 - 19
T315C-14 Sequential Function Charts - RevE
3. Check again the menu item ”SFC Viewer Aspect” in SFC editor:
4. Then press the ”Save” button in the POU editor. Thus the SFC Viewer aspect is
created again and the contents is updated.
F Exercise 14.1
Chapter 14 - 20
System 800xA Training
The same actions are also available in on-line mode through the menu.
Chapter 14 - 21
T315C-14 Sequential Function Charts - RevE
Step time supervision activates an alarm if any step is active for more than a specific
time.
Chapter 14 - 22
System 800xA Training
SFC Header
Variables
Chapter 14 - 23
T315C-14 Sequential Function Charts - RevE
It has the operating modes Automatic and Manual. The Manual mode has higher
priority and is the default startup mode.
Chapter 14 - 24
System 800xA Training
Chapter 14 - 25
T315C-14 Sequential Function Charts - RevE
Manual/Auto
Mode
Stop sequence
Chapter 14 - 26