SFC for S7 sequential function chart
SFC for S7 sequential function chart
Preface, Contents
Basics of Sequential Control
Systems 1
Technical Specifications A
Abbreviations B
Glossary, Index
Edition 01/2005
A5E00345250-01
Safety Guidelines
This manual contains notices you have to observe in order to ensure your personal safety, as well as to
prevent damage to property. The notices referring to your personal safety are highlighted in the manual
by a safety alert symbol, notices referring to property damage only have no safety alert symbol. The
notices shown below are graded according to the degree of danger.
Danger
! indicates that death or severe personal injury will result if proper precautions are not taken.
Warning
! indicates that death or severe personal injury may result if proper precautions are not taken.
Caution
! with a safety alert symbol indicates that minor personal injury can result if proper precautions are not
taken.
Caution
without a safety alert symbol indicates that property damage can result if proper precautions are not
taken.
Attention
indicates that an unintended result or situation can occur if the corresponding notice is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of
danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a
warning relating to property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning
and operation of a device/system may only be performed by qualified personnel. Within the context of
the safety notices in this documentation qualified persons are defined as persons who are authorized to
commission, ground and label devices, systems and circuits in accordance with established safety
practices and standards.
Prescribed Usage
Note the following:
Warning
! This device and its components may only be used for the applications described in the catalog or the
technical description, and only in connection with devices or components from other manufacturers
which have been approved or recommended by Siemens.
Correct, reliable operation of the product requires proper transport, storage, positioning and assembly
as well as careful operation and maintenance.
Trademarks
All names identified by ® are registered trademarks of the Siemens AG.
The remaining trademarks in this publication may be trademarks whose use by third parties for their
own purposes could violate the rights of the owner.
Copyright Siemens AG 2005 All rights reserved Disclaimer of Liability
The distribution and duplication of this document or the utilization We have reviewed the contents of this publication to ensure
and transmission of its contents are not permitted without express consistency with the hardware and software described. Since
written permission. Offenders will be liable for damages. All rights, variance cannot be precluded entirely, we cannot guarantee full
including rights created by patent grant or registration of a utility consistency. However, the information in this publication is
model or design, are reserved reviewed regularly and any necessary corrections are included
in subsequent editions.
Siemens AG
Automation and Drives Siemens AG 2005
Postfach 4848, 90327 Nuremberg, Germany Technical data subject to change.
Siemens Aktiengesellschaft A5E00345250-01
Preface
This manual "SFC for S7" provides you with the information you require to use the
SFC configuration tool in conjunction with CPUs in SIMATIC S7 programmable
controllers (PLCs). If you use other target systems (for example, SIMADYN D),
please read the additional documentation for this target system.
Audience
This manual is intended for personnel involved in configuring, commissioning, and
service.
Basic experience of working with PCs and Windows is assumed.
Validity
This manual is valid for the SFC software version V6.0 or higher.
You will find the latest information that could no longer be included in this manual
along with instructions on installation in the README.TXT file accompanying the
product.
SFC for S7
A5E00345250-01 iii
Preface
Standard
The SFC software is based on the international standard DIN EN 61131-3
(IEC 1131-3) for programming languages for programmable logic controllers.
Further Support
If you have any technical questions, please get in touch with your Siemens
representative or agent responsible.
You will find your contact person at:
http://www.siemens.com/automation/partner
You will find a guide to the technical documentation offered for the individual
SIMATIC Products and Systems here at:
http://www.siemens.com/simatic-tech-doku-portal
The online catalog and order system is found under:
http://mall.ad.siemens.com/
Training Centers
Siemens offers a number of training courses to familiarize you with the SIMATIC
S7 automation system. Please contact your regional training center or our central
training center in D 90327 Nuremberg, Germany for details:
Telephone: +49 (911) 895-3200.
Internet: http://www.sitrain.com
SFC for S7
iv A5E00345250-01
Preface
Technical Support
You can reach the Technical Support for all A&D products
• Via the Web formula for the Support Request
http://www.siemens.com/automation/support-request
• Phone: + 49 180 5050 222
• Fax: + 49 180 5050 223
Additional information about our Technical Support can be found on the Internet
pages http://www.siemens.com/automation/service
SFC for S7
A5E00345250-01 v
Preface
SFC for S7
vi A5E00345250-01
Contents
SFC for S7
A5E00345250-01 vii
Contents
SFC for S7
viii A5E00345250-01
Contents
5 Documentation 5-1
5.1 Printing an SFC .................................................................................................5-1
5.2 Defining Footers ................................................................................................5-2
5.3 Chart Reference Data .......................................................................................5-2
5.4 Logs...................................................................................................................5-3
A Technical Specifications A-1
A.1 Technical Specifications................................................................................... A-1
B Abbreviations B-1
Glossary
Index
SFC for S7
A5E00345250-01 ix
Contents
SFC for S7
x A5E00345250-01
1 Basics of Sequential Control Systems
Introduction
This chapter explains the basics of sequential control systems.
Here, you will learn what a sequential control system is and what it is used for. You
will get to know the terminology and elements of SFC and the rules governing the
topology of sequencers.
1.1 Introduction
What is SFC?
SFC allows the graphic configuration and commissioning of sequential control
systems (SFC = sequential function chart). These are transferred to an automation
system and executed there. A sequential control system allows status- or event-
driven execution of production processes based on sequencers.
Sequential control systems can be used, for example, to describe the manufacture
of products as event-controlled processes (recipes).
With a sequential control system, functions from basic automation (typically created
with CFC) are controlled by operating and state changes and executed selectively.
SFC provides two independent variants of sequential control systems for different
application scenarios:
• SFC chart
• SFC type with SFC instances.
SFC für S7
A5E00345250-01 1-1
Basics of Sequential Control Systems
SFC Chart
An SFC chart contains a standardized interface to allow control of the SFC by the
user program or by the user and up to 8 sequencers for formulating the sequential
control system ("gray sequencer"). The sequential control system accesses the
blocks and signals of basic control directly and is therefore not reusable.
SFC CFC
SFC type
CFC 1 + SFC instance1
An SFC instance is derived from an SFC type and initially has properties identical
to those of the SFC type. By making changes to the SFC instance in CFC or SFC,
a limited range of instance-specific adaptations can be made.
SFC für S7
1-2 A5E00345250-01
Basics of Sequential Control Systems
SFC für S7
A5E00345250-01 1-3
Basics of Sequential Control Systems
SFC für S7
1-4 A5E00345250-01
Basics of Sequential Control Systems
Terms
The SFC editor is a tool for creating sequential control systems.
In these descriptions, the term "SFC" is used both as a chart, type, or the editor
depending on the context.
SFC für S7
A5E00345250-01 1-5
Basics of Sequential Control Systems
Once you know how to use sequential control systems, you should take a closer
look at SFC types and SFC instances so that you can later decide which of the two
sequential control variants is most suitable for a concrete task.
The SFC type and SFC instance introduce in new aspects in working with
sequential control systems. With the SFC chart, you can get going immediately; in
other words, an SFC chart can be generated, compiled, downloaded and tested
immediately.
With an SFC type
• you create an abstract sequential control system not directly related to a
concrete application as a typical template with the aim of using it more than
once. Only after generating and adapting an SFC instance and interconnecting
it with blocks of basic control do you have a situation comparable with that
when using an SFC chart. You can now
• compile, download, and test the SFC instance.
Indirectly, you are, of course, also testing the SFC type.
To interconnect an SFC instance with basic control, an interface must be created
for the SFC type. At the interface of the SFC type, you can
• add new I/Os directly or
• create the required I/Os technologically as characteristics of the SFC type.
You can, of course, create and test the sequential control system step by step both
when using an SFC chart as well as with an SFC type (SFC instance).
Procedure
See also:
Procedure: Creating an SFC Chart, Section 1.2.1
Procedure: Creating an SFC Type, Section 1.2.2
Procedure: Creating an SFC Instance, Section 1.2.3
SFC für S7
1-6 A5E00345250-01
Basics of Sequential Control Systems
The order of the steps outlined below represents the procedure for configuring SFC
charts:
1. Create the project structure:
Create a project structure in the SIMATIC Manager in which you can configure
CFC/SFC charts.
See: "Creating the Project Structure", Section 1.3.2.
2. Specify the chart properties:
When you specify the chart properties, you can change the chart name and
add a comment.
See: "Adapting the Chart Properties", Section 2.5.1.
3. Adapt the operating parameters and runtime properties
By setting the operating parameters, you specify the behavior of the sequential
control system, such as the mode (manual, auto), step control mode
(T, C, T and C...) and other chart execution options (cyclic operation, time
monitoring, autostart, ...).
See: "Adapting the Chart Properties", Section 2.5.1.
The runtime properties of an SFC chart determine how the SFC chart is
included in the execution of the entire structure on the CPU (in the window of
the CFC runtime editor).
See: "Runtime Properties", Section 2.7.
4. Create sequencers:
The newly created SFC already contains a sequencer (RUN). You create
further sequencers with the context-sensitive menu (right mouse button) using
the tab of the current sequence or by copying sequencers from the templates
of the SFC Library.
See: "Creating the Sequencer Topology", Section 2.8.1.
5. Configure sequencer properties:
For each sequencer, you configure the start condition and, as an option, the
action for preprocessing and postprocessing and, if required, the OS comment.
See: "Configuring Multiple Sequencers", Section 2.8.2.
6. Create the topology of the sequencers:
The SFCs are used to configure sequential control systems by inserting the
steps and transitions for one or more sequencers and adding further elements
as necessary.
See: "Creating SFC Elements", Section 2.9.
7. Configure steps (in the Object Properties dialog):
Actions are formulated in the steps. The actions contain statements with which
the values of block inputs and of shared addresses can be changed or runtime
groups or other SFC charts can be activated and deactivated.
See: "Editing Object Properties: Steps", Section 2.11.2.
8. Configure transitions (in the Object Properties dialog):
Conditions are formulated in the transitions. The conditions read the values of
block I/Os, of shared addresses or, for example, the state (active/inactive) of
runtime groups or other SFC charts. When the conditions of a logic operation
are met, the following step becomes active during execution of the SFC and its
actions are executed. See: "Editing Object Properties: Transitions", Section
2.11.3.
SFC für S7
A5E00345250-01 1-7
Basics of Sequential Control Systems
9. Compile program:
During compilation, the CFC and SFC charts of the active chart folder are
converted to an executable user program (compile entire program).
See: "Compile", Section 2.12.1.
10. Download program:
After compilation, you can download the program to the target system
(CPU).See: "Download", Section 2.12.2.
11. Test the program:
After compiling and downloading, you can test the program in process mode or
in laboratory mode. Using the SFC test functions, you can run the sequential
control system in various operating modes and step control modes and monitor
and modify the values of addresses on the CPU. You can also influence the
most important operating modes (STOP, clear/reset, RUN, ...) on the CPU.
See: "Testing and Commissioning", Section 4.
Note:
Prior to compiling (point 9), you must interconnect the external view of the SFC
chart or the SFC instance (of the SFC type) for AUTO mode in the CFC chart.
See also: "What is the external view of an SFC chart", Section 1.4.4.
Tips:
• In the "SFC Library", you will find the "ChartStates" SFC chart in SFC Library >
Blocks+Templates > Templates. This already contains several sequencers for
state-oriented processing of the sequential control system. You can copy this
chart and use it as an example.
• For a first run through from creating to testing a sequential control system, you
can compile, download and test the SFC chart "ChartStates" (or a newly
created SFC chart) unchanged. The SFC chart is processed in MAN mode; in
other words, you can monitor and influence the processing of the SFC chart in
test mode with the available test functions.
• To stop the SFC chart from being processed "too quickly" in the automation
system, you can, when necessary, move the SFC chart in the run sequence,
for example to the "OB32" task. In the test settings (Debug menu >Test
Settings) in SFC, you can select a suitable monitoring cycle.
SFC für S7
1-8 A5E00345250-01
Basics of Sequential Control Systems
The order of the steps outlined below represents the procedure for configuring SFC
types:
1. Create the project structure:
Create a project structure in the SIMATIC Manager in which you can configure
CFC charts and SFCs.
See: "Creating the Project Structure", Section 1.3.2.
Note: You can create an SFC type not only in the project structure but also in a
library.
2. Create an SFC Type
In the Component view of the SIMATIC Manager, insert an SFC type as a new
object in the chart folder. The SFC type is entered in the block catalog of CFC.
See: "Creating an SFC type", Section 2.4.2.
Tip: In the "SFC Library", you will find the "TypeStates" SFC type in SFC
Library > Blocks+Templates > Templates. This already contains several
sequencers for state-oriented processing of the sequential control system. You
will also find the "TypeCtrlStrategy" SFC type containing control strategy-
oriented processing of the sequential control system. You can copy these
templates and adapt them to your own purposes.
Adapt SFC properties
You can modify the general properties (name, author, family, FB number,
comment), adapt the operating parameters and change the version.
By setting the operating parameters, you specify the behavior of the sequential
control system, such as the mode (manual, auto), step control mode (T, C, T
and C...) and other chart execution options (cyclic operation, time monitoring,
autostart, ...).
See: "Adapting the Type Properties", Section 2.5.2.
Create the interface
The SFC type already has a standard interface that must normally be extended
for the interconnections of SFC instances with basic control.
See: "Using the Characteristics Editor and the Interface Editor", Section 2.2.3.
For more detailed information, refer to the SFC online help topics:
The standard interface of the SFC type
Interface expansions "Inputs/Outputs"
Interface expansions "Characteristics"
3. Create sequencers:
First open the SFC type. The newly created SFC already contains a sequencer
(RUN). You create further sequencers with the context-sensitive menu (right
mouse button) using the tab of the current sequence or by copying sequencers
from the templates of the SFC Library.
See: "Creating the Sequencer Topology", Section 2.8.1.
SFC für S7
A5E00345250-01 1-9
Basics of Sequential Control Systems
SFC für S7
1-10 A5E00345250-01
Basics of Sequential Control Systems
The order of the steps outlined below represents the procedure for configuring SFC
instances:
1. Open the CFC chart
Open the CFC chart in which you want to interconnect an SFC instance with
the blocks of basic control.
From the block catalog of CFC or from a library, place the SFC type in the
chart to create an SFC instance.
See: "The SFC Instance", Section 2.3.
2. Specify the SFC instance properties
In CFC, you can change the general properties (name, comment) in the object
properties of the SFC instance.
See: "Adapting the Instance Properties", Section 2.5.3.
3. Adapt operating parameters and options of the instance
In CFC, open the SFC instance and in the Properties dialog, adapt the
operating parameters that decide how the instance executes on the CPU.
As an option, you can decide which of the control strategies provided by the
SFC type should be used for the SFC instance.
See: "Adapting the Instance Properties", Section 2.5.3.
4. Assign parameters and interconnect the SFC instance
You make the parameter setting for the I/Os of the SFC instance in CFC using
the Object Properties or in SFC using the Interface Editor "Inputs/Outputs".
In CFC, you interconnect the I/Os of the SFC instance with the I/Os of the CFC
blocks or with shared addresses or you create textual interconnections.
5. Compile and download program:
When you compile the current chart folder, an executable user program is
generated (entire program) that you can then download to the CPU.
See: "Compiling and Downloading", Section 2.12.
6. Test the program:
After compiling and downloading, you can test the program in process mode or
in laboratory mode. Using the test functions, you can run the sequential control
system in various operating modes and step control modes and monitor and
modify the values of addresses on the CPU. You can also influence the most
important operating modes (STOP, RUN, clear/reset, ...) on the CPU.
See: "Testing and Commissioning", Section 4.
SFC für S7
A5E00345250-01 1-11
Basics of Sequential Control Systems
SIMATIC Manager
PH IEA PO
WinCC
STEP 7
PCS 7 CP OS
U
Fig. 1-3 : SFC in the STEP 7 / PCS 7 Environment
Key:
PH (plant hierarchy), IEA (Import/Export Assistant) and PO (process object view)
are components of the Process Control System (PCS 7) and expand the SIMATIC
Manager. WinCC is the operator control and monitoring system in PCS 7 (here
with the optional package for SFC Visualization).
The plant hierarchy (PH) allows charts to be arranged and managed not only from
the point of view of running them on a CPU, but also according to technological or
plant criteria (for example an SFC chart for device control, group control, or unit
control).
If the SFC chart was assigned to a plant hierarchy folder, the path of the plant
hierarchy is added to the chart name. You can use the naming scheme of your
plant as the criteria for arranging charts in the project.
For more detailed information on the plant hierarchy, refer to the online help of the
PH.
SFC für S7
1-12 A5E00345250-01
Basics of Sequential Control Systems
SFC für S7
A5E00345250-01 1-13
Basics of Sequential Control Systems
1.4 SFC Chart, SFC Type, SFC Instance and External View
Overview
Below, you will see detailed information on the usage and functionality of an SFC
chart, SFC type, SFC instance, and the external view of the SFC chart.
An SFC chart is a sequential control system that normally controls a larger subarea
of a plant and is only used once since the same control task does not occur again
in the plant.
The SFC chart has a series of properties, contains a standardized interface for
user program or user control of the SFC and allows the configuration of up to 8
sequencers with which the control function is formulated ("gray sequencer"). The
sequential control system accesses the blocks and signals of basic control directly
and is therefore not reusable.
SFC CFC
The properties of the SFC chart include name, author and comment as descriptive
data and the operating parameters for the CPU that decide the execution (for
example mode, step control mode, execution options).
See also: "How an SFC Executes", Section 3.2.
You can also decide whether or not the SFC chart can be controlled and monitored
on the OS (requires the optional package "SFC Visualization" on the OS). As
further properties, you can configure the message properties and the footer data of
the SFC chart.
The standard interface of the SFC chart includes the necessary I/Os for the user
program to control the SFC chart in AUTO mode or for the user to control and
monitor the chart in MAN mode. The control of the SFC chart in AUTO mode is
configured in the external view of the SFC chart.
See also: "What is the external view of the SFC chart?", Section 1.4.4.
You will find detailed information on the standard interface of the SFC chart in the
online help of SFC in the topic: "The Standard Interface of the SFC Chart".
SFC für S7
1-14 A5E00345250-01
Basics of Sequential Control Systems
SFC für S7
A5E00345250-01 1-15
Basics of Sequential Control Systems
SFC type
CFC 1 + SFC instance1
The properties of the SFC type and SFC instance include the name and comment
as descriptive data and the SFC type also has the properties author, version and
family and FB number as information for the compilation. Both for the SFC type
and the SFC instance, you can specify the operating parameters for the CPU that
determine how the instance executes on the CPU (for example mode, step control
mode, execution options).
You can also set further options and specify whether the SFC type and SFC
instance are relevant for SIMATIC BATCH and which of the defined control
strategies will be released for use with the SFC type or SFC instance. As further
properties, you can configure the message properties and the footer data of the
SFC type and SFC instance.
SFC für S7
1-16 A5E00345250-01
Basics of Sequential Control Systems
SFC types and SFC instances can be made available on the OS (default: Yes), so
that the SFC instances can be controlled and monitored there with the "SFC
Visualization" optional package. If you do not want SFC instances to be available
on the OS, you must remove the "OCM possible" property from the instance.
The standard interface of the SFC type includes the necessary I/Os for the user
program to control an SFC instance in AUTO mode or for the user to control and
monitor the instance in MAN mode.
You will find detailed information on the standard interface of the SFC type in the
online help of SFC in the topic: "The Standard Interface of the SFC Type".
To interconnect an SFC instance with basic control, the interface must normally be
expanded in the SFC type. You can do this by adding new I/Os to the interface of
the SFC type directly or can create the required I/Os technologically as
characteristics of the SFC type. The latter should be the preferred method. See
also: "Using the Characteristics Editor and the Interface Editor", Section 2.2.3 and
"Configuring with the Characteristics Editor", Section 2.2.4.
The actual sequential control system is formulated by the sequencers. See also
"What is a sequencer?", Section 1.5.1.
To configure the sequential control system, you must know the mechanisms for
processing an SFC and its sequencers on the CPU.
See also: "How an SFC Executes", Section 3.2 and "The Behavior of a Sequential
Control System", Section 3.3.
SFC für S7
A5E00345250-01 1-17
Basics of Sequential Control Systems
Display
The external view of the SFC chart represents the SFC chart in a CFC chart as a
block; in other words, with its interface. To distinguish it from CFC blocks and
hierarchical charts, the external view has the "SFC chart" icon in the header.
Purpose
In the external view, the interface of the SFC chart can have parameters set and
can be interconnected for the AUTO mode so that the status of the SFC chart and
the control signals derived from it can be obtained for the SFC chart. This allows
the processing of the SFC chart to be influenced by the user program. If the SFC
chart is used in MAN mode, only the I/Os that are also processed in MAN mode
are of significance in the external view.
For a description of the interface of the SFC chart, refer to the online help of SFC.
SFC für S7
1-18 A5E00345250-01
Basics of Sequential Control Systems
Interconnection
You can assign textual interconnections to the I/Os and/or interconnect them with
compatible I/Os of other objects or with shared addresses. All interconnections are
made using the sheet bar; in other words, you cannot place any objects (blocks
etc.) in this window.
Properties
You can display the object properties for the entire interface (double-click in the
header of the external view) or for the individual I/Os (double-click on an
interconnection).
If you double-click in the box of the runtime properties, the window for the run
sequence opens.
SFC für S7
A5E00345250-01 1-19
Basics of Sequential Control Systems
SFC für S7
1-20 A5E00345250-01
Basics of Sequential Control Systems
Resources
When programming and setting parameters for steps, transitions, start condition
and pre- and postprocessing in SFCs, you can access the interface of the SFC,
CFC block I/Os, runtime groups, other SFCs, and all shared addresses of the user
program. With the textual interconnections, you can also access objects that do not
yet exist. When you configure steps and transitions in SFC types, it is only possible
to use its interface I/Os alongside the textual interconnections.
SFC für S7
A5E00345250-01 1-21
Basics of Sequential Control Systems
Screen Display
• All the elements of an SFC, including the links are displayed in white with black
print in the unselected and unedited state.
• Selected elements are displayed in blue.
• Edited steps or transitions (whose object properties have been changed) are
displayed in gray with black print.
Note:
The colors named here are the default settings, some of which can be modified
(refer to the SFC online help).
SFC für S7
1-22 A5E00345250-01
Basics of Sequential Control Systems
START Comment
Initial step
The start step is activated and the start of the sequencer and the corresponding
actions are executed depending on the status of the successor transition. The final
step does not have a successor transition; all actions are processed exactly once.
All other steps apart from the initial and final steps are normal steps.
The initial step and final step can neither be copied, cut, nor deleted. This makes
sure that there is always one initial and one final step in a sequencer.
SFC für S7
A5E00345250-01 1-23
Basics of Sequential Control Systems
Name Comment
SFC für S7
1-24 A5E00345250-01
Basics of Sequential Control Systems
SFC für S7
A5E00345250-01 1-25
Basics of Sequential Control Systems
Sequence path
Successor
transition
Fig. 1-8 : Example of a Simultaneous Sequence with Four Sequence Paths
SFC für S7
1-26 A5E00345250-01
Basics of Sequential Control Systems
Sequence path
Successor
step
Fig. 1-9 : Example of an Alternative Sequence with Four Sequence Paths
SFC für S7
A5E00345250-01 1-27
Basics of Sequential Control Systems
Return path
Sequence
Successor
transition
The transition of the return path is processed after the successor transition.
If the successor transition and the return path transition are true at the same time,
the step (or simultaneous sequence) following the successor transition is executed.
Note:
Return paths out of or into simultaneous or alternative sequences are not possible.
SFC für S7
1-28 A5E00345250-01
Basics of Sequential Control Systems
Jump
Jump target
S7 S8 ???
T4
Successor
transition
A jump always leads immediately out of the sequence following a step (origin of the
jump). Several jumps are also possible.
A jump consists of an initiating transition and an arrow specifying the jump target.
The name of the step to which control is passed if the transition is true is specified
as the name of the step or ???, if the jump destination is as yet unknown.
The transition of the jump is processed after the successor transition.
If the successor transition one or more jump transitions are true at the same time,
the step (or simultaneous sequence) following the successor transition is executed.
The origin and target of a jump must always be a step.
Note:
With jumps into or out of a sequence path of a simultaneous sequence, consider
the consequences for the program execution on the CPU.
For more detailed information, refer to Section 2.9.5, "Creating a Jump".
SFC für S7
A5E00345250-01 1-29
Basics of Sequential Control Systems
SFC für S7
1-30 A5E00345250-01
2 Working with the SFC Editor
Introduction
With the SFC editor, you can create sequential control systems graphically and
specify the actions and step control conditions. From beginning (creating the chart
or type) to end (compiling and downloading to the CPU), the editor provides all the
functions required.
How to use the editor is described in this chapter.
The SFC chart has an interface that is created when the SFC chart is generated
and includes the standard interface derived from the SFC chart template (block
@SFC_RTS). This is required to provide SFC system functionality (operating
modes, operating states, step control modes, etc.) at the interface of the SFC
chart.
The elements of the standard interface cannot be moved or deleted and no new
elements can be added. The initial value, comment, and the attributes can be
modified.
During configuration, only the interface I/Os and any required process signals can
be used to formulate step assignments or the transition and start conditions. Here,
textual interconnections are also possible.
The SFC chart is therefore not self-contained and can only be used once. To use a
chart more than once, the SFC chart must be copied and completely adapted to
the "new environment" since the process signals must normally be replaced by
others.
See also: Procedure: Creating an SFC Chart, Section 1.2.1
SFC für S7
A5E00345250-01 2-1
Working with the SFC Editor
SFC für S7
2-2 A5E00345250-01
Working with the SFC Editor
The SFC type has an interface analogous to the SFC chart. It is created when an
SFC type is generated and already contains the SFC type standard interface,
derived from the SFC type template "@SFC_TYPETEMPLATE" (FB247). The
standard interface is required to provide SFC system functionality (operating
modes, operating states, step control modes, etc.) at the interface of the SFC type.
Interface Expansions
You can add further I/Os to the interface using the interface editor and add
characteristics in the Characteristics editor. The elements of the characteristics
cannot be moved or deleted and no new elements can be added.
Elements created explicitly can be manipulated as required.
Notes
• SFC types cannot be assigned to a hierarchy folder in the plant view since they
themselves are not relevant to execution (from the perspective of the process
to be automated).
• An SFC type does not have any runtime properties, since it is not relevant to
execution of the program. An SFC type cannot be installed in the run
sequence.
SFC für S7
A5E00345250-01 2-3
Working with the SFC Editor
There are two possible ways of creating and modifying an SFC type:
• Creating and modifying in a library has the advantage that the master for
the SFC type is always in the library and that the test project can still run until a
new version of the SFC type is adopted.
• Creating and modifying in a project has the advantage that every change to
the SFC type can be checked immediately since you are working directly with
the master.
Note:
There are predefined sequencer templates available in the "SFC Library" (SIMATIC
Manager). You can copy these templates and adapt them to your own purposes.
SFC für S7
2-4 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-5
Working with the SFC Editor
Note:
Individual I/Os can be defined in the Interface editor. These are available in
addition to the I/Os defined in the Characteristics editor. These I/Os are unknown
in the Characteristics editor and cannot be manipulated in it.
Setpoints, for example, are created and assigned values during the definition of
characteristics. From this definition, the Characteristics editor generates the
required I/Os that are displayed in the Interface editor after it is opened and that
can be used to configure the sequence logic. The I/Os generated by the
Characteristics editor cannot be modified in the Interface editor (except for system
attributes, initial value, comment), in other words, the Characteristics editor is the
master in terms of these I/Os.
Grouping of I/Os is only possible using the Characteristics editor. These groups are
taken into account during compilation in the applicable validations, status and
message processing. Visualization/operator control on an OS station (for example
of setpoints) using the SFC type faceplate is also only possible if the
Characteristics editor is used.
SFC für S7
2-6 A5E00345250-01
Working with the SFC Editor
Characteristic Meaning
Control Control strategies are used for the structuring of an SFC type as required for process
strategies control. With the Characteristics editor, you can define control strategies so that they
can be used when configuring the sequencers (for example Heat, Cool, ...). The
control strategy can be set by the operator or by a higher-level controller (for example
SIMATIC BATCH). Control strategies are optional.
Setpoints Setpoints control the SFC type or are used by it to control underlying automation
functions. Setpoints can be set by the operator or by a higher-level controller (for
example SIMATIC BATCH). A setpoint is assigned to the control strategies that exist
when it is created. You can change the assignment individually for each control
strategy.
Process values Process values control the SFC type based on process signals (for example, the
value for the fill level).
Control values Control values are used by the SFC type to control external logic.
Parameters Parameters modify the behavior of the SFC type. For example, parameters can be
used to select alternative sequences or to configure start conditions.
Bit memory Bit memory is local data memory of the SFC instances belonging to the SFC type.
Here, data can be stored temporarily and reused later. The data is retained until it is
overwritten or deleted.
Timers Timer objects are used to configure time-driven sequences in the SFC type. These
can be local to a step or related to steps and sequencers. Timed routines are started
in steps, stopped, and the elapsed time queried in transitions or start conditions.
Timed routines can be varied with different modes (pulse, extended pulse, on delay,
retentive on delay, off delay).
Note texts Note texts are used to display information relating to execution that may require
action on the part of the operator. A note text is displayed on the OS in the SFC
faceplate and can be acknowledged there.
Block contacts Block contacts represent blocks of the basic control. When a block contact is created,
I/Os of the block to be represented are created in the interface of the SFC type.
These can then be used when configuring the SFC type instead of the block that will
later be interconnected with an SFC instance.
Position texts Position texts are used to display the current progress in execution or the status of
execution of the SFC. A position text is displayed on the OS in the SFC faceplate.
SFC für S7
A5E00345250-01 2-7
Working with the SFC Editor
To define the interface I/Os or I/O elements of a characteristic, there are predefined
descriptions of the required I/Os.
The interface I/Os or I/O elements for the control strategies, note texts, and
position texts characteristics are already present in the standard interface of an
SFC type.
For the other characteristics, the names of the individual I/O elements are made up
of the I/O names configured in the characteristic and a fixed part.
For more detailed information on the characteristics, refer to the SFC online help:
• The Standard Interface of the SFC Type
• Interface Expansions "Characteristics"
• Interface Parameter Assignments "Characteristics"
SFC für S7
2-8 A5E00345250-01
Working with the SFC Editor
Note:
If the system attribute "S7_contact" is added or modified later at the I/Os of a
block type that is used as a block contact in the SFC type, this has no effect on
the block I/Os of the SFC type.
If you want these changes to be adopted for the SFC type, note the following:
• The modified block type must be imported into the CFC (menu command
"Options > Block Types"). This also updates all block instances.
• In SFC, you must update the block contacts with the menu command "Options
> Block Contacts". Changes to the interface of the SFC type and all SFC
instances then take effect.
If different groups with relevant I/Os are required for a block type, this can be
achieved as follows:
• The set of all required I/Os is defined for the block type or
• the block type is copied or an empty block is created with the block interface of
the original block reduced to the relevant I/Os. The required I/Os are assigned
"S7_contact=true" in the block type. The resulting block contact (the SFC
instance) can later be interconnected with an instance of a different "suitable"
block type.
By defining an instance of the "block contact" characteristic in the Characteristics
editor, the selected block I/Os are then created in the SFC type. The I/Os of the
type IN and OUT are created as their opposites in the SFC type. The IN_OUT I/Os
of the block type are created as OUT in the SFC type. This allows a concrete CFC
instance of the block type to be interconnected with the corresponding I/Os of an
SFC instance. An instance of the "block contact" characteristic is therefore always
assigned to exactly one block type. Which block type this is, is entered in the Block
column in the right-hand pane.
This allows the independent configuration, commissioning, and visualization of
blocks of basic control. At the same time, SFC types can be configured on the
basis of block contacts and later interconnected with the blocks of basic control.
SFC für S7
A5E00345250-01 2-9
Working with the SFC Editor
Characteristics Contr Set- Pro- Control Para- Bit Timer Posi Note Block
→ ol point cess Values meter Memor s tion Texts Conta
Strate s Valu s y Texts cts
Attributes gy es
↓
Name x x x x x x x x x x
Number x x x
Data type x x x x x
I/O name x x x x x x x
Comment x x x x x x x x x x
<Setpoint> x
Initial value x x x x x x
Text length x x x x x
Precision x x x x x
Unit x x x x
Low limit x
High limit x
Text0 x
Text1 x
Enumeration x
Archive x
Test x
Setpoint ID x
Process value ID x
Material x
BATCH ID x
Block x
SFC für S7
2-10 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-11
Working with the SFC Editor
Comment
The comment can be used to describe the characteristic in greater detail. The
comment can be a maximum of 80 characters long and can contain any special
characters.
<Setpoint>
Setpoint selection for the "Control strategy" characteristic. Name of each created
setpoint is displayed as a column. This allows the required setpoint to be assigned
to the control strategy by selecting the corresponding column.
The assignment of setpoint to control strategy is stored in the "<setpoint-I/O
name>_CS" I/O. The coding is the same as with the SELCS I/O; in other words
control strategy <no> is assigned bit <no-1>. This bit is set when the setpoint is
assigned to the control strategy; in other words, it is required to run the control
strategy.
Initial value
The initial value corresponds to the value of the characteristic when no current
value is available.
Text length
With the STRING data type, the text length decides the maximum length of the
string (number of characters: 1 through 254).
Precision
With the REAL, PI, and PO data types, the precision decides the number of
decimal places to be displayed (0 through 7).
Unit
With the INT, DINT, REAL, PI, and PO data types, a unit can be defined. This is
stored as the system attribute "S7_unit" on the interface I/Os.
The units are included as a basic set in the ES data management and can be
added to or modified in the SIMATIC Manager as "Shared declarations".
Low limit
With the INT, DINT, REAL, PI, and PO data types, a low limit can be defined for the
range of values. This is stored in the "<I/O name>_LL" I/O.
High limit
With the INT, DINT, REAL, PI, and PO data types, an upper limit can be defined for
the range of values. This is stored in the "<I/O name>_HL" I/O.
Text0
With the BOOL data type, this specifies the value identifier for the value FALSE.
This is stored as the system attribute "S7_string_0" on the interface I/Os.
SFC für S7
2-12 A5E00345250-01
Working with the SFC Editor
Text1
With the BOOL data type, this specifies the value identifier for the value TRUE.
This is stored as the system attribute "S7_string_1" on the interface I/Os.
Enumeration
With the BOOL, INT and DINT data types, an enumeration can be assigned here.
This is stored as the system attribute "S7_enum" on the interface I/Os.
Enumerations are defined as "Shared declarations" in the SIMATIC Manager. The
name of this enumeration is then entered here (from a drop-down list box) as an
attribute. The enumeration is then available for operator control and monitoring of
SFC instances in SIMATIC BATCH and in the SFC faceplates.
Note: If "S7_enum" is used, the "S7_string_0" and "S7_string_1" system attributes
are ignored.
Archive
From the drop-down list box, you can select whether the current value of the "<I/O
name>_AO" output is archived, not archived, or entered in the long-term archive.
To allow archiving, an archive tag is created in WinCC when you compile the OS in
the SIMATIC Manager so that the value is entered in the archive.
Test
This selects the characteristic intended for the manual test (manufacturing
instruction) in the batch report in SIMATIC BATCH.
Setpoint ID / Process value ID
The ID number specifies whether the characteristic value is saved for logging. If the
ID is greater than 0, the setpoint or process value is also made available for an
external program. By assigning unique ID numbers to the characteristic values, the
processing is made easier in an external application. ID numbers from 0 through
32767 can be entered.
Material
With the PI and PO data types, a material identifier can be entered here.
Batch ID
With the PI and PO data types, a numeric batch identifier can be entered here.
Block
This attribute contains the name of the block type represented by the block contact.
When generating the interface I/Os, the interface I/Os for which the system
attribute "S7_contact=true" is set are adopted in the SFC type from the block type.
The names of the interface I/Os of the block type are appended to the I/O name of
the block contact as postfixes. Inputs and inouts of the block type become outputs
of the SFC type and outputs of the block type become inputs of the SFC type.
SFC für S7
A5E00345250-01 2-13
Working with the SFC Editor
Compared with SFC types, the configuration of SFC instances in SFC is limited.
The interface and the sequencers cannot be changed in the SFC instance, since
they are identical in all instances of the SFC type. The parameters (initial value,
comment, and system attribute) of the interface I/Os, on the other hand, can be
modified for each specific instance.
SFC für S7
2-14 A5E00345250-01
Working with the SFC Editor
• SIMATIC Manager
You create an SFC chart with the SIMATIC Manager by opening the chart
folder in the component view or the hierarchy folder of the project in the
plant view and inserting the chart there ("Insert > S7 Software > SFC" or
"Insert > Technological Objects > SFC"). The chart is given a standard name
by the system, for example SFC(1) that you can change. The name must be
unique on the CPU. This is checked by the system.
• SFC Editor
Open the “New" dialog box in SFC using the menu command “SFC > New...".
Select the project and the chart folder in the component view.
In the plant view or the process object view, open the hierarchy folder of the
project in which you want to create the chart.
In the "Object type" box, select "SFC" from the drop-down list box and enter a
chart name in the "Object name" box. The name must be unique in the chart
folder; this is checked by the system. When you click “OK", a new window is
opened with the SFC chart (initial status).
SFC für S7
A5E00345250-01 2-15
Working with the SFC Editor
You create an SFC instance by dragging the SFC type from the block catalog or
from a library to the CFC chart in CFC.
The SFC types in the chart folder are displayed in the CFC block catalog (in "All
blocks" and in the folder of the family if they are assigned to a family, otherwise in
the "Other blocks" folder).
You can also insert SFC types in the CFC chart from the libraries (for example SFC
library, master data library, ... ).
The SFC instance is represented like a CFC instance block. If there is not enough
space to position the SFC instance; in other words, it overlaps one or more existing
objects, it is displayed as an "overlapping block" (light gray and without visible
I/Os). After moving them to a free position in the chart, the overlapping blocks are
displayed as "normal" blocks again.
You can assign parameter values to the SFC instance in the CFC chart and
interconnect it.
• SIMATIC Manager:
You can open a chart or type using the SIMATIC Manager by double-clicking
the icon in the chart folder of the S7 program in your project. The SFC editor is
then started and the selected chart or type is opened.
• SFC Editor:
In the "Open" dialog of the SFC editor, you select "SFC" or "SFC type" from the
drop-down list box in the "Object type" box and then select the required object.
In the “SFC" menu of the SFC editor, you will see the last SFCs to be edited
shown as menu entries. If you select one of these names, the relevant chart /
type / instance is opened, or if the SFC is already open, displayed in the
foreground.
You can open SFC instances in the CFC chart. The SFC is started with the
topology of the SFC type. This topology can only be viewed and cannot be
modified. The properties of the SFC instance and parameters and properties of
interface I/Os can be modified.
SFC für S7
2-16 A5E00345250-01
Working with the SFC Editor
SFC types are copied in the SIMATIC Manager. The runtime objects belonging to
the SFC type are also copied. If the SFC type is not up to date (time stamp of the
FB is older than the time stamp of the SFC type), a message will be displayed. If
the SFC type already exists at the destination (SFC type with the same name), this
is overwritten following a prompt for confirmation and any properties that differ from
the previous type are passed on to the SFC instances.
SFC types are moved in the SIMATIC Manager. SFC types can only be moved
when there are no SFC instances of the SFC type in the source. The runtime
objects belonging to the SFC type are also moved. If the SFC type already exists at
the destination (SFC type with the same name), this is overwritten following a
prompt for confirmation and any differences compared with the previous type are
passed on to the SFC instances.
SFC instances can be copied or moved within the CFC chart, between CFC charts,
or indirectly by copying/moving the CFC chart in the SIMATIC Manager. The
runtime objects belonging to the SFC instance are also copied/moved.
If you copy an SFC instance within a CFC chart or between CFC charts of the
same chart folder or copy a CFC chart within a chart folder, the SFC instance is
also copied. The runtime objects belonging to the SFC instance are also copied. If
you copy an SFC instance between CFC charts from different chart folders or copy
a CFC chart to a different chart folder, the SFC type is also copied.
If you move an SFC instance within a CFC chart, only the position of the SFC
instance changes. If you move an SFC instance between CFC charts of the same
chart folder, the SFC instance is moved. The runtime objects belonging to the SFC
instance are retained. If you move an SFC instance between CFC charts from
different chart folders or move a CFC chart to a different chart folder, the SFC type
is also copied or moved.
SFC für S7
A5E00345250-01 2-17
Working with the SFC Editor
You delete SFC charts and SFC types only in the SIMATIC Manager.
• You delete SFC charts in the same way as other objects (hierarchy folders, OS
pictures, ...) by selecting the object and pressing the DEL key.
• SFC types can only be deleted when no SFC instances of the SFC type exist.
If instances of an SFC type exist, a message to this effect is displayed.
The runtime objects belonging to the SFC type are also deleted.
You cannot delete charts or types in the SFC editor.
You delete SFC instances in the CFC chart or indirectly by deleting the CFC chart
in the SIMATIC Manager. The runtime objects belonging to the SFC instance are
also deleted.
SFC für S7
2-18 A5E00345250-01
Working with the SFC Editor
You can modify the chart properties for the active chart. With the menu command
“SFC > Properties", you open the properties dialog box.
You can modify the chart properties in the following tabs.
• General
This tab is used to enter or modify the chart name, the author and the
comment.
• Operating parameters CPU
Here you can
- set the defaults for the initial state of the chart. These are: "Step control
mode", "Operating mode", "Instruction output", "Cyclic execution" and
"Time monitoring".
- set the options for starting the chart: "Autostart" and "Use default operating
parameters when SFC starts".
• OS
If the “Transfer chart to OS for visualization" option is set, the SFC chart is
transferred to the OS automatically with the next OS compilation.
• Version
In the "Version:" box, you can see the current version of the chart. When you
create a chart, Version 0.1 is entered here. To identify working versions, you
can change this version number (0.0 through 15.15 are permitted).
With "Data version", you obtain information on the software version used to
create the chart.
For a description of the operating parameters, refer to Section 3.2, "How the SFC
Runs", and the SFC online help.
SFC für S7
A5E00345250-01 2-19
Working with the SFC Editor
You can display and modify the properties for the active SFC type. The "SFC >
Properties..." menu command opens a dialog box. You can modify the properties in
the following three tabs.
• General
This tab includes the entry or modification of the type name, the author, the
version, the family, the FB number, and the comment.
• Operating Parameters CPU
In this tab, you can set the defaults for the initial status of the SFC instances
created from this type. These are: "Step control mode", "Operating mode",
"Instruction output", "Cyclic operation" and "Time monitoring" and the options
for starting the SFC instance: "Autostart" and "Use default operating
parameters when SFC starts".
• Options
In this tab, you can make the classification of the SFC type for SIMATIC
BATCH:
- The category
"None" Æ there is no classification
"EOP" Æ the SFC type is classified as an "operation type"
"EPH" Æ the SFC type is classified as a "phase type".
- Allow operator instructions on the OS; in other words, allow input of values
in the operator dialog.
- Control strategy selection
This field lists all the control strategies configured for the SFC type
(maximum 32).
By suitable selection of the selection criteria, you can decide which control
strategies of the SFC type are enabled as default in the SFC instances.
This applies to all SFC instances that already exist in the project - as long
as the default value has not been changed in the instance - and for all the
SFC instances yet to be generated. The control strategy selection can be
modified for the individual instances.
• Version
In the "Version:" box, you can see the current version of the SFC type. When
you create an SFC type, Version 0.1 is entered here. To identify working
versions, you can change this version number (0.0 through 15.15 are
permitted).
With "Data version", you obtain information on the software version used to
create the SFC type.
SFC für S7
2-20 A5E00345250-01
Working with the SFC Editor
You can display and modify the properties for the SFC instance opened in the
CFC. The "SFC > Properties..." menu command opens a dialog box with the three
following tabs:
• General
This tab is used to enter or modify the instance name and the comment. All
other properties (see SFC type) can only be read and not modified.
• Operating Parameters CPU
In this tab, you can change the SFC instance operating parameters (see SFC
Type).
• Options
In this tab, you can view the options set for the SFC type for SIMATIC BATCH
and change some of them:
- The category (cannot be changed)
"None" Æ there is no classification
"EOP" Æ the SFC type is classified as an "operation type"
"EPH" Æ the SFC type is classified as a "phase type".
- Allow operator instructions on the OS (cannot be changed)
If the option is set, the entry of values in the operator dialog is permitted.
- Control strategy selection
This field lists all the control strategies configured for the SFC type
(maximum 32).
The control strategies adopted from the SFC type are shown as selected.
You can change the selection for each SFC instance; in other words, you
can select a new control strategy or deselect one that was previously
selected.
Note: If you change the control strategy selection for an SFC instance, all
later changes to the control strategy selection in the SFC type are no
longer adopted automatically for this SFC instance.
• Version
In the "Version:" box, you always see the version of the associated SFC type.
The version cannot be changed in the SFC instance.
With "Data version", you obtain information on the software version used to
create the SFC instance.
SFC für S7
A5E00345250-01 2-21
Working with the SFC Editor
Operator Prompt
The operator prompt is a message that does not require acknowledgment and that
is signaled in an SFC chart with the NOTIFY message block and in an SFC type
with NOTIFY_8P.
You will find a table of the I/Os used for messages in the interface in the SFC
online help in the topic "Messages".
Note:
When configuring messages, please remember that the messages of ALARM_8P
must only be assigned message classes with mandatory acknowledgment.
SFC für S7
2-22 A5E00345250-01
Working with the SFC Editor
with the menu command "Edit > Run Sequence..." or with the button in the
toolbar.
Note:
Installing an SFC in the same task or in several cyclic tasks is not permitted since
this can lead to an unpredictable response. Installation in tasks other than OB100
and in a cyclic task (for example OB32) is of no practical value since the
processing of the SFC is not intended there.
SFC für S7
A5E00345250-01 2-23
Working with the SFC Editor
SFC für S7
2-24 A5E00345250-01
Working with the SFC Editor
Prerequisites
Before you can configure sequential control systems, you must first create the
required basic automation functions with CFC and/or STEP 7 tools. At the same
time, the AS blocks to be used in the SFC charts or SFC instances are also
inserted. Automation functions that do not yet exist can be added later and then
used in an SFC.
Procedure
When you configure a sequential control system (SFC chart or SFC type),
• create the sequence topology with the required number of sequencers and the
required arrangement of SFC elements.
• configure the start condition, the preprocessing , and the postprocessing in the
Properties dialog of the sequencers.
• configure the steps and transitions, the actions and conditions in the Properties
dialog of the steps and transitions. These procedures are dealt with in greater
detail in the following topics.
Color Settings
The objects of a chart are displayed in different colors depending on their current
state. The elements of an unselected sequential control system, for example, are
displayed in “white" (parameters not set) or “gray" (parameters set) and in “blue"
when they are selected.
With the “Options > Customize > Colors..." menu command, you can select your
own color scheme for certain elements.
Note:
If CFC blocks are deleted that access the SFC, these accesses will be set up as
textual interconnections (text of the address is marked in yellow). Textual
interconnections can be close (they become real interconnections) as soon as the
real interconnection partner exists again in the chart folder. You can exit this
explicitly with the menu command Options > Make Textual Interconnections or
in the compilation dialog by setting the check box "Make textual interconnections".
SFC für S7
A5E00345250-01 2-25
Working with the SFC Editor
Adding Elements
To add further elements to the SFC, select the icon of the required element in the
element bar.
The mouse pointer changes its appearance from an arrow to the selected icon with
a positioning crosshair. To insert the sequencer elements, position the cross and
the required point (the installation position is indicated by a green line) and left-
click. The inserted elements are selected and displayed in color.
Syntax Rules
The sequencer topology is formed by the sequences of steps and transitions. The
fundamental rule of the sequencer topology is that a step (S) must be followed by a
transition (T) and a transition must always be followed by a step (sequence: S-T-S
or T-S-T). The editor automatically adheres to the rules.
Example:
If you insert a simultaneous sequence in a sequencer following a transition and
before a step, a transition is created automatically before the step since the syntax
rules require a transition before and after a simultaneous sequence.
SFC für S7
2-26 A5E00345250-01
Working with the SFC Editor
An SFC can contain several sequencers that can be used for different applications.
By specifying different start conditions, you can arrange for a specific sequencer to
start when a particular event occurs. You can, for example, configure a separate
sequencer for every operating state (idle, active, error, ...) or for every control
strategy (heating, cooling, tempering, ...).
Note:
Predefined sequencers are already available for various standard scenarios.
These sequencer templates are available in the "SFC Library". You can copy
these templates and adapt them to your own purposes.
SFC für S7
A5E00345250-01 2-27
Working with the SFC Editor
Example 3:
Any process status can also be queried as the start condition. You interconnect it
with the external signal "LOCKERROR" (input of the SFC) Æ, the SFC changes to
the "Error" state if the error signal is applied. You also configure a sequencer for
handling the problem whose start condition is, for example
"<SFCName>.ERROR=Error AND <process status>=1".
Example 4:
As an alternative to example 3, error handling is also possible without a state
change. To achieve this, you configure a sequencer with the start condition
"<process status>=1" and assign it high priority. This sequencer always executes
when the problem occurs and the sequencer currently executing has a lower
priority than the sequencer for handling the problem. In this case, you do not
interconnect the process status with the "LOCKERROR" input otherwise this would
mean a change to the "Error" state.
Note: With a chart, the address "<SFCName>.I/O", and with a type only "I/O" is
specified.
Notes on Configuration
• You can insert a new sequencer consisting of an initial step, a transition, and a
final step with the menu commands "Insert > Sequence > Before Current
Sequence" or "Insert > Sequence > At End".
• You can copy sequencers and paste them again or move them to change their
order.
• The names of the steps and transitions must be unique within a sequencer; the
same names can be used in different sequencers.
• You can also configure an additional action for each sequencer. The action
consists of a part known as the preprocessing that executes after the start of
the sequencer in every cycle before the steps and transitions are processed,
and a part that executes after processing of the steps and transitions known as
the postprocessing. This, for example, allows you to make prior settings or
pass on the results of sequencer execution.
You configure both parts in the "Sequencer Properties" dialog box. The dialog
box provides the "Preprocessing" and "Postprocessing" tabs whose structure
corresponds to the processing phases of steps.
SFC für S7
2-28 A5E00345250-01
Working with the SFC Editor
TS sequence
ST sequence
If you move the mouse pointer to a permitted insertion point in the existing
sequence, you will see a horizontal green line.
By holding down the left mouse button and dragging the pointer vertically, you can
select the length of the sequence you are inserting. The current length that will be
inserted (number of ST/TS pairs) is displayed as a number at the insertion point.
SFC für S7
A5E00345250-01 2-29
Working with the SFC Editor
If you open a lasso (in the Edit mode) around the elements of a sequence path, the
enclosed elements become part of the left sequence path of the generated
simultaneous sequence.
T4
T4
S5 S5 S9
T5 T5
S6 S6
Lasso
T6
T6
You can add further sequence paths to a simultaneous sequence or delete paths
and also insert them in a different sequence. You can move a sequence path
within a simultaneous sequence or to any other position in the chart (except in the
return branch of a loop). If you delete the second last path, the remaining path is
simply integrated in the surrounding structure and the simultaneous sequence is
eliminated.
To add further sequence paths, simultaneous sequences, or alternative sequences
to a simultaneous sequence, change to the required insert mode and click the
mouse with the positioning cross located on the upper or lower double line.
If you move the mouse pointer to a permitted insertion point in the existing
sequencer, you will see a horizontal green line. Within the simultaneous sequence
(in the vicinity of the upper simultaneous divergence or lower simultaneous
convergence), the vertical green line indicates that you are inserting a further
sequence path. If, for example, you insert an alternative sequence beside a
sequence path, an extra step is created before and after the sequence to maintain
the correct syntax.
SFC für S7
2-30 A5E00345250-01
Working with the SFC Editor
If you open a lasso (in the insert mode) around the elements of a sequence path,
the enclosed elements become components of the left sequence path of the
generated alternative sequence (refer to the description “Creating a Simultaneous
Sequence").
You can add further sequence paths to an alternative sequence or delete paths
and also insert them in a different sequence. You can move sequence paths within
the alternative sequence or to any other position in the sequencer. If you delete the
second last path, the remaining path is simply integrated in the surrounding
structure and the alternative sequence is eliminated.
To add further sequence paths, simultaneous sequences, or alternative sequences
to an alternative sequence, change to the required insert mode and click the
mouse with the positioning crosshair located on the divergence/convergence line.
If you move the mouse pointer to a permitted insertion point in the existing
sequencer, you will see a horizontal green line.
Within the alternative sequence (in the vicinity of the upper divergence or lower
convergence beside the sequence path), the vertical green line indicates that you
are inserting a further sequence path. If, for example, you insert a simultaneous
sequence beside a sequence path, an extra transition is created before and after
the sequence to maintain the correct syntax.
SFC für S7
A5E00345250-01 2-31
Working with the SFC Editor
When you create a loop , a sequence path (that can consist of a single step)
and a return path with a transition are generated.
You can create loops around existing sequences. You select the beginning and
end of the loop by positioning the mouse pointer on the vertical link, holding down
the left mouse button and dragging vertically to the required position and releasing
the button. The syntax is maintained by adding whatever elements are necessary.
If, for example, you create a loop around a transition, the enclosed sequence then
consists of this transition and a step before and after it. Below the loop, a further
transition is added.
To move the loop, you can select it (including the elements enclosed within the
sequence in the loop) and drag it to any position on the vertical line of the
sequencer while holding down the left mouse button.
Notes
• Loops leading into or out of alternative or simultaneous sequences are not
permitted. Due to the block-oriented sequencer topography, only entire chart
elements, including alternative and simultaneous sequences, can exist within
a loop.
• The return path of a loop can and must contain only one transition.
SFC für S7
2-32 A5E00345250-01
Working with the SFC Editor
When you insert a jump , a transition is created with an arrow and information
about the destination of the jump.
???
To insert a jump, click on the vertical link of the sequence immediately below a
step. A simple click creates a jump with an undefined destination. The destination
is displayed as question marks (???).
If you require several jumps from one step, repeat the above procedure. The
sequence path with the jumps is extended by the number of jumps inserted.
When you insert the jump, you can also select the jump destination directly. Drag
the mouse from the point of origin of the jump directly to the destination step and
then release the mouse button. Instead of the question mark, the name of the step
is now entered as the jump destination.
Note:
If you use jumps into or out off a sequence of a simultaneous sequence, consider
the possible consequences for program execution on the CPU.
For more detailed information, refer to the SFC online help in the notes in the topic
"Creating a Jump".
Deleting a Jump
The jump is deleted if you select the jump transition and delete it.
If the jump destination is deleted, all the jumps to this step become undefined.
SFC für S7
A5E00345250-01 2-33
Working with the SFC Editor
After inserting a text object using the button in the toolbar or selecting the
"Insert > Text" menu command, an open text box is displayed in the window. The
text cursor is active and you can begin editing immediately. A line break is added
automatically at the right edge of the box. If you enter more text than can be
displayed in the box, the size of the box is not increased automatically and the text
is moved out of the visible area. You can make the entire text visible by increasing
the size of the box manually.
To change the size of a box, click on the box handles and drag with the mouse
until the required size is reached. If you change the width of the box, the length of
the text lines is automatically adapted. You can pick up the box using the handles
of the frame and move it to any position in the window.
When you open a text box, the cursor is positioned at the point in the text at which
you clicked with the mouse. You can exit the editing mode and close the text box
by clicking outside the text box with the mouse.
Note:
If elements of the sequence topology are covered by the text object, the text
object is displayed as a frame with a transparent surface (no content). The chart
elements below it remain visible.
SFC für S7
2-34 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-35
Working with the SFC Editor
You can open the sequencer properties with the "Edit > Sequencer Properties..."
menu command or with the mouse pointer on the sequencer name (tab at lower
edge of window) by right-clicking and selecting the "Sequencer Properties" menu
command. A dialog box is displayed in which you specify the properties or
formulate the actions and conditions. To edit the sequencer, the Properties dialog
is divided into the following tabs:
SFC für S7
2-36 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-37
Working with the SFC Editor
Formulating Actions
You enter the statements for actions in a formatted dialog. For each step, you can
formulate up to 50 statements per action. Ten of these are visible in the dialog box.
You can scroll the visible list with the scroll bar.
If you position the mouse pointer on an input box, the complete entry is displayed
as fast information including the data type and object type. Example:
3. DP666\Reactor1\Motor3\\CFC8.Ctrllr2.P_SEL [BOOL] CFC
A double backslash ( \\ ) is displayed between the path and the CFC name.
In unselected lines, you can use the “Copy/Paste Action" functions in the context-
sensitive menu to copy the statements of a complete action and paste them into
another action. Using this function, you can, for example, copy the statements from
the Initialization" action to the "Termination" action and then change the settings
"TRUE" to "FALSE".
You will find the formulation options in the online help for SFC.
Texts on a yellow background reference objects that do not yet or no longer
really exist (block I/Os, charts, runtime groups).
This reference is a textual interconnection that can be closed automatically during
compiling (option) or explicitly using the Options > Close Textual
Interconnection menu command if the interconnection partner actually exists. The
textual interconnection is displayed on a yellow background in the line of the
address. The same highlighting is used if a previously real reference becomes a
textual interconnection after deleting the interconnection partner.
Textual interconnections that cannot be closed are ignored during compilation. A
warning is entered in the log indicating which I/Os still have a textual
interconnection. One unclosed textual interconnection is also tolerated in a
download.
Note:
Interconnections cannot be set up unless the target of the interconnection is
unique; in other words, exists more than once with the same name. The
interconnection is then also displayed as a textual interconnection and cannot be
made. Example: The object name of an SFC is the same as the symbolic name of
a DB.
SFC für S7
2-38 A5E00345250-01
Working with the SFC Editor
Entering Addresses
Using the "Browse" dialog:
The ”Browse” dialog has four different tabs: "Plant view", "Component view",
"Runtime groups" and "Symbols". When you browse (for example through CFC
charts in the plant or component view), all the available objects of the chart folder
are found and displayed.
Using the "Filter" button, you can limit the list of I/Os; in other words, display only
those currently relevant at the present stage of configuration.
You can then select the chart you require and then the block and I/O. The dialog
box remains open until you close it explicitly with the "Close" button or you close
the "Object Properties" dialog.
SFC für S7
A5E00345250-01 2-39
Working with the SFC Editor
By editing:
When making textual entries, make sure that names are consistent. A symbol that
does not exist in the symbol list (or a referenced symbol that is subsequently
renamed) cannot be checked in the editor and is set up as a textual
interconnection.
In the addresses, you can enter CFC block I/Os whose block does not yet really
exist in the CFC chart. These instructions are displayed in the statement list on a
yellow background and are set up as textual interconnections.
Example: Turn SFC chart on and off
With the statement "<SFCchart>.INTONOFF := TRUE" an SFC chart is turned on.
With the statement "<SFCchart>.INTONOFF:= FALSE" an SFC chart is turned off;
in other words, its final step is processed before the chart is completed.
Note:
When you enter statements, they are checked so that correct syntactic and
semantic formulation is guaranteed. The program, for example, also checks
whether the data types of the logically combined addresses are compatible.
SFC für S7
2-40 A5E00345250-01
Working with the SFC Editor
Access to Structures
In the step properties, you can configure structure assignments. Structures,
substructures, or structure elements are possible according to the following syntax:
Structure: <I/O name>
Substructures: <I/O name>.[<Substructure>...]<Substructure>
Structure element: <I/O name>.[<Substructure>...]<Element>
You can enter this information directly in the statement lines or by using the
"Browse" dialog. You apply substructures or structure elements in the "Structure
Dialog".
You will find more detailed information on the use of structure access and the
structure dialog in the SFC online help in the topic "Access to structures".
SFC für S7
A5E00345250-01 2-41
Working with the SFC Editor
1
2
3 &
4
5
6 &
7
8 &
9
10
&
11
12 &
13
&
14
15 &
16
SFC für S7
2-42 A5E00345250-01
Working with the SFC Editor
As when selecting addresses for the steps, you can also enter the value identifiers
of the I/Os for the transitions.
The following applies to access to structures: In the transitions, it is only possible to
compare structure elements.
Texts on a yellow background reference objects that do not yet or no longer
really exist (block I/Os, charts, runtime groups).
This reference is a textual interconnection that can be closed automatically during
compiling (option) or explicitly using the Options > Close Textual
Interconnection menu command if the interconnection partner actually exists. The
textual interconnection is displayed on a yellow background in the line of the
address. The same highlighting is used if a previously real reference becomes a
textual interconnection after deleting the interconnection partner.
Textual interconnections that cannot be closed are ignored during compilation. A
warning is entered in the log indicating which I/Os still have a textual
interconnection. One unclosed textual interconnection is also tolerated in a
download.
Notes
• Interconnections cannot be set up unless the target of the interconnection is
unique; in other words, exists more than once with the same name. The
interconnection is then displayed as a textual interconnection and cannot be
made. Example: The object name of an SFC is the same as the symbolic
name of a DB.
• When you enter conditions, they are checked for consistency so that correct
syntactic and semantic formulation of the subexpression is guaranteed. The
program also checks whether the data types of the logically combined
addresses are compatible.
• The predefined three-stage logic is normally adequate. If you require more
complex formulations, you can create them as a CFC chart and enter the
results calculated in the chart as the address for transition conditions.
SFC für S7
A5E00345250-01 2-43
Working with the SFC Editor
• Unless you edit and modify the OS comment, the OS comment is adapted
automatically whenever the compare condition is changed. This automatic
updating also applies to renaming, copying, moving or deleting the referenced
CFC blocks.
• If you change the condition belonging to a comment text that you have edited,
this is not automatically adapted. In this case, a dialog box is opened telling
you that you should check the comment text. You can cancel the change in this
dialog box by clicking the “Cancel" button.
• You can initialize an individual OS comment in the SFC editor by deleting the
OS comment. The text from the compare condition is then used again as the
OS comment and from this time onwards is automatically adapted whenever
the condition is changed providing you do not edit the OS comment.
You can enter the original OS comment (text of the condition) again using the
“Use Default" context-sensitive menu command.
• You can edit the OS comments later. With the "Options > Edit OS
Comments..." menu command, you open a dialog in which you specify whether
you want the OS comment for the transitions to remain unchanged or want to
use all conditions. In this dialog, you can also specify whether the editing of the
OS comments applies to the entire chart folder, the current chart, or the
selected steps/transitions.
SFC für S7
2-44 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-45
Working with the SFC Editor
2.12.1 Compile
Compilation Settings
With the “Customize > Compilation..." command in the “Options" menu, you open a
dialog box in which you will see information about the resources used in
conjunction with compiling charts. Here, you can
• decide which warning limits will apply so that possible dangers are detected
before you download.
• decide which resources should remain unused during compilation of the charts
of the current chart folder.
• view the statistics showing how many resources (DBs, FCs) are available for
compiling and how many are already being used.
Compile
The "SFC > Compile..." menu command opens a dialog box in which you can
select one of the option buttons "Entire program" (all objects are compiled) or
"Changes only" (only the objects changed since the last compilation are compiled).
• Delete empty runtime groups option: If this option is set, the empty runtime
groups are deleted prior to compiling.
The empty runtime groups can occur as a result of copying when branching
and merging projects. When these empty runtime groups are created, the
original names of the runtime groups are lost due to implicit incrementation of
the numbers.
• Make Textual Interconnections tab;: If this option is set, all textual
interconnections for which the referenced interconnection partner exists are
made and turned into real interconnections.
Note: Note: If the option is not set or if the textual interconnections cannot be
made, they are ignored during compilation. A warning is entered in the log
indicating which I/Os still have a textual interconnection. One unclosed textual
interconnection is also tolerated in a download.
• The options "generate module drivers" and "update sampling time" are
used in CFC and are relevant only when CFC charts have been modified that
are also compiled in this S7 program.
Select the type of compilation you require ("Entire program" or "Changes only") and
start the compilation with "OK".
The charts of the current program (chart folder) are checked for consistency and
then compiled.
SFC für S7
2-46 A5E00345250-01
Working with the SFC Editor
Consistency Check
During compilation, a consistency check is run automatically. The messages are
written to a log file.
If errors and warnings occur, you can jump to the relevant SFC by double-clicking
the message.
You can also run the consistency check without a full compilation by selecting
“SFC > Consistency Check...".
Logs
Following the consistency check or compilation, you can display and print out the
messages of both activities using the menu command “Options > Logs".
You can display and print the result of the consistency check and any messages
resulting from compilation in the "Logs" dialog box (Options > Logs ... menu
command).
SFC für S7
A5E00345250-01 2-47
Working with the SFC Editor
2.12.2 Download
After you have compiled, you can download the user program to the CPU.
The following requirements must be met before you can download:
• There must be a connection between the CPU and your PG/PC.
• The Edit mode is set.
With the programs created in SFC, you must always download to the CPU from
SFC (or CFC), since only this download function guarantees the consistency of the
configuration data with the CPU data. The same download function is also used if
you select the "PLC > Compile and Download Objects" menu command in the
SIMATIC Manager.
On the other hand, copying blocks in the "Offline Block Folder" to insert them in the
"Online Block Folder" is not permitted.
If these requirements are met, you can start the download with the “CPU >
Download..." menu command.
If you have made a download-relevant change in the configuration and have not
compiled since you made the changes, you will be prompted to compile before you
download. If the compilation is free of errors, the download will be started
automatically when compilation is completed.
In the "Download" dialog box, you can choose between "Entire program" (CPU in
STOP) and "Changes" (CPU can be in RUN-P) and "Download to test CPU (entire
program).
Downloading to the CPU, just like working in test mode, is a protected function in
S7 that must be logged. Prerequisite: The SIMATIC Logon Service is installed. The
protected actions are logged in the change log if the current chart folder was
activated for the change log (Chart folder > Object properties... > Change log tab).
SFC für S7
2-48 A5E00345250-01
Working with the SFC Editor
SFC für S7
A5E00345250-01 2-49
Working with the SFC Editor
Caution
! Read the information about the causes of stoppages when downloading changes
in the online help.
SFC für S7
2-50 A5E00345250-01
Working with the SFC Editor
Modification on the OS
By changing the content of the recipe data block, parameter-controlled operation is
possible with different parameter sets. The parameters are changed on the OS.
SFC für S7
A5E00345250-01 2-51
Working with the SFC Editor
SFC für S7
2-52 A5E00345250-01
3 Sequential Control System on the CPU
Introduction
This chapter describes the functions of sequential control systems on the CPU,
when steps and transitions are processed, and the effects of a statement in the
processing phase (action) of a step.
3.1 General
Prerequisites
The SFC created with the SFC editor is defined by the sequencers (start condition
and pre/postprocessing) and their topologies, by the actions of the steps, the
conditions of the transitions, and by the runtime properties; the program has been
compiled and downloaded to the CPU.
SFC für S7
A5E00345250-01 3-1
Sequential Control System on the CPU
SFC für S7
3-2 A5E00345250-01
Sequential Control System on the CPU
3.2.1 Mode
The mode decides whether the running of the program is controlled by the operator
or is automatically controlled by the CPU program.
The following modes are possible for an SFC chart:
• AUTO (process mode)
Execution is controlled automatically. Control by the CPU program is
implemented in the CFC chart by suitable assignment of parameter values or
interconnection of inputs of the external view of the SFC chart or SFC instance.
• MANUAL (operator mode)
Execution of the chart is controlled manually by an operator (for example
during commissioning or with SFV). All step control modes are permitted.
The enable for changing to AUTO can also be set in the external view or in the
SFC instance; in other words the explicit enable by the operator can be made per
SFC with a central operator command or by the program (ENAUT I/O). The also
makes a change from MAN to AUTO possible controlled by the program.
For a more detailed description of the step control modes, refer to the online help
of SFC.
Note:
In the step control modes "C" and "T or C", the minimum run time of the step can
be overridden by the operator.
SFC für S7
A5E00345250-01 3-3
Sequential Control System on the CPU
SFC für S7
3-4 A5E00345250-01
Sequential Control System on the CPU
Defaults
Step Control Mode T transition (process controlled)
Mode MAN Operator control mode
Instruction output on
Cyclic execution off
Time monitoring off
Start options
Autostart off
Use default operating parameters when SFC
starts off
The following operating mode is set after the CPU has started up:
Idle (if Autostart = off)
Starting (if Autostart = on)
SFC für S7
A5E00345250-01 3-5
Sequential Control System on the CPU
SFC für S7
3-6 A5E00345250-01
Sequential Control System on the CPU
The current operating state of the SFC-OSL can be changed by the following
events:
• Commands (Start, Resume, Hold, ...) in the "MANUAL" or "AUTO" modes.
• External signals (inputs of the SFC, commands from another SFC, ...).
• Internal signals (commands from own sequencers, from the test mode or SFC
Visualization).
• Implicit state change.
The operating state logic of an SFC is defined by the diagram of state changes:
SFC für S7
A5E00345250-01 3-7
Sequential Control System on the CPU
The SFC-OSL contains several state changes that were retained to ensure
compatibility with older projects. In the diagram, these are shown as broken blue
lines.
Idle
Start
2
Starting
STARTING
Restart
Hold Error
Start only if CONT = 1
3
Run
7 10
SELFCOMP=1 SELFCOMP=0
Holding Error
and
Completing
4
Reset
Completing
Error
Error
Error
8 11
Start 5
Error Held Held
(Completing) (Error)
6
Completed
Completed
Resume /
Resume/ Start
from all states Start
from all states (except Idle,
(except Idle, Aborting, Aborted, 9 12
Aborting, Aborted) Stopping, Stopped)
Resuming Resuming
(Error)
Abort Stop
13 15
Aborting Stopping Legend:
The numbers in the diagram are identifiers for the individual states whose
significance is explained in the following Table 3-3.
SFC für S7
3-8 A5E00345250-01
Sequential Control System on the CPU
The following tables describe the changeovers between the states (source state
no. / target state no.) and what triggers them.
X = possible from several states.
SFC für S7
A5E00345250-01 3-9
Sequential Control System on the CPU
SFC für S7
3-10 A5E00345250-01
Sequential Control System on the CPU
SFC für S7
A5E00345250-01 3-11
Sequential Control System on the CPU
SFC für S7
3-12 A5E00345250-01
Sequential Control System on the CPU
SFC für S7
A5E00345250-01 3-13
Sequential Control System on the CPU
Idle
Start
5 Abort 2 Hold 4
completed Start
Completed
Legend:
SFC für S7
3-14 A5E00345250-01
Sequential Control System on the CPU
SFC für S7
A5E00345250-01 3-15
Sequential Control System on the CPU
3.3.4 Commands
In "MAN" mode, you can set or modify the operating states using the buttons of the
operator interface in SFC test mode or in SFC Visualization (refer to the table
"MAN Commands for the SFC"). Operator control depends on the operating state
and the command enables "EN......".
In "AUTO" mode, depending on the command enables "EN....", the commands are
made over the interface inputs "START, ....." (by assigning parameters or
interconnecting to a higher-level automatic controller).
Regardless of the mode and the command enables, interlock commands can be
made over the interface inputs "LOCKCOMPLETE, .....".
Again regardless of the mode and the command enables, the commands can be
made over the interface inputs (IN_OUT) "INSTART, ....." in the object properties of
the steps. These commands are reset after they have been executed; in other
words, when the state changes.
You will find more detailed information in the online help in the topic "Commands
and Operating States".
Note:
The commands arranged as buttons in the operator control section of the online
window (test mode) are effective for the SFC chart or SFC instance and not for
sequencers.
SFC für S7
3-16 A5E00345250-01
Sequential Control System on the CPU
SFC für S7
A5E00345250-01 3-17
Sequential Control System on the CPU
Sequence
The execution of the SFC depends on the input signals applied to the SFC
interface and the internal status of the SFC. After downloading an entire chart
folder to the automation system, all the SFCs are in the "Idle" state (or "Starting" if
autostart is set to 1).
• The mode, commands, and external and internal signals are queried to
establish how the SFC will execute, in other words, which state the SFC should
adopt based on the input signals.
• All the start conditions of the sequencers are checked to determine which
sequencer will execute on the basis of the checks made up to now.
SFC für S7
3-18 A5E00345250-01
Sequential Control System on the CPU
Notes
• When a sequencer aborts, the active steps always execute completely and
then the final step executes. The completion of the active steps and the
initialization or execution of the final step take place in one cycle.
• In an SFC, a sequencer can execute even if the SFC has not received a start
command. This is the situation, for example, when the start condition of one or
more sequencers is satisfied in the "Ready" state or when the start condition is
not dependent on states.
SFC für S7
A5E00345250-01 3-19
Sequential Control System on the CPU
An SFC starts only when the conditions are satisfied. The start enable must be set
(ENSTART=1) and the SFC must be in a state in which starting is permitted. The
following conditions must also be met:
• There must be no interlock error (LI_ERR must be set to 0).
• None of the signals INTERROR, LOCKERROR, LOCKCOMPLETE,
LOCKHOLD, LOCKABORT or LOCKSTOP is active at the same time.
• There is no operator error in the MAN mode (OP_ERR must be set to 0).
For an SFC instance, when using control strategies, one of the defined control
strategies (CS=<defined control strategy>) must be selected. If CS=0 or CS >
CS_HL, it is not possible to start the SFC instance. If no control strategies are
configured, the I/Os CS, CS_LL, CS_HL are assigned the value 0 during
compilation and must not be modified.
When using setpoints, these must also be within the relevant limits. Otherwise it is
once again not possible to start the SFC instance.
For an SFC instance, prior to starting in the AUTO mode, parameter transfer
(PARAM=1) must be set. The transferred control strategies and setpoints are then
checked and the start disable reset (QDIS_START=0) if the parameters are
permissible. The start disable remains set as long as no parameters have been
transferred by setting PARAM. Following a successful start, the start disable is set
until the next parameter transfer.
If one of the conditions listed above is not satisfied, the start disable
(QDIS_START=1) is set and the start is not executed and the "Start" button is
inoperable.
SFC für S7
3-20 A5E00345250-01
Sequential Control System on the CPU
SFC für S7
A5E00345250-01 3-21
Sequential Control System on the CPU
Summary
In both mechanisms, the output CSSPACCEPT is used to display whether or not
the requested changes were applied. This output is set after applying the control
strategy and/or setpoints by the SFC instance at the relevant outputs. Output
CSSPACCEPT is set for one processing cycle (at 1.) or remains set until the
TAKESP request is reset (at 2.).
Output LI_ERR indicates whether or not an error occurred when attempting to
apply value changes with the result that the values could not be completely
adopted. If LI_ERR is set, QDIS_START is not reset and a start and adoption of
the control strategy and/or setpoints is prevented (at 1.).
SFC für S7
3-22 A5E00345250-01
Sequential Control System on the CPU
Initialization
(first execution)
Sx Processing
(cyclic execution)
not satisfied
Next transition
Tx
satisfied
Termination
(last execution)
SFC für S7
A5E00345250-01 3-23
Sequential Control System on the CPU
Step S4 active
inactive
Actions S4
initialization
S4 processing
termination
Transition T4 satisfied
T4 not satisfied
Step S5 active
inactive
S5
Actions S5
initialization
processing
termination
Cycles
Fig. 3-4: Time Response in Executing Steps and Transitions in a Sequential Control System
When the chart progresses from one step to the next, the predecessor step is
terminated in the same cycle as the first action (initialization or execution) of the
next step. This allows the non-latching behavior" specified in IEC 1131 - 3 to be
achieved.
Example: In step S4, the execution opens a valve and in the termination, this is
closed again. If the same valve is opened again in the first action of the next step
(S5), the overlapping of the two actions (both in one cycle) means that the valve is
not closed.
SFC für S7
3-24 A5E00345250-01
Sequential Control System on the CPU
Special Situations
The example in Fig. 3-4 shows the response when all three actions of a step are
configured.
Other combinations are also possible:
• If no "initialization" is configured, the execution begins immediately when the
step is activated.
• If no “termination" is configured, the step is deactivated immediately when the
transition is true.
The minimum time in which a step is active depends on the number of configured
actions (for normal steps 1 to 2 processing phases, with the final step up to 3). If a
minimum run time is set for a step, the step remains active for at least this time
even if the transition condition is satisfied earlier.
The transition after the simultaneous sequence becomes true when all steps at the
end of the sequence paths are active and the conditions are satisfied.
SFC für S7
A5E00345250-01 3-25
Sequential Control System on the CPU
If several conditions are true at the same time, the transition furthest left in the
chart topology is activated.
Note:
In an alternative sequence, there must not be no transition without parameters at
the start of a sequence path.
Reason: Transitions without parameters are always TRUE and are therefore
automatically satisfied. This means that they are always true before a transition
with parameters.
Initialization
not satisfied
Processing
Loop transition
satisfied
not satisfied
Next transition
Termination
Termination
SFC für S7
3-26 A5E00345250-01
Sequential Control System on the CPU
S4 S4
S8 S9 S8 S9
T4
T5 T7
Jump
Alternative
S5 S6 sequence
Successor transition
T6 T8
Fig. 3-6: Example: Jumps from a Successor Transition and an Alternative Sequence
If there is more than one jump following the origin of a jump (S4), then (just as in
alternative sequences), the jump whose transition is satisfied first is executed. If
several transitions are true at the same time, the transition furthest left is activated.
If the next element in the sequence is not a successor transition (such as T4 on the
left in Fig. 3-6) but an alternative sequence, all the transitions of the alternative
paths (T5 and T7) are queried before the transitions of the jumps.
SFC für S7
A5E00345250-01 3-27
Sequential Control System on the CPU
SFC für S7
3-28 A5E00345250-01
4 Test and Startup
Overview
To support you when you put a new program into operation, the SFC editor
provides test functions that allow you to monitor the operation of the sequential
control system on the CPU, to control modes, and , if necessary, to change
setpoints.
This chapter describes how to monitor and control the sequential control system
when testing and commissioning.
SFC für S7
A5E00345250-01 4-1
Test and Startup
You change from the edit mode to the test mode by clicking the button in the
toolbar or by selecting the "Debug > Test Mode" menu command. During the Test
mode, you can change to the Edit mode at any time.
The mode change relates to the currently active SFC. This SFC is displayed
dynamically in its overview and is cyclically updated (you can set the watching
cycle with the “Debug > Test Settings..." menu command.)
Note:
If you change the test settings, you change the watching cycle for all charts of this
CPU.
After you change to the Test mode, the current state of the chart is displayed. This
means that a sequential control system that has already started cannot always be
monitored or controlled from the start. This is, for example, the case with charts
that are started immediately after they are downloaded to the CPU without any
operator command being required (autostart).
Note on H CPUs: If the H CPU is in solo mode, for example after the failure of a
CPU and there was a CPU failover, an online access (here: download) results in a
dialog being displayed. In this dialog, you can select the required CPU. In
redundant mode, this dialog does not appear.
SFC für S7
4-2 A5E00345250-01
Test and Startup
Fig. 4-1 : SFC Window in Test Mode (without Element Bar and Toolbar)
SFC für S7
A5E00345250-01 4-3
Test and Startup
The following is displayed in the operator input and display sections (from left to
right):
• in the fields of the first row:
- Symbol and name of the SFC state
- State display and name of the active sequencer
- State display and name of the held sequencer
- Field with drop-down list box for displaying and modifying the step control
modes
• in the fields of the second row:
- The current mode (MAN / AUTO)
- State flag "CONT" (continuous operation) for smooth changeover in AUTO
mode (for example to avoid an SFC having to be turned off temporarily
when it is restarted). The display is made when output QCONT = 1.
- Status display "READY T.C." (ready to complete), when the SFC is not self
terminating (SELFCOMP = 0) and in the active state waiting for the
"Complete" command (display, when READY_TC=1).
SFC für S7
4-4 A5E00345250-01
Test and Startup
Operator Prompt
The operator prompt (not with step control mode “T") is displayed in a box
After clicking on the field (or button) and continuing execution, the operator
prompt disappears again.
held yellow
Error red
SFC für S7
A5E00345250-01 4-5
Test and Startup
Changes during a Test Run (SFC chart only, not SFC instance)
The step attributes (confirmation, minimum/maximum run time, constant in
assignments) and transition attributes (constant in conditions) that can be modified
in the Test mode are adopted on the CPU and in the ES data management when
the change is made and do not require recompilation and download.
Note: If you want to modify the existing SFC instances, you must exit the test
mode and then modify the corresponding SFC type. After compiling the changes
and downloading them, all the instances are automatically adapted.
Trace
In Test mode, you can use the Debug > Trace menu command so that the active
sequencer is displayed. If this menu command is not set, the explicitly selected
sequencer is displayed.
SFC für S7
4-6 A5E00345250-01
Test and Startup
SFC für S7
A5E00345250-01 4-7
Test and Startup
SFC für S7
4-8 A5E00345250-01
Test and Startup
• "Initialization/Processing/Termination" Tabs
To the left of the first address there is a box displaying the current value of the
address. The box to the right of the second address contains the configured
value that you can change (only in the SFC chart). If you click the box, you
open the “Change Value" dialog box, in which you can enter the new value.
After you close the dialog box, the changed value is written to the ES data
management (and to the CPU) and becomes effective in the next processing
cycle.
If the monitoring of the step detects a timeout and if the button for step error is
displayed beside the step, the confirmation button is added to the other
buttons. This allows you to acknowledge the error from the dialog box.
After a step runtime error has been acknowledged, the appearance of the step
returns to the state before the error occurred (for example active = “light green").
Using the “Go To" button, you can jump from the current field of an operand to its
point of use (block in the CFC chart, SFC chart, I/O address in HW Config.).
SFC für S7
A5E00345250-01 4-9
Test and Startup
Changing Addresses
To the left of the first address and to the right of the second address, there is a box
with the current value of the address. In the SFC chart, you can change the content
of both fields (not possible with an SFC instance). If you click one of the boxes, the
“Change Value" dialog box is displayed in which you can enter a new value for the
address.
After you close the dialog box, the changed value is written to the ES data
management (and to the CPU) and becomes effective in the next processing cycle.
If there is an operator prompt for the monitored transition in the sequencer and the
button displayed beside the transition , the dialog box with the object properties
also has this button added to it. This allows you to acknowledge the operator
prompt from the dialog box.
Using the “Go To" button, you can jump from the current field of an operand to its
point of use (block in the CFC chart, SFC chart, I/O address in HW Config.).
The results of the logic operations of the conditions using Boolean operators are
visualized as colored links of varying thickness. A broad, green line means
“satisfied", a thin, red line means “not satisfied" and a thin, black line means
“inactive".
Update
The content is updated continuously in the “Current Cond." tab. In the “Current
Cond. -1" and “Cond. after Error" the “Update" button is also displayed. The state
of the transition is entered here as it was at the time when the object properties
were opened. Using the “Update" function, you can display the current state in a
permanently open dialog box.
SFC für S7
4-10 A5E00345250-01
5 Documentation
Overview
This chapter describes how you create the documentation for your SFC
charts/types/instances. This includes printing the SFC in various views and printing
the parameter assignment, the properties, and chart reference data.
You can print the current chart or type by clicking the button in the toolbar or
using the "SFC > Print..." menu command. In the dialog box that opens, you can
make settings relating to the scope of the printout (Print What) and the layout
(Options).
• Print What: properties, I/Os, external view (with SFC chart) or alternatively
characteristics (with SFC type/instance). For the sequencers: Properties,
Normal size, Overview, Steps/Transitions. You can select either normal size or
overview, but not both.
• Options (only with "Normal size"): Alternative sequence aligned left,
Comment/text.
Note:
The selected range is always printed for the entire SFC. If you only require a
printout of a step or a transition, use the print functions of the in the “Object
Properties" dialog of the selected element.
SFC für S7
A5E00345250-01 5-1
Documentation
With the "Options > Chart Reference Data..." menu command or by clicking ,
you start an application that creates comprehensive documentation listing, for
example, the run sequence, the cross-references of the addresses etc.
With a search function, you can search for specified addresses, symbols, I/Os etc.
This helps you to check your configuration structure. With the “Cross-References
Chart Element -> Address" list, you can, for example, check which addresses are
used and how often and whether the write access is synchronized.
You do not need to close the window with the chart reference data if you want to
continue working with the SFC editor. This means that you can view the lists while
working with the SFC editor.
For a detailed description of the “Chart Reference Data", refer to the CFC online
help.
SFC für S7
5-2 A5E00345250-01
Documentation
5.4 Logs
The Options > Logs... menu command displays a dialog box with several tabs. The
dialog displays only the tabs for the functions that were used already in the current
chart folder. The tabs relevant to SFC charts are listed below:
• Compile
List of messages occurring during compilation (including compiler messages).
• Check Consistency
List of the messages that occurred during the consistency check.
• Download
List of messages occurring during a download, for example, when the
download was free of errors: "0 error(s) and 0 warning(s) found".
• Change log
All protected actions are logged here (download, test mode). This is only
possible when the SIMATIC Logon Service is installed.
• Step Processing
After checking the SFC runtime behavior with the menu command "Options >
Check Step Processing", this tab lists the steps that use the same address in
the terminating action of one step and in the initializing action or processing
action of the next step. The log shows how many SFC charts were checked
and how many accesses were found and the SFC charts with an unchanged
runtime behavior.
• Convert Format
After converting charts of older versions to V5.x or V6.x, the charts that no
longer have the same properties are listed here. These include, for example,
the SFC charts that had the attributes “scan rate" and “phase offset" in the old
version. The information includes the installation location (task) and the values
for the scan rate and phase offset for every chart affected.
Example: "SFC1: Task OB32 scan rate 4 phase offset 2"
• Make Textual Interconnections
With the "Options > Close Textual Interconnections" menu command or the
option with the same name in the Compile dialog, all open textual
interconnections are closed if they have a concrete interconnection partner in
the current chart folder. The textual interconnections closed with this action are
displayed along with error messages indicating the textual interconnections
that could not be closed.
The “Go To" button is activated when an object occurs in a selected message that
can be displayed. If you click the button, the relevant chart is opened and the
object selected and displayed centrally.
SFC für S7
A5E00345250-01 5-3
Documentation
SFC für S7
5-4 A5E00345250-01
A Technical Specifications
Hardware Requirements
• PG or PC with:
- Pentium Processor
- RAM 256 Mbytes (or more)
- Hard disk 500 Mbytes (less RAM)
- Graphics card VGA 640 x 480
(recommended: SVGA 1024 x 768 or higher)
• SIMATIC S7-400
Software Requirements
• Microsoft Windows NT (SP 5) / Windows 2000 (SP 3)
• STEP 7
• SCL Compiler
• CFC
An authorization for STEP 7, SCL, CFC and SFC must be installed.
Object Number
Steps per chart 2 - 255
Transitions per chart 1 - 255
Statements per step and action ≤ 50
Conditions per transition ≤ 16
Sequencers per SFC chart ≤8
Sequencers per SFC type ≤ 32
Steps per sequencer 2 - 255
Transitions per sequencer 1 - 255
SFC for S7
A5E00345250-01 A-1
Technical Specifications
SFC for S7
A-2 A5E00345250-01
B Abbreviations
DB Data block
ES Engineering system
OB Organization block
OS Operator station
PC Personal computer
SFC for S7
A5E00345250-01 B-1
Abbreviations
PG Programming device
PH Plant hierarchy
SFC for S7
B-2 A5E00345250-01
Glossary
Access
SFC elements or block I/Os can access addresses, charts, block I/Os, or run-time
groups. A distinction is made between read and write access.
Action
Actions allow the activation or deactivation of run-time group and SFC charts, as
well as modifications to blocks and shared resources and their input parameters.
The actions are formulated in SFC in the Properties dialog.
Address
An address is the identifier of the location of data or an area containing data,
examples: input I12.1; memory word MW25; data block DB3. Addresses can be
specified in absolute or symbolic form.
An address is part of a STEP 7 instruction and tells the processor what it should
perform an operation on.
In SFC, the address is part of a statement (step) or condition (transition).
Addressing, absolute
If data is addressed in absolute form, the absolute ↑address is used to access the
value with which the operation will be performed. Example: The address Q4.0
identifies bit 0 in byte 4 of the process output image (PIQ).
Addressing, symbolic
If data is addressed using symbols, the ↑ address to be processed is specified as a
symbol (not as an absolute address). Symbols are assigned to addresses in the
symbol table.
Alternative sequence
A structural element of an SFC, that consists of at least two ↑sequence paths. Only
the path whose transition condition is satisfied first is processed by the PLC.
SFC for S7
A5E00345250-01 Glossary-1
Glossary
Basic control
Basic control is the configuration of the programmable controller (PLC). The
configuration tools available are the CFC and SFC editors.
Block
Blocks are separate parts of a user program that are distinguished by their
function, their structure, or purpose.
CFC works with ready-made block types that are placed (inserted) in a CFC chart.
When a block type is inserted in the chart, a block instance is created. These block
instances and their graphic representation are blocks in the sense of CFC.
Block category
The block category identifies different forms of blocks. Block categories include, for
example, data blocks (DBs), function blocks (FBs), and functions (FCs).
Block icon
Graphic representation of the most important information of a technological, block
that can be controlled and monitored on the PLC. The block icon is typically placed
in an OS overview picture. The corresponding faceplate can be called up using the
block icon.
Block input
Block I/O that can be interconnected with block outputs and ↑ addresses of the
same data type or can have parameters assigned to it.
Block instance
A block instance is the implementation of a block type. A block type inserted in a
CFC chart becomes an instance. After it is inserted, the block instance has run-
time properties and name that is unique within the chart.
Block I/O
Block input or block output
Block output
Block I/O that can be interconnected with block inputs and ↑ addresses of the
same data type.
SFC for S7
Glossary-2 A5E00345250-01
Glossary
Catalog
Window in CFC, that can be switched between the catalogs of blocks, charts,
libraries, and unplaced blocks (if unplaced blocks exist). You can insert blocks,
charts and text boxes from the catalog into a chart.
CFC
Continuous Function Chart.
1. Function chart (CFC chart) with the graphic interconnection of technological
functions (blocks).
2. An editor for plant/oriented, graphic configuration of automation tasks. Using
CFC, entire software structures are created (CFC charts) from ready-made
blocks.
Chart
Depending on the context, a chart in the ES is
• a CFC chart consisting of 1 to 26 chart partitions each with 6 sheets and
possibly also overflow pages.
• a nested chart that results when one chart is inserted in another (chart-in-chart).
• an SFC chart consisting of between 1 and a maximum of 8 tabs. Each tab
contains a sequencer.
Chart element
Chart elements of the SFC chart are the basic elements (step, transition, text) and
structure elements (sequence, simultaneous sequence, alternative sequence, loop
and jump).
Chart folder
Folder in the project structure containing charts of a user program.
Component view
Device-oriented view in the SIMATIC Manager. The project is displayed with its
components (station, module, program ... );
alternative to the ↑ plant view or ↑ process object view.
Consistency check
Checks the consistency of block types, shared addresses etc. of the chart folder.
SFC for S7
A5E00345250-01 Glossary-3
Glossary
Condition
Conditions in a transition allow you to do the following:
• to read values of block I/Os or shared addresses
• To logically combine the read values with a constant or another read value
using Boolean operators (=, >, <, ...)
The result of a condition is a Boolean variable that can be logically combined with
the results of other conditions.
Cycle time
The cycle time is the time required by the CPU to execute the user program once.
Data type
A data type specifies how the value of a variable or constant is used at a block I/O.
"BOOL", for example, defines a binary variable; "INT" defines a 16-bit integer
variable.
Drag-and-drop
With the drag-and-drop function, you can move, copy and insert objects using the
mouse.
Using drag and drop:
1. Select the objects by clicking them or by drawing a lasso round them.
2. Position the mouse pointer on an object, press the left mouse button and hold it
pressed.
3. If you want to copy, hold down the CTRL key as well (the mouse pointer has the
"+" symbol added to it).
4. Move the mouse pointer to the required position and release the button - the
objects are inserted.
Dynamic display
In the dynamic display, input and output values of a block in a CFC chart or
address values in an SFC chart are updated from the CPU in the Test mode.
SFC for S7
Glossary-4 A5E00345250-01
Glossary
Edit mode
(Alternative to the ↑ test mode)
In CFC blocks can be inserted, copied, moved, deleted, renamed, have parameter
values assigned, or be interconnected.
In SFC the sequential control system is created in this mode. Chart elements can
be inserted, copied, moved, deleted, renamed, and assigned parameters.
ES
Abbreviation for "Engineering System". This is a user-friendly, visual configuration
system in which the process control system can be created and adapted to
different situations.
External view
The external view is the graphic representation of a SFC chart as block (with
interface) that allows external interconnection of the I/Os. The external view
contains the standard interface that is derived from the SFC run-time system.
The external view of the SFC can be interconnected with any objects (CFC blocks,
nested charts, run-time groups, textual references, shared addresses). This means
that the SFC chart can also be controlled directly by CFC interconnections.
The external view is displayed in a separate window in the CFC. Other objects
cannot be placed in this window. Interconnections to other CFC objects are
implemented solely via the sheet bar.
SFC for S7
A5E00345250-01 Glossary-5
Glossary
Hierarchy folder
The hierarchy folder is used to structure the plant in a hierarchy. It can contain
further hierarchy folders and objects such as CFC / SFC charts, process pictures,
reports, additional documents (Excel, Word, ...). The HID of an object is obtained
from the name of the hierarchy folder (path) and the object name.
Installing
Procedure with which a block/SFC chart is placed in a ↑ run-time group so that it is
registered with an ↑ organization block (OB).
Instance
When you insert an SFC type or a block type in a CFC chart, an instance is
created. Instance in this sense means that it is an instance or usage of the
selected SFC type or block type.
Interconnection
In CFC, the connection of an I/O to another element. The value of the
interconnected input is fetched from the other end of the interconnection during run
time. Read or write access from an SFC chart to a block I/O in a CFC chart is also
known as an interconnection.
I/O
The input or output of a block or chart. I/Os of the same data type can be
interconnected or connected to shared addresses. An I/O is parameter, that
accepts data for further processing (input) and transfers the resulting data (output).
SFC for S7
Glossary-6 A5E00345250-01
Glossary
Jump
A jump is a structure element of SFC, with which the execution of an SFC can be
continued at a different step in the same SFC depending on a transition condition.
L
Laboratory mode
One of the test modes.
The laboratory mode allows convenient and efficient testing and commissioning. In
the laboratory mode communication for online dynamic display of SFCs is
unrestricted.
As an alternative to the laboratory mode, you can also select the ↑ process mode
(restricted test mode). It is not possible to switch over between the process and
laboratory modes when testing is active (only in the edit mode).
Library
A folder for objects that can be used again and again. A library is not project-
related. Blocks are made available in block libraries sorted according to certain
criteria (block families, alphabetical order etc.). Different block libraries are used
depending on the PLC or situation.
Loop
Structure element in SFC consisting of a ↑ sequence and a return path; the
sequence encloses and contains exactly one transition.
Master project
A master project is a project that has had parts of it (for example, charts)
distributed into other projects (branch projects) to allow more efficient engineering.
After they have been worked on, the parts are merged back into the original project
= master project.
Messages, configuring
Creating messages with their attributes and texts. Messages can be configured
from within SFC.
SFC for S7
A5E00345250-01 Glossary-7
Glossary
Mode
1. CPU:
Using the mode selector of the CPU, you can set the following operating modes:
• RUN with access to the STEP 7 user program,
for example, with programming device ("RUN-P"),
• RUN with access protection ("RUN"),
• STOP and
• Memory Reset ("MRES").
2. SFC:
The mode decides how the execution of an SFC is controlled.
• AUTO (process mode): Execution is controlled automatically, for example, via
the external view of an SFC chart..
• MANUAL (operator mode): Execution of the chart is controlled manually by an
operator, for example during commissioning or with SFV (SFC Visualization in
WinCC).
Online/offline
In the SIMATIC Manager, objects of the programmable controller are displayed in
the online view and the objects of the ES in the offline view. Online, there is a data
connection between the PLC and the programming device/PG, offline there is no
connection.
Operating mode
1. The programmable controllers of SIMATIC S7 can adopt the following operating
modes: STOP, STARTUP, RUN and HOLD.
2. SFC has the following operating states Ready, Starting, Active, Completing,
Error (completing), Completed, Holding, Held, Continuing, Error, Held (error),
Resuming (error), Aborting, Aborted, Stopping, Stopped.
Operating system
General term for all the functions that control and monitor the execution of the user
programs, the distribution of resources to the individual user programs, and the
maintenance of the operating mode in conjunction with the hardware (for example
standard operating system MS-WINDOWS).
SFC for S7
Glossary-8 A5E00345250-01
Glossary
OS
Operator Station. A station for controlling and monitoring the process. In PCS 7,
the WinCC software system is used for the OS with which all the process
monitoring and control functions can be implemented.
Phase offset
The phase offset shifts the point of activation of the run-time group within a task by
a defined time compared with the basic cycle. Phase offset allows a uniform
distribution of load within the CPU. See also ↑ scan rate.
Plant view
View in the SIMATIC Manager based on technological aspects (plant (process
cell), unit, function ...); alternative to the ↑ component view and ↑ process object
view.
SFC for S7
A5E00345250-01 Glossary-9
Glossary
Postprocessing
A cyclic action can also be configured for each sequencer. The cyclic action
consists of a part that is executed before the cyclic sequencer processing, the
preprocessing and a part that is executed after the cyclic sequencer processing,
the postprocessing.
Preprocessing
See ↑ Postprocessing.
Process
Sequence of chemical, physical, or biological processes for extraction, production
or elimination of substances or products.
Process image
Reserved areas in the RAM of the CPU. Signal states of the input and output
modules are entered here.
Process mode
One of the test modes. In the process mode, the communication for online dynamic
display of the SFC charts is restricted and causes only limited extra load on the CP
and bus.
As an alternative to the process mode, you can also select the ↑ laboratory mode
(unrestricted test mode).
Processing phase
A step is divided into three processing phases: initialization, (cyclic ) processing
and termination. Each processing phase corresponds to an action with statements.
Process tag
A neutral object in terms of resources. It is used to connect the PLC configuration
world (STEP 7, CFC ...) with the OS configuration world (WinCC). It contains
information about its location during run time (for example the network address and
the memory area on the PLC) as well as information on specific OS-relevant
properties.
SFC for S7
Glossary-10 A5E00345250-01
Glossary
Project
A folder for all the automation solutions regardless of the number of stations or
modules and how they are networked.
Recipe
A recipe is the procedure for manufacturing a product according to a specific
procedure.
Resources
Resources are pools of objects (FBs, FCs, DBs, OBs, bit memory, counters, timers
etc.) that can be accessed when configuring and setting parameters for a
CFC/SFC chart.
Run-time attribute
Run-time groups have run-time attributes that control their activation. All the blocks
and/or SFC charts in a run-time group inherit these attributes from it.
In S7 the tasks are implemented as ↑ organization blocks (OBs).
Run-time group
Run-time groups are used to structure tasks. The blocks and/or SFC charts are
installed in the run-time groups. Run-time groups have run-time attributes and can
be activated and deactivated separately by interconnecting them with a block
output or by a statement. If a run-time group is deactivated, none of the objects it
contains will be activated any longer.
Run-time properties
The run-time properties of block or SFC chart determine how the block/chart is
included in the execution of the entire structure on the PLC. These properties are
vital to the performance of the PLC in terms of reaction times, dead times, or the
stability of time-dependent structures, for example control loops.
SFC for S7
A5E00345250-01 Glossary-11
Glossary
Run sequence
This is a program sequence with which the blocks and/or SFC charts can be
installed in the order in which they are executed by the CPU. The run sequence is
displayed as a separate window in CFC and contains the OBs of the relevant PLC.
S7 program
A folder for the ↑ symbol table, the blocks, the source files, and the charts for the
programmable S7 modules.
Scan rate
The scan rate is a ↑ run-time attribute. It specifies whether a ↑ run-time group is
executed every time a task is executed or only every nth time. See also ↑ phase
offset.
SCL
A high-level language similar to Pascal complying with IEC 1131-3 for
programming complex solutions on a PLC, for example algorithms and data
processing jobs.
Sequence
Structure element in SFC containing a sequence of ↑ steps and ↑ transitions.
Sequence path
In SFC, a sequence path is a series of elements (in the topology seen as a vertical
path). A simultaneous sequence or an alternative sequence consists of at least two
sequence paths arranged side-by-side and containing at least one element.
In SFC, an entire ↑ sequencer can also be understood as a sequence path.
Sequencer
A sequencer is a functionally self-contained unit within a sequential control system.
It consists of a series of steps and transitions and begins with an initial step and
ends with a final step. Within the SFC, a maximum of 8 (chart) or 32 (type)
sequencers can be created and selected using tabs.
Sequencer topology
In the sequencer topology of the SFC, the elements are displayed according to
fixed syntax rules (for example, order, spacing, extent and alignment of the
elements). When the topology is created, the syntax rules are adhered to
automatically by the editor.
SFC for S7
Glossary-12 A5E00345250-01
Glossary
Shared address
Shared addresses are I/O signals (input/output bits, bytes, words, double words;
peripheral input/output bits, bytes, words, double words), memory bits, timers,
counters, data block cells, functions, or function blocks. They can be accessed in
absolute and symbolic form by SFC and CFC.
Symbolic access uses names (the symbol) of the shared address in the symbol
table. For absolute access, the symbol table is not required. The absolute form of
the shared address is entered. Symbolic addressing has the advantage that the
connection is retained if the address is changed and the symbol stays the same.
When accessing addresses, make sure that the shared address has the same data
type as the block I/O in the CFC chart or statement / condition in the SFC chart.
SFC
An SFC chart is a ↑ sequential control system that runs as a separate control
system within the programmable controller.
SFC instance
See ↑ Instance.
SFC type
See ↑ Type.
SIMATIC Manager
Graphic user interface for SIMATIC users under Windows 95/98/NT/2000/XP. The
SIMATIC Manager is used, for example, to create projects and access libraries.
Start condition
The start condition triggers the start of a sequencer. While the sequencer
executes, it is not necessary for the start condition to remain satisfied. The
sequencer executes until it is completed or until a sequencer with a higher priority
and satisfied start condition needs to execute or until the sequencer is aborted or
held due to a status change.
SFC for S7
A5E00345250-01 Glossary-13
Glossary
Statement
Within the action of a step, a statement can be used for the following:
• to write to CFC block I/Os
• to assign shared addresses
• to activate and deactivate SFC charts
• to activate and deactivate run-time groups
A statement always consists of a left (first) address, an operator and a right
(second) address.
Step
The step is an element of a ↑ sequential control system and is the control instance
for the execution of the associated ↑ actions. A step is divided into three
processing phases: initialization, (cyclic ) processing and termination.
Step types
An SFC has different types of steps: initial step, normal step, final step.
Structure
A structure is a structured ↑ data type made up of various elements. An element
can be an elementary or a structured data type.
Structure element
Structure elements in SFC consist of an arrangement of basic elements. Structure
elements are: "Sequence", "Simultaneous sequence", "Alternative sequence",
"Loop" and "Jump".
SFC for S7
Glossary-14 A5E00345250-01
Glossary
Symbol
A symbol is a name defined by the user according to certain syntactical rules. After
its purpose has been defined (for example to represent a variable, data type, jump
label, block), it can be used in programming and in operator monitoring and control.
Example: address : I5.0, data type: BOOL, symbol: Emer stop.
Symbol table
Table for assigning symbols (= name) to addresses for shared data and blocks.
Examples: Symbol Address
Emerstop I1.7,
Ctrller FB24
Target step
In the test mode (or in SFC visualization on the OS), a step can be selected as the
target step. This means that the deactivated ↑ sequencer begins again at the
selected step instead of the initial step at the next "Start" command and a halted
sequencer resumes at the target step after completing execution of the interrupted
step(s) when the "resume" command is received.
Task
Tasks form the interface between the operating system of the CPU and the user
program. The order of execution of the user program is specified in tasks. A task
corresponds to an organization block in S7.
Test mode
(Alternative to the ↑ Edit mode) Mode of CFC/SFC for testing and optimizing user
program running online on the CPU. Values of block I/Os and the execution of SFC
charts on the CPU can be monitored and modified.
For testing, you can select either the ↑ process mode or the ↑ laboratory mode.
Top chart
A CFC chart that is not nested in another chart and can be displayed in the
SIMATIC Manager ( ↑ nested charts).
Transition
A transition is a basic element of SFC and contains the conditions according to
which a sequential control system passes control from one step to the successor
step.
Type
In SFC, there is not only the object type "SFC chart" but also the object type "SFC
type". The SFC type allows the definition of ↑sequential control systems including
an interface.
SFC for S7
A5E00345250-01 Glossary-15
Glossary
The SFC type cannot run alone. Like a function block type, an SFC type must be
placed in a CFC chart to obtain a runnable object, in this case, an SFC instance (↑
instance). To run an SFC instance, both the SFC type and the SFC instance are
loaded on the PLC.
Update cycle
In the Test mode, this specifies the intervals at which the watched values of the
block I/Os are updated.
User program
The user program contains all the instructions and declarations and the data for
processing the signals allowing a plant or process to be controlled. It is assigned to
a programmable module (for example CPU, FM) and can be structured in smaller
units.
In S7, a user program on the ES consists of the ↑ symbol table, the source files,
the blocks, and the charts.
Value identifier
Symbolic substitute (text) for defined values of block I/Os of the data types BOOL,
BYTE, INT, DINT, WORD and DWORD.
SFC for S7
Glossary-16 A5E00345250-01
Index
Customizing
A for colors 2-25
Customizing
Actions 1-23 for compilation 2-46
formulating 2-38 Cut 2-35
Address selection
editing 2-40
D
Alternative sequence 1-27
creating/extending 2-31 Defaults (operating parameters) 3-5
Areas of application for sequential control Delete 2-35
systems 1-4 DOCPRO 5-2
Download 2-48
B Download entire program 2-48
Downloading changes 2-49
Basic automation 3-2 Downloading F programs 2-50
Bit memory 2-7
Block contacts 2-7
E
C Entering addresses 2-39
Execution on the CPU
C 3-3 alternative sequence 3-26
Change log 4-1 jump 3-27
Change Log 2-48 loop 3-26
Changing the jump destination 2-33 sequential control system 3-23
Changing the return jump simultaneous sequence 3-25
convergence 2-32 step / transition 3-24
Characteristics editor 2-6 Execution options 3-4
Chart External view 1-18
copying 2-17
opening 2-16
F
Chart elements
cutting and pasting 2-35 Final step 1-23
deleting 2-35 Formulating conditions 2-43
Chart reference data 5-2
Color settings 2-25 G
Commissioning 4-1
Comparing the CPU 2-47 General numeric data A-1
Compilation settings 2-46
Compile 2-46 H
Configuring an SFC chart 2-1
Hardware requirements A-1
Configuring an SFC instance 2-14
Configuring an SFC type 2-3
Consistency check 2-47 I
Control passing condition 2-42 Initial step 1-23
Control strategies 2-7 Interface Editor 2-6
Control values 2-7
Copy 2-35
Creating an SFC instance 2-16
Creating an SFC type 2-15
SFC for S7
A5E00345250-01 Index-1
Index
J Properties dialog
step 2-37
Jump 1-29 transition 2-42
copying 2-35
creating 2-33
R
K Recipe data block 2-51
Reference data 5-2
Keywords (DOCPRO) 5-2 Return path 1-28
Run sequence 2-23
L Runtime group 2-24
Runtime properties 2-23
Laboratory mode 4-1
Logs 2-47, 5-3
loop 1-28 S
Loop Sequence 1-25
creating 2-32 creating 2-29
Sequence path
M in test 4-7
Sequence path 1-25
Master data library 1-13
Sequence path element 1-21
Mode 3-3
Sequencer 1-20
Modifications to control strategies and/or
Sequencer OSL 3-14
setpoints 3-21
Sequencer properties 2-36
Move 2-35
Sequencer topology 2-26
Multiproject 1-13
Sequencers 1-4
Sequential control system 1-4
N configuring 2-25
Normal step 1-23 Setpoints 2-7
Note texts 2-7, 2-8 SFC
printing 5-1
SFC chart 1-2, 1-14
O
creating 2-15
Object properties SFC elements 1-20
step 2-37 copying 2-35
transition 2-42 editing 2-35
Opening an SFC instance 2-16 SFC instance 1-2, 1-16
Operating behavior 3-5 SFC instances
Operating state 3-6 copying and moving 2-17
Operator control mode (MAN) 3-3 SFC type 1-2, 1-16
OS comment 2-44 opening 2-16
SFC types
P copying and moving 2-17
SFC-OSL 3-7
Parameter-controlled operation 2-51 SIMATIC Manager 1-12
Parameters 2-7 Simultaneous sequence 1-26
Paste 2-35 creating/extending 2-30
Plant hierarchy 1-12 Single project 1-13
Position texts 2-7, 2-8 Software requirements A-1
Postprocessing 2-25, 2-28 Start condition 2-27, 3-1
Preprocessing 2-25, 2-28 Starting an SFC 3-20
Process mode 4-1 Statements 1-23
Process mode (AUTO) 3-3 Status indicator 4-5
Process values 2-7
Project structure 1-13
Properties
chart 2-19
Type 2-20
SFC for S7
Index-2 A5E00345250-01
Index
T V
T 3-3 Value identifier 2-39
T / T and C 3-3
T and C 3-3 W
T or C 3-3
Target step 3-19, 4-8 Watch cycle 4-6
Test Mode
SFC for S7
A5E00345250-01 Index-3
Index
SFC for S7
Index-2 A5E00345250-01