STEP 7 CFC V19 enUS en-US

Download as pdf or txt
Download as pdf or txt
You are on page 1of 395

Configuring CFC charts

STEP 7 CFC Readme 1

Introduction and basics 2

Elements and basic settings 3


SIMATIC
Configuring and adapting
CFC charts 4
STEP 7 CFC
Configuring CFC charts Configuring and using the
5
trend and dynamic displays

Data types in CFC 6


System Manual
Working with CFC charts
for S7 7

CFC Charts (Export/Import) 8

11/2023
A5E53466205-AA
Legal information
Warning notice system
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 only to property damage have no safety alert symbol. These 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
indicates that minor personal injury can result if proper precautions are not taken.

NOTICE
indicates that property damage can result if proper precautions are not taken.
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 product/system described in this documentation may be operated only by personnel qualified for the
specific task in accordance with the relevant documentation, in particular its warning notices and safety
instructions. Qualified personnel are those who, based on their training and experience, are capable of identifying
risks and avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens Aktiengesellschaft. 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.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency.
However, the information in this publication is reviewed regularly and any necessary corrections are included
in subsequent editions.

Siemens Aktiengesellschaft A5E53466205-AA Copyright © Siemens 2023.


Digital Industries Ⓟ 11/2023 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 STEP 7 CFC Readme ............................................................................................................................... 9


1.1 Cybersecurity information .................................................................................................... 9
1.2 Scope of delivery for SIMATIC STEP 7 CFC ........................................................................... 10
1.3 What's new in SIMATIC STEP 7 CFC in TIA Portal V19? ......................................................... 11
1.4 System requirements for SIMATIC STEP 7 CFC ..................................................................... 13
1.5 SIMATIC STEP 7 CFC licensing ............................................................................................. 15
1.6 General information about SIMATIC STEP 7 CFC .................................................................. 17
1.7 Notes on exporting/importing CFC charts (TIA Portal Openness) ......................................... 23
2 Introduction and basics ....................................................................................................................... 25
2.1 Basics of CFC ..................................................................................................................... 25
2.2 Configuration options for CFC charts .................................................................................. 26
2.3 Instructions and blocks ...................................................................................................... 27
2.4 Type and instance .............................................................................................................. 29
2.5 Hierarchical CFC charts ...................................................................................................... 31
2.6 Protection from unintentional access to CFC charts ............................................................ 36
2.7 Multilingual texts in CFC .................................................................................................... 38
2.8 Copying objects ................................................................................................................. 40
2.9 CFC naming conventions ................................................................................................... 41
3 Elements and basic settings ................................................................................................................ 43
3.1 Basic settings for CFC charts ............................................................................................... 43
3.2 "CFC" Editor ....................................................................................................................... 45
3.3 "Chart sequence & extras" Editor ........................................................................................ 49
3.4 Keyboard operation in CFC ................................................................................................. 51
3.5 Icons in CFC ....................................................................................................................... 53
4 Configuring and adapting CFC charts.................................................................................................. 63
4.1 Overview for configuration of CFC charts ........................................................................... 63
4.2 "Undo" and "Redo" functions in CFC .................................................................................... 65
4.3 Creating and managing CFC charts ..................................................................................... 66
4.3.1 CFC views .......................................................................................................................... 66
4.3.2 Creating a CFC chart .......................................................................................................... 70
4.3.3 Extending a CFC chart ........................................................................................................ 72
4.3.4 Create CFC chart partitions................................................................................................. 74
4.3.5 Managing CFC charts and groups ....................................................................................... 77

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 3
Table of contents

4.3.6 Printing a CFC chart ........................................................................................................... 79


4.3.7 Limiting editing of CFC with password ............................................................................... 82
4.3.7.1 Activating password for a CFC chart ................................................................................... 82
4.3.7.2 Changing or deactivating password for a CFC chart ............................................................ 83
4.3.7.3 Opening a password-protected CFC chart ........................................................................... 85
4.3.8 Changing the sheet bar view of a CFC chart........................................................................ 87
4.3.9 Creating a subchart for a hierarchical CFC chart .................................................................. 88
4.3.10 Replacing hierarchical CFC charts ....................................................................................... 90
4.3.11 Moving subcharts to the root level ..................................................................................... 91
4.3.12 Adding, editing and sorting parameters of the chart interface............................................. 92
4.4 Adding and managing objects in the CFC chart ................................................................... 94
4.4.1 Representation of instructions and blocks .......................................................................... 94
4.4.2 Representation options for the block icon in the CFC chart................................................ 102
4.4.3 Placing instructions and blocks in the CFC chart................................................................ 105
4.4.4 Copying instructions, blocks and charts ............................................................................ 107
4.4.5 Adding an instruction or block to the CFC chart ................................................................ 109
4.4.6 Adding a text box to a CFC chart ...................................................................................... 111
4.4.7 Aligning objects in a CFC chart ......................................................................................... 112
4.4.8 Positioning objects according to the data flow.................................................................. 113
4.4.9 Deleting an instruction or block from the CFC chart .......................................................... 114
4.4.10 Central change of a block type ......................................................................................... 116
4.4.11 Updating instances of a changed block type ..................................................................... 120
4.4.12 Creating a block type for CFC ........................................................................................... 122
4.5 Configuration and interconnection of input and output parameters .................................. 123
4.5.1 Setting the parameters of the input and output parameters.............................................. 123
4.5.2 Pre-assignment of attributes for input and output parameters .......................................... 125
4.5.3 Representation and properties of interconnections ........................................................... 127
4.5.4 Interconnections with structures as input and output parameters ..................................... 133
4.5.5 Changing the color of interconnection lines ..................................................................... 135
4.5.6 Interconnecting input and output parameters .................................................................. 136
4.5.7 Working with multiple interconnections ........................................................................... 141
4.5.8 Interconnections to parameters of the chart interface ...................................................... 144
4.5.9 Interconnecting the input and output parameters with an external tag ............................. 146
4.5.10 Adding or removing input parameters .............................................................................. 148
4.5.11 Negating input parameters .............................................................................................. 150
4.5.12 Hiding input and output parameters ................................................................................ 151
4.5.13 Displaying points of use of interconnections .................................................................... 153
4.5.14 Changing an interconnection ........................................................................................... 155
4.5.15 Changing an interconnection to an external tag ............................................................... 156
4.5.16 Deleting an interconnection ............................................................................................. 157
4.5.17 Overview of textual interconnections ............................................................................... 158
4.5.18 Creating, editing and closing textual interconnections...................................................... 161
4.5.19 Textual interconnections in the "Chart sequence & extras" editor ...................................... 164
4.6 Adapting the run sequence .............................................................................................. 166
4.6.1 Runtime model ................................................................................................................ 166
4.6.2 Options for determining the run sequence ....................................................................... 168
4.6.3 Adapting the run sequence within the CFC chart .............................................................. 171
4.6.4 Adapting the run sequence of CFC charts ......................................................................... 173
4.6.5 Optimizing the run sequence of CFC charts automatically ................................................. 174
4.7 Testing the CFC chart ....................................................................................................... 176

Configuring CFC charts


4 System Manual, 11/2023, A5E53466205-AA
Table of contents

4.7.1 Selecting parameters for testing....................................................................................... 176


4.7.2 Testing a CFC chart .......................................................................................................... 178
4.7.3 Effects of test mode on object properties ......................................................................... 181
4.7.4 Testing with the "Forcing" function .................................................................................. 183
4.7.5 Setting parameters to defined values for testing ("Forcing" function) ................................ 187
4.7.6 Setting several parameters to defined values with the "Forcing" function .......................... 189
5 Configuring and using the trend and dynamic displays.................................................................... 193
5.1 Overview of the trend and dynamic displays..................................................................... 193
5.2 Trend display - Functions and operating options ............................................................... 196
5.3 Creating a trend display ................................................................................................... 202
5.4 Using the trend display .................................................................................................... 204
5.5 Creating a dynamic display .............................................................................................. 206
5.6 Using the dynamic display................................................................................................ 208
6 Data types in CFC ............................................................................................................................... 209
6.1 Data types in the TIA Portal .............................................................................................. 209
6.2 Elementary data types ..................................................................................................... 209
6.2.1 Bit strings ........................................................................................................................ 209
6.2.1.1 BOOL (Boolean) ............................................................................................................... 209
6.2.1.2 BYTE ................................................................................................................................ 210
6.2.1.3 WORD .............................................................................................................................. 210
6.2.1.4 DWORD (Double Word) .................................................................................................... 211
6.2.1.5 LWORD (Long Word) ........................................................................................................ 211
6.2.2 Integers ........................................................................................................................... 212
6.2.2.1 Signed integers................................................................................................................ 212
6.2.2.2 Unsigned integers ............................................................................................................ 214
6.2.3 Floating-point numbers ................................................................................................... 216
6.2.3.1 REAL (Real Numbers) ....................................................................................................... 216
6.2.3.2 LREAL (Long Reals) .......................................................................................................... 216
6.2.4 Duration (Times) .............................................................................................................. 217
6.2.4.1 TIME ................................................................................................................................ 217
6.2.4.2 LTIME (Long Time) ........................................................................................................... 217
6.2.4.3 S5TIME ............................................................................................................................ 218
6.2.5 Point in time (Date and time) ........................................................................................... 219
6.2.5.1 DATE (Date) ..................................................................................................................... 219
6.2.5.2 TOD (Time of Day) ........................................................................................................... 219
6.2.5.3 LTOD (Long Time of Day) ................................................................................................. 220
6.2.5.4 DT (Date and Time of Day) ............................................................................................... 220
6.2.5.5 LDT (Long Date and Time) ................................................................................................ 221
6.2.5.6 DTL.................................................................................................................................. 221
6.2.6 Characters ....................................................................................................................... 222
6.2.6.1 CHAR (Single-Byte Character) ........................................................................................... 222
6.2.6.2 WCHAR (Double-Byte Character) ...................................................................................... 222
6.2.7 Parameter types ............................................................................................................... 223
6.2.7.1 TIMER .............................................................................................................................. 223
6.2.7.2 COUNTER......................................................................................................................... 224
6.3 Compound data types ...................................................................................................... 225
6.3.1 STRUCT ............................................................................................................................ 225

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 5
Table of contents

6.3.2 STRING ............................................................................................................................ 226


6.3.3 ARRAY ............................................................................................................................. 227
6.4 User-defined data types ................................................................................................... 229
6.5 Pointer ............................................................................................................................ 230
6.5.1 VARIANT .......................................................................................................................... 230
6.5.2 POINTER .......................................................................................................................... 231
6.5.3 ANY ................................................................................................................................. 232
6.6 System data types............................................................................................................ 233
6.7 Hardware data types ........................................................................................................ 233
7 Working with CFC charts for S7 ......................................................................................................... 235
7.1 CFC charts for S7 target systems ...................................................................................... 235
7.2 Blocks in CFC charts for S7 ............................................................................................... 236
7.3 Reserved number ranges for user blocks in CFC ................................................................ 241
7.4 "Chart sequence & extras" editor for S7 ............................................................................ 242
7.5 Importing blocks in CFC with S7 target system ................................................................. 244
7.6 Comparison and updating of imported blocks in CFC ........................................................ 248
7.7 Updating block types imported in CFC .............................................................................. 250
7.8 Searching for and managing block instances in CFC.......................................................... 253
7.9 Comparison status of CFC charts ...................................................................................... 255
7.10 Compiling CFC charts and downloading them for the S7 target system ............................. 256
7.10.1 Overview: Compiling and downloading CFC charts ........................................................... 256
7.10.2 Compiling CFC charts ....................................................................................................... 258
7.10.3 Downloading all CFC charts.............................................................................................. 259
7.10.4 Downloading modified CFC charts.................................................................................... 261
7.10.5 Downloading CFC charts to a test CPU .............................................................................. 263
7.11 Testing CFC charts in the S7 system ................................................................................. 265
7.12 Reading back parameter changes in CFC .......................................................................... 268
7.13 Inter-project engineering in CFC....................................................................................... 271
7.14 Multiuser Engineering in CFC ........................................................................................... 273
7.15 Connection to an HMI system .......................................................................................... 278
7.15.1 Connection of CFC charts to an HMI system...................................................................... 278
7.15.2 Tag connection in CFC ..................................................................................................... 279
7.15.3 Configuring alarms in CFC ................................................................................................ 281
7.16 OPC UA communication in CFC ........................................................................................ 283
7.17 CFC charts: Reference ...................................................................................................... 284
7.17.1 CFC tasks for S7 ............................................................................................................... 284
7.17.2 CFC Instructions for S7 ..................................................................................................... 286
7.17.2.1 Overview of CFC instructions ........................................................................................... 286
7.17.2.2 EN and ENO parameters................................................................................................... 288
7.17.2.3 CFC instructions: Basic instructions .................................................................................. 289
7.17.2.4 CFC instructions: Extended instructions ............................................................................ 365

Configuring CFC charts


6 System Manual, 11/2023, A5E53466205-AA
Table of contents

7.17.2.5 CFC instructions: Communication .................................................................................... 370


8 CFC Charts (Export/Import) ................................................................................................................ 373
8.1 Export/Import of CFC charts ............................................................................................. 373
8.2 TIA Portal project view: Exporting and importing CFC charts ............................................. 375
8.3 Exporting CFC charts ........................................................................................................ 377
8.4 Exporting only selected CFC charts ................................................................................... 379
8.5 Importing CFC charts ....................................................................................................... 381
8.6 Setting a password for CFC charts .................................................................................... 383
8.7 Reading the password from CFC charts............................................................................. 385
8.8 Changing a password for CFC charts................................................................................. 387
8.9 Removing a password from CFC charts ............................................................................. 389
Index .................................................................................................................................................. 391

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 7
Table of contents

Configuring CFC charts


8 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme 1
1.1 Cybersecurity information
Siemens provides products and solutions with industrial cybersecurity functions that
support the secure operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats,
it is necessary to implement – and continuously maintain – a holistic, state-of-the-art
industrial cybersecurity concept. Siemens’ products and solutions constitute one
element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems,
machines and networks. Such systems, machines and components should only be connected
to an enterprise network or the internet if and to the extent such a connection is necessary
and only when appropriate security measures (e.g. firewalls and/or network segmentation)
are in place.
For additional information on industrial cybersecurity measures that may be implemented,
please visit
https://www.siemens.com/global/en/products/automation/topic-areas/industrial-
cybersecurity.html.
Siemens’ products and solutions undergo continuous development to make them more
secure. Siemens strongly recommends that product updates are applied as soon as they
are available and that the latest product versions are used. Use of product versions that
are no longer supported, and failure to apply the latest updates may increase customer’s
exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Cybersecurity
RSS Feed under
https://new.siemens.com/global/en/products/services/cert.html.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 9
STEP 7 CFC Readme
1.2 Scope of delivery for SIMATIC STEP 7 CFC

1.2 Scope of delivery for SIMATIC STEP 7 CFC


The scope of delivery includes:
• SIMATIC STEP 7 CFC V19

Configuring CFC charts


10 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.3 What's new in SIMATIC STEP 7 CFC in TIA Portal V19?

1.3 What's new in SIMATIC STEP 7 CFC in TIA Portal V19?

Stability and performance


With SIMATIC STEP 7 CFC V19, further improvements have been made to the stability
and performance.
Overview of important performance improvements:
• Configuring of CFC charts
• Editing of CFC charts in groups
• Compiling and downloading of CFC charts
• Opening of CFC charts in runtime

CFC tag interconnections


The new list of CFC tag interconnections in the "Chart sequence & extras" editor
supports you in searching for interconnected operands.
As in the cross-reference list, you can filter and sort the list of interconnected tags and
global data blocks.

TIA Portal Openness: Exporting and importing CFC charts


Stability and performance when exporting and importing CFC charts have been improved.

Changed icon: Add input parameters


In the "Data flow" tab of the CFC editor, you can add additional input parameters
at a block instance with a mouse click.
The icon for this has been adapted to be consistent with the representation in other editors
of the TIA Portal:
• Icon up to CFC V18:
• New icon as of CFC V19:

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 11
STEP 7 CFC Readme
1.3 What's new in SIMATIC STEP 7 CFC in TIA Portal V19?

CFC editor: Additional functions


Screen resolution:
• Support for high-resolution screen settings
Zoom function in the data flow:
• When you zoom in on the view, the input boxes for editing interconnection paths
are also zoomed in on.
The font size remains the same, so that the boxes provide more space for editing
long interconnection paths.
Highlighting of interconnections:
• The color highlighting of connected and unconnected interconnections has been
optimized.
Sheet bar view:
• To adapt the width of fixed sheet bars to the text length of the interconnections,
double-click the boundary line of the sheet bar.
Opening a CFC chart:
• When you close a CFC chart after editing and then reopen it, the preceding settings,
e.g. zoom factor and position of scroll bar, are applied.

See also
Basics of CFC (Page 25)
Export/Import of CFC charts (Page 373)
General information about SIMATIC STEP 7 CFC (Page 17)
Notes on exporting/importing CFC charts (TIA Portal Openness) (Page 23)
CFC charts for S7 target systems (Page 235)
Displaying points of use of interconnections (Page 153)

Configuring CFC charts


12 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.4 System requirements for SIMATIC STEP 7 CFC

1.4 System requirements for SIMATIC STEP 7 CFC

Hardware requirements
• Requirements of TIA Portal V19

Software requirements
• TIA Portal V19

Supported systems
CFC in the TIA Portal supports CPUs of the following product groups.
Requirement:
• Firmware version ≥ V2.8

Advanced Controllers
• Standard CPUs
• Technology CPUs
• Fail-safe CPUs 1)
• Fail-safe technology CPUs 1)
• Redundant CPUs 2)
1) Only with deactivated fail-safe functionality.
2) In the compatibility tool you find detailed information on which CPUs are supported.

Distributed Controllers
• ET 200SP CPUs
• Fail-safe ET 200SP CPUs 1)
1) Only with deactivated fail-safe functionality.

Software Controllers
• Standard CPUs:
– CPU 1507S
– CPU 1508S

Restrictions
• STEP 7 Safety and F-CPUs with enabled F-function are not supported.
You can use either CFC or the fail-safe functionality on a CPU.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 13
STEP 7 CFC Readme
1.4 System requirements for SIMATIC STEP 7 CFC

Compatibility tool
With the compatibility tool, Industry Online Support gives you a function you can use to
put together a compatible selection of software products or to check existing configurations
for compatibility.
In the following entry you can call the compatibility tool and find additional information
on the operation of the tool:
• Internet: "Compatibility Tool for Automation and Drive Technology" (entry ID: 64847781)
(https://support.industry.siemens.com/cs/ww/en/view/64847781)

See also
CFC charts for S7 target systems (Page 235)

Configuring CFC charts


14 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.5 SIMATIC STEP 7 CFC licensing

1.5 SIMATIC STEP 7 CFC licensing


For CFC, you need an engineering license as well as runtime licenses for each CPU.

License types

Engineering license
A license key must be installed on the PC to configure CFC charts.

Runtime licenses
You need a license key for each PLC.
Depending on the number of instance data blocks which are created during configuration
with CFC, you either need a limited or unlimited license:
• A limited license allows you to create a limited number of instance DBs and load them
to the PLC.
• With an unlimited license, you can create and upload an unlimited number of
instance DBs.
You can find information on the instance DBs in the "Chart sequence and extras" editor
in the "Statistics" tab. The number of instance DBs is displayed which have been created
in all CFC charts under the PLC.
More information in the TIA Portal Information System:
• "Configuring technologically > Configuring CFC charts > Working with CFC charts for S7 >
"Chart sequence & extras" editor for S7 (Page 242)"

Trial license
If you do not have a valid license, the system alerts you that you are working
in a non-licensed mode.
You have the one-time option of activating a Trial License.
However, this Trial License is valid for a limited period only and expires after 21 days.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 15
STEP 7 CFC Readme
1.5 SIMATIC STEP 7 CFC licensing

Licenses for SIMATIC STEP 7 CFC V19.0

License Display in the Comment


Automation
Licence Manager
SIMATIC STEP 7 CFC V19.0 SIMATIC STEP 7 CFC Trial license
Software Media Package Advanced 19.0 The license is already included in
the TIA Portal installation.
SIMATIC STEP 7 CFC 19.0 Advanced SIMATIC STEP 7 CFC Engineering license
Engineering Advanced 19.0
SIMATIC STEP 7 CFC Runtime CPU - Runtime license:
(limited)
• Unlimited runtime
• Limited number of instance DBs
SIMATIC STEP 7 CFC Runtime CPU - Runtime license:
(unlimited)
• Unlimited runtime
• Unlimited number of instance
DBs

More information

Online catalog (Industry Mall)


• Internet: "STEP 7 (TIA Portal) options: STEP 7 CFC (TIA Portal)"
(https://mall.industry.siemens.com/mall/en/WW/Catalog/Products/10414342?tree=Catalog
Tree)

TIA Portal Information System


• "Installation > Licensing"

Automation License Manager (ALM)


To open the manual, in the Windows program group "Siemens Automation", select the entry
"Documentation".
The "Manuals" folder contains the link to the manual in the respective language folder.

See also
CFC charts for S7 target systems (Page 235)

Configuring CFC charts


16 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

1.6 General information about SIMATIC STEP 7 CFC

Content
The information in this Readme file supersedes statements made in other documents.
• Important information on product properties
• Information that could no longer be included in the online help.
Read the following notes carefully because they include important information for installation
and use.
Read these notes prior to installation.

TIA Portal projects: Restrictions


The following functions are not supported when using CFC in the TIA Portal:
• Software units
Do not create software units on controllers for which CFC charts are configured.
The configuration of software units can lead to the TIA Portal project no longer being
compiled for this controller.
• UMAC-protected projects
• Downloading blocks generated by CFC from the device
• Load CFC charts on memory cards
• Interconnect PLC tags with complex data types

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 17
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

Global data blocks in CFC


To improve performance, create the block structure for global data blocks according to
TIA Portal recommendations.
More information:
• Industry Online Support: "How do you efficiently and effectively program for the
S7-1200/S7-1500 in STEP 7 (TIA Portal)?"
(https://support.industry.siemens.com/cs/ww/en/view/67582299)
• Industry Online Support: "Programming Guidelines and Programming Styleguide
for SIMATIC S7-1200 and S7-1500"
(https://support.industry.siemens.com/cs/ww/en/view/81318674)

CAUTION
Avoid changing the structure
When interconnecting global data blocks in CFC, the following constraints apply:
• Avoid subsequent modification of interconnected global data blocks.
• Avoid changing the structure of global data blocks.
Loading after a structure change causes the PLC to stop.
Download of changes during operation is not possible.

Password: No authorization, no know-how protection of the charts


To protect a CFC chart or hierarchical CFC chart from unintentional editing, you can protect
the chart with a password.

NOTICE
Activating password for CFC chart
The password serves only to protect a CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Instructions: "LBCFC" library for download


The "LBCFC" block library supplements the instruction library installed with SIMATIC STEP 7
CFC V17.
More information:
• Industry Online Support: SIMATIC STEP 7 CFC V17 - "LBCFC" block library (ID 109800972)
(https://support.industry.siemens.com/cs/ww/en/view/109800972)

Configuring CFC charts


18 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

Instructions: No version update


Always use the current version of the application library.
After the first import of an instruction in CFC you can no longer change the version.
All further instances of the instruction are created with the same version.
When you change an instruction version in the library later, the instruction is marked
as "not supported" with an asterisk.

GRAPH blocks: Using only in a block shell


You cannot insert GRAPH blocks as instances in a CFC chart. Any change of a GRAPH block
would then eliminate the ability to perform an online delta download and would require
a complete download in CPU Stop.
To work with a GRAPH block in CFC, create an organization block (OB) that uses a GRAPH
block.
Even if you change and re-initialize the GRAPH block, you can then update the CPU in runtime
using a delta download.
Using an FB as a call block
If, for example, a GRAPH block affects the CFC run sequence, create a function block (FB)
as a "call block" that calls an instance of the GRAPH block.
If input parameters and output parameters have been configured at the call block,
you can pass these values to the called instance of the GRAPH block.
Ensure that the interface of the GRAPH block is no longer changed. Interface changes
eliminate the ability to perform an online delta download.
Procedure:
1. Create a GRAPH block.
2. To create an instance of the GRAPH block, create a new data block (DB).
3. Select the GRAPH block as "Type".
4. Create a function block (FB) as call block.
5. In the FB, configure the call of the DB that you have created as the GRAPH instance.
6. To exchange values with the called GRAPH instance, configure the corresponding
input parameters and output parameters at the FB.
7. Drag the FB into your CFC chart.
The FB instance in the CFC chart gives you access to the called instance of the
GRAPH block.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 19
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

Data types

Data types supported to a limited extent


The following data types of the S7-1500 are supported to a limited extent:
• ARRAY
All data types are permitted for the ARRAY components, except:
– ARRAY
– Reference data types:
Pointer: ANY, POINTER, VARIANT
Parameter types: COUNTER, TIMER
More information in the TIA Portal Information System:
"Configuring CFC charts > Data types in CFC > Compound data types > ARRAY (Page 227)".
• VARIANT
No blocks with output parameters of the VARIANT data type

Unsupported data types


The following data types of the S7-1500 are not supported:
• WString
Exception: The WString data type is used with OPC UA.
• Block_FB
• Block_FC

Functions with standard access and input parameters of type "ARRAY"


Functions (FC) are not supported in SIMATIC STEP 7 CFC V19 when the following conditions
are met:
• No optimized access
• No type-safe addressing
• One or more input parameters are of type "ARRAY".
The non-type-safe programming of FCs with standard access that have input parameters
of type "ARRAY" will be supported again in the next version of SIMATIC STEP 7 CFC.
If necessary, install the CFC V19 updates.

Type-safe data block with elements of type "ARRAY": Do not change access mode
Avoid changing the access mode to standard access for type-safe data blocks with
optimized access that are linked to a function (FC) via the "ARRAY" data type.
If necessary, create a new, non-type-safe block without optimized access and relink
the parameters.

Configuring CFC charts


20 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

Do not change internal CFC blocks


CFC creates system blocks that are displayed in a number of views or lists, for example,
under "Program information".
You may not change these objects.
Only edit your own blocks and instructions using the STEP 7 editors.

Redundant CPUs: Downloading changes


You can only download changes in CFC to the redundant CPU that was also used for the
previous download. The time stamps are compared internally for this purpose.
Take this special feature into account, especially when switching over the redundant partner
and when using the "Download to backup CPU" function.
"Download to backup CPU"
Once you have executed the "Download to backup CPU" function, you can no longer
download the changed CFC data to the primary CPU. After loading the backup CPU,
the primary CPU has an outdated time stamp.
To download CFC changes, switch the roles of the primary CPU and backup CPU.
More information in the TIA Portal information system:
• "Editing devices and networks > Configuring devices and networks >
Creating configurations > Configuring automation systems >
Principle of operation of S7-1500R/H CPUs > Loading an S7-1500R/H CPU >
Downloading project data to the backup CPU"

Full compilation: Reinitialization of runtime values


When you perform a full compilation of the CPU, a subsequent delta download may result
in reinitialization of runtime values, e.g. in instances of functions (FCs).
However, the runtime values are retained in instances of function blocks (FBs).

Deleting CFC charts and disabling CFC


When you delete all CFC charts, the option "SIMATIC STEP 7 CFC" remains active in the
TIA Portal.
Downloading to the PLC therefore causes the project to be saved.
To disable CFC in the TIA Portal, delete all CFC components:
1. Select the entry "Charts" in the project tree.
2. Select the "Delete" entry from the shortcut menu and confirm with "OK".
The full contents of the "Charts" folder are deleted.
3. To re-enable the "CFC" option, double-click the entry "Add new chart" under "Charts".

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 21
STEP 7 CFC Readme
1.6 General information about SIMATIC STEP 7 CFC

Tooltips in the sheet bar: Avoid overlaps


Tooltips may show the complete interconnection path for interconnections in the sheet bar
of the data flow.
These tooltips can impede editing of the interconnection path because they are shown over
the text box.
To avoid this behavior when editing long interconnection paths, increase the zoom factor
for the view of the CFC chart to over 100%.
This also zooms in on the input boxes in the chart and in the sheet bar. At 200%, input boxes
in the sheet bar are enlarged up to the edge of the area.
The text size in the input box is not affected by the zoom factor. The larger input boxes
therefore allow convenient editing of even long interconnection paths.

Disabling tooltips
Alternatively, disable tooltips in the TIA Portal settings:
• "General > General settings > Tooltips: Show truncated texts completely"

See also
Notes on exporting/importing CFC charts (TIA Portal Openness) (Page 23)

Configuring CFC charts


22 System Manual, 11/2023, A5E53466205-AA
STEP 7 CFC Readme
1.7 Notes on exporting/importing CFC charts (TIA Portal Openness)

1.7 Notes on exporting/importing CFC charts (TIA Portal Openness)

Notes on CFC Openness applications

Openness: "filter" parameter


The "filter" parameter is not evaluated during export and import in the current CFC version
and has no function.

Openness: Error message when importing


If the import using the TIA Portal Openness API is aborted with an error message regarding
the work memory, check the work memory on the PC.
If necessary, increase the work memory according to the hardware requirements for
large projects:
• RAM: 32 GB for large projects

See also
General information about SIMATIC STEP 7 CFC (Page 17)
Export/Import of CFC charts (Page 373)
Industry Online Support: "SIMATIC Process Control System PCS 7 Help on data transfer dialog"
(https://support.industry.siemens.com/cs/ww/en/view/109812471)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 23
STEP 7 CFC Readme
1.7 Notes on exporting/importing CFC charts (TIA Portal Openness)

Configuring CFC charts


24 System Manual, 11/2023, A5E53466205-AA
Introduction and basics 2
2.1 Basics of CFC

What is CFC?
"CFC" stands for "Continuous Function Chart".
With CFC, you create user programs by simple placement, parameter assignment and
interconnection of instructions and blocks in the CFC charts.
You use extensive libraries with premade instructions and blocks. This means that
instructions and blocks do not need to be programmed. The likelihood of errors is reduced.
The "CFC" editor supports you with these functions when creating the user program:
• Automatic creation of the user program for all CFC charts
• Transfer of the user program to the device of the target system

Using CFC
You use CFC in particular for process engineering or structured automation solutions.
You interconnect, for example, blocks you have created yourself or instructions supplied by
CFC with the operands of your target system.
With the help of a CFC chart, even a complex user program remains clearly laid out.
You can monitor process values as well as input and output parameters of the instructions
and blocks online for testing.

See also
Type and instance (Page 29)
Configuration options for CFC charts (Page 26)
Overview for configuration of CFC charts (Page 63)
"CFC" Editor (Page 45)
Basic settings for CFC charts (Page 43)
Icons in CFC (Page 53)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 25
Introduction and basics
2.2 Configuration options for CFC charts

2.2 Configuration options for CFC charts

Configuring CFC charts


In the "CFC" Editor, you configure the CFC charts either graphically by dragging and dropping
with the mouse or textually in the form of a list.
You can change from one configuration method to the other at any time with no restrictions.
When you create user programs with CFC, we recommend that the block programming is
complete and that the block types are no longer changed.

Graphic configuration of CFC charts in "Data flow" mode


When you configure graphically in "data flow" mode, you insert instructions and blocks in the
CFC chart from a library, for example.
You interconnect the input and output parameters with drag-and-drop, via a mouse click or
by using a keyboard shortcut and click.
To document the CFC chart, you use text boxes.
The advantages of graphic configuration compared with textual configuration are as follows:
• Simple wiring of input and output parameters using drag-and-drop, a mouse click,
or a keyboard shortcut
• Graphic representation of the signal path
• Outline of complex charts in chart partitions

Textual configuration of CFC charts in "Control flow" mode


With the textual configuration method in "Control flow" mode, you insert the instructions and
blocks in a list.
The input and output parameters are not interconnected graphically, but you will assign
values to the parameters.
The advantages of textual configuration compared with graphic configuration are as follows:
• Simple adaptation of the run sequence
• Simple parameter assignment

See also
Basics of CFC (Page 25)
"CFC" Editor (Page 45)

Configuring CFC charts


26 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.3 Instructions and blocks

2.3 Instructions and blocks


With CFC, you create user programs by simple placement, parameter assignment and
interconnection of instructions and blocks in the CFC charts.
When you create user programs with CFC, we recommend that the block programming
is complete and that the block types are no longer changed.

Distinction between instructions and blocks


The designation depends on how they are created and the target system, for example.

Instructions
Instructions are predefined, basic functions, such as logic operations and arithmetic
functions.
Instructions are program components of CFC and are available in the "Instructions" task card.

Blocks
You can create blocks yourself or use predefined blocks from the library.
• Function blocks (FB):
Function blocks are code blocks that store their values permanently in instance data
blocks.
The values are still available after the block has been processed.
The data are available and accessible during processing across multiple cycles.
• Functions (FC):
Functions contain program routines for recurring tasks.
They have no data memory in which values of block parameters can be stored.
Therefore, when a function is called, all formal parameters must be assigned actual
parameters. A data block is not required.
You can also interconnect the parameters of function blocks and functions with elements of
global data blocks.

Blocks for the S7 target system


There are other block types in the S7 target system.
Additional information: "Working with CFC charts for S7 > Blocks in CFC charts for S7"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 27
Introduction and basics
2.3 Instructions and blocks

Properties of instructions and blocks


There are additional terms associated with instructions and blocks:

Type and instance


• A type is a reusable, pre-defined block.
The block can be provided in a library or you can create it yourself.
• An instance is a use of a type, for example, in the CFC chart.
Additional information: "Type and instance (Page 29)"

Generic instructions
The number of inputs is variable in generic instructions and can be changed in the CFC chart,
for example, AND logic operation.
Additional information: "Adding or removing input parameters (Page 148)"

Family
The instructions/blocks are grouped according to their function characteristics, the instruction
or block families, e.g. CONVERT.

Configuring CFC charts


28 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.4 Type and instance

2.4 Type and instance

Type-instance concept
Configuration in CFC is made easier by using types or their instances.
A block type is a reusable, pre-defined function that you yourself create or copy
from a library.
You create a block instance by inserting a block type into a CFC chart.
The advantage of this type-instance concept is that you can implement any central change
of the type at a later time at all instances.

Type
A type can be defined by the following options:
• When inserting a block from the "Program blocks" folder in the project tree into a
CFC chart.
The block in the "Program blocks" folder is imported into CFC and defined as type.
The "copy" in the CFC chart is an instance of this type.
• A block that you want to define as type is saved in one of the libraries.
This can be a block from the "Program blocks" folder, for example, or from a CFC chart.
If this saved block is added to a CFC chart from the library, the block is imported in CFC
and defined as type.
The "copy" in the CFC chart is an instance of this type.
A type can already be defined as supplied block in a library.
Central type change
When you change the type, you can update the instances of this type in all CFC charts of a
target system.
Additional information: "Central change of a type (Page 116)"

Note
Delete block type: Check instances
First delete the instances followed by the block type.
If you delete a type of which an instance still exists, then you will no longer be able to
compile the CFC charts of this target system.
You may find the information on the missing block types in the alarms of the Inspector
window or in the "Chart sequence & extras" editor.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 29
Introduction and basics
2.4 Type and instance

Instance
An instance is the use of a type in the CFC chart.
You can create any number of instances from a type.
Within a CFC chart, each instance has a unique name. The instance name consists of the
name of the CFC chart in which the instance is located, the name of the type and the instance
number.
The instance normally inherits the defaults of the type, for example, the default values of the
parameters.
During configuration, you can enter individual initial values, change the instance name and
interconnect the input and output parameters.

See also
Adding an instruction or block to the CFC chart (Page 109)
Updating instances of a changed block type (Page 120)
Creating a block type for CFC (Page 122)

Configuring CFC charts


30 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.5 Hierarchical CFC charts

2.5 Hierarchical CFC charts


You can create CFC charts in hierarchical structures.
In doing so, you add one or more CFC charts as "subcharts" into a "basic chart".

Nesting depth
A subchart can contain additional subcharts so that you are creating a nested hierarchy.
Maximum nesting depth of hierarchical CFC charts:
• 8 hierarchy levels:
Basic chart + 7 subcharts

Managing hierarchical CFC charts


When inserting a CFC chart as subchart, a copy of the inserted chart is created under the basic
chart.

Editing subcharts
The original, added CFC chart and the newly created subchart are edited independently of
one another.
Changes in the subchart do not affect the originally inserted CFC chart and vice versa.

Copying or moving subcharts


The hierarchical CFC charts can be handled like blocks.
You can copy or move subcharts within a chart or to another basic chart.
If the selected subchart contains additional subcharts, these are copied or moved as well.

Deleting hierarchical charts


When you delete a CFC chart that was inserted as subchart, the subchart is retained.
When you delete a subchart that contains additional subcharts, these charts are deleted as
well.

Replacing subchart
You can replace a hierarchical CFC chart with a different hierarchical CFC chart.
If possible, the existing interconnections are retained.
The position in the run sequence is not changed.
Additional information: "Replacing hierarchical CFC charts (Page 90)"

Changing layers
You can elevate a subchart to the root level in the "Charts" folder.
In this case, however, the chart interface may not have an external interconnection.
Additional information: "Moving subcharts to the root level (Page 91)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 31
Introduction and basics
2.5 Hierarchical CFC charts

Representation in the project tree


Hierarchical charts are displayed in the project tree in the "Charts" folder.
A basic chart is indicated using a folder icon.
The actual basic chart and all subcharts are displayed in this folder. When a subchart contains
additional subcharts, this subchart is also displayed as a directory.
To open a basic chart, double-click the "Chart" icon below the chart name:

Example

The chart "CFC_2" is a basic chart that contains the subcharts "CFC_1", "CFC_2", "CFC_2_1",
"CFC_2_2" and "CFC_4".
The subchart "CFC_2_1", in turn, is the basic chart for the contained subcharts "CFC_2_2" and
"CFC_4".
The subcharts called "CFC_4" were created as independent copies by inserting the chart
"CFC_4". To avoid confusion, assign meaningful names to the subcharts.

Configuring CFC charts


32 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.5 Hierarchical CFC charts

Visualization of the subcharts in the basic chart


A subchart is visualized in a higher-level chart similar to a block with "subchart header" and
"chart interface".
However, a different icon is used in the "subchart header".
The following figure shows a section of the subchart "CFC_2_1" that is included in the basic
chart "CFC_2".
The subchart "CFC_2_1" contains the subcharts "CFC_4" and "CFC_2_2":
• Only the standard parameter EN exists at the subchart "CFC_4".
• The parameters that are defined in the chart interface are displayed in the subchart
"CFC_2_2".

Navigation within the hierarchy


The following navigation options are available in the CFC charts:
• Navigation "down":
– With double-click on the subchart icon.
– Select the subchart icon and execute the "Open" menu command from the shortcut
menu.
• Navigation "up":
– Execute the "Open parent chart" from the shortcut menu in the opened subchart.
– Double-click a sheet bar entry that contains an interconnection to the interface of this
subchart.
Use the entry "Back" in the shortcut menu to jump back to the last selected parameter.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 33
Introduction and basics
2.5 Hierarchical CFC charts

Interface of the CFC chart


Hierarchical CFC charts and standard CFC charts have an interface structure that is similar to
that of blocks. This means that these CFC charts can be configured and interconnected
externally similar to blocks.
The chart interface is displayed in the top area of the data flow and control flow section in the
"CFC" editor. When the "Interface" area is hidden, enlarge the area with the mouse or click the
unhide icon:
New parameters can be added, modified or deleted in the Input, Output, InOut sections of
the chart interface.
Interconnections of interface parameters with blocks within the CFC chart are displayed in the
sheet bar of the chart with connectors.
Additional information:
• "Adding, editing and sorting parameters of the chart interface (Page 92)"
• "Interconnections to parameters of the chart interface (Page 144)"

Jump to the interconnected parameter


The shortcut menu of a parameter at the subchart icon contains the menu command "Track
signal".
The menu command "Track signal" opens the subchart and selects the interconnected
parameter of the block.
You use this command to track the signal from the chart interface into the inside of the chart.
If multiple parameters are interconnected, select the required parameter from the shortcut
menu.
Use the entry "Back" in the shortcut menu to jump back to the last selected parameter.

Configuring CFC charts


34 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.5 Hierarchical CFC charts

Interconnections in a hierarchical CFC chart


You configure the interconnections in a hierarchical chart via the chart interface or directly to
blocks in the chart.
When you move a block with an interconnection to the chart interface to a different CFC
chart, the existing interconnection to the interface is deleted.
The following rules apply to interconnections between the parameters in the block and in the
chart interface:
• You can only interconnect parameters from the same section of the chart and block
interfaces.
Example: An Input parameter of the chart interface is interconnected with an Input
parameter at the block.
Alternatively, you can interconnect the Input parameter of a block with an InOut
parameter of the chart interface.
• The data types of the interconnected parameters and of the blocks are subject to the same
conditions.
On the S7 target system, it is not possible to interconnect individual elements of a STRUCT
parameter type with the chart interface.
• Interface parameters of the Output type cannot be configured directly.
Enter the value at the interconnected output parameter.

Run sequence
• The run sequence of the blocks is bound to the CFC chart.
Hierarchical CFC charts can be handled like objects within the run sequence.
• Subcharts inherit the task assignment of the basic chart by default.
If a subchart that has further subcharts has a different task assignment, this different task
assignment is inherited by all child subcharts.
• The "Reduction ratio" and "Phase shift" functions are only available for basic charts.
The subcharts are called in the run sequence in accordance with their associated basic
chart.
• The "Enable chart" function is available for subcharts.
Requirements for processing the lower-level subcharts:
– The "Enable chart" setting is also set in the basic chart.

See also
Creating a subchart for a hierarchical CFC chart (Page 88)
Overview of textual interconnections (Page 158)
Managing CFC charts and groups (Page 77)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 35
Introduction and basics
2.6 Protection from unintentional access to CFC charts

2.6 Protection from unintentional access to CFC charts

Overview
To protect a CFC chart or hierarchical CFC chart from unintentional editing, you can protect
the chart with a password.
The contents of the CFC chart can only be viewed after the correct password has been
entered.

NOTICE
Password: No authorization, no know-how protection of the charts
The password serves only to protect a CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Principle
You will be asked for the password when you open the CFC chart.
The password-protected CFC chart can be handled as normal as long as it remains open in the
editor.
Once password protection has been set, the current password must be entered to change or
remove the password.

Hierarchical charts
Setting or removing a password for a basic chart does not affect the passwords of subcharts.
If subcharts are password-protected, you will need to enter the password again when you
open these charts.
As soon as a password is assigned to a basic chart, the behavior changes:
• As long as the basic chart is closed, the hierarchical view remains hidden in the project
tree
• For subcharts which do not have their own password, the "Access protection" entry in the
shortcut menu is hidden.
The "Protection" button is disabled in the chart properties.
To protect one of the subcharts from unintentional editing, open the subchart. In the
project tree, the "Access protection" entry is displayed in the shortcut menu of the
subchart. The "Protection" button is enabled in the chart properties.

Configuring CFC charts


36 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.6 Protection from unintentional access to CFC charts

Properties of a CFC chart with password protection


Without a valid password, you only have limited access to the chart:
• The content of charts and subcharts is not visible.
• References to chart contents via direct object selection with the mouse or text input are
not possible.
• Compiling and loading is possible without entering a password.
• During a type update, instances in password-protected charts are also updated.
Password input is not necessary for this.
• You can copy the chart without entering the password.
The copied chart has the same password, however.
• The display of the chart properties in the Inspector window is limited.
Users can only change the name and comment.
All other properties are either not visible or cannot be changed.
• The chart interface is displayed as read-only.
The following parameter assignments can be applied:
– Value
– "Invisible" property
– Test settings
– External interconnections to the chart interface
• The printout comprises only the chart interface and the limited information on the chart
properties.

More information
• Activating password for a CFC chart (Page 82)
• Changing or deactivating password for a CFC chart (Page 83)
• Opening a password-protected CFC chart (Page 85)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 37
Introduction and basics
2.7 Multilingual texts in CFC

2.7 Multilingual texts in CFC

Multilingual
The following languages are present in a project:
• Editing language
Each project has an editing language.
Any text you enter is always created in the editing language.
• Project language
Project languages are all languages in which a project will later be used.
Based on the editing language, all texts can be translated into the various project
languages.
Editing language and project languages are configured in the project tree folder
"Languages & resources" > "Project languages".

Note
User interface
The language of the user interface does not depend on the editing and project language.

Multilingual texts in CFC


You can manage the following types of text in CFC in several languages:
• Comments from:
– CFC chart
– Instance
– Parameters
• Text block
You enter these texts in the "CFC" editor when you create the CFC chart in the editing
language.
These texts are then translated into the required project languages in the project text editor
of the TIA Portal.

Configuring CFC charts


38 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.7 Multilingual texts in CFC

Translating texts
There are different ways of translating texts:
• Translating texts directly
You can enter the translations for the individual project languages directly in the
"Project texts" table.
• Translating texts using reference texts
For smaller amounts of text, you can change the editor language.
All the text cells are filled again with the default values and can be filled in the
current language.
More information in the information system of the TIA Portal:
• "Editing project data > Working with multi-language projects"

User interface language: Installing language packs


You can install additional interface languages using TIA Administrator:
1. Install the TIA Portal language packs for the desired user interface languages.
2. Select the tiles for the "SIMATIC STEP 7 CFC" language pack.
3. Load and install the CFC language pack for the installed TIA Portal user interface languages.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 39
Introduction and basics
2.8 Copying objects

2.8 Copying objects

Copy and paste


You can copy within the TIA Portal either by dragging with the mouse or using the "Copy" and
"Paste" commands.
If you want to copy an object in the same area by dragging it with the mouse, you can do this
by holding down the <Ctrl> key.
All selected objects are copied.

Copying objects within a device


If you copy one or more objects within a device, the copies are numbered in ascending order.
If an object with this naming convention already exists, this number is skipped.

Example:
The chart folder contains the objects "Tag", "Tag_1" and "Tag_34".
If you copy "Tag", the copy is given the name "Tag_2".
If you copy "Tag_34", the copy is given the name "Tag_3".

Copying objects to a different device


If you copy one or more objects to a different device, the object names are not changed.
If there is already an object with the same name at the destination location, you will be
prompted to decide what to do.

Copying objects to a different project


To copy objects from one project to another, open the second project in a second instance of
the TIA Portal.
When you copy, the principles are the same as when copying to a different device.

Moving objects
To move objects from one project to another, copy the objects.
Then delete the source object manually.

See also
Copying instructions, blocks and charts (Page 107)
Overview of textual interconnections (Page 158)

Configuring CFC charts


40 System Manual, 11/2023, A5E53466205-AA
Introduction and basics
2.9 CFC naming conventions

2.9 CFC naming conventions

Permitted characters
Special characters and umlauts are allowed in chart names and in instruction names.
However, to avoid compatibility problems, only use the following characters:
• Characters from "a" to "z"
• Numbers from "0" to "9"
• Underscore "_" for separation

Control characters for path and hierarchy information


There are control characters reserved for path and hierarchy information and that are used,
for example, in "control flow" or in connectors.
The control characters are relevant only for path and hierarchy information. Outside this
context, the control characters are interpreted as permitted parts of a name.
The following table shows the reserved control characters:

Control character Explanation


Dot . Reserved for path and hierarchy information.
Slashes / and \ • The dot indicates parameters at instructions/blocks.
• The slash represents hierarchical relationships.
Example:
The expression "Chart_1\Block_1.IN_1" addresses the input parameter "IN_1"
of the instruction "Block_1" in chart "Chart_1".
Quotes " Reserved for starting and completing a character string.
Percent sign % Reserved for starting address ranges.
Dollar sign $ Reserved as the escape character.
The control character following this is interpreted as a permitted character.

Control characters as parts of names


If you edit chart and instruction names with control characters in the path or hierarchy
information, use the following syntax:
• Enter the name in quotes.
Example:
– "Motor1.Temperature"
• Precede the control character with the escape character $.
Example:
– Motor1$.Temperature

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 41
Introduction and basics
2.9 CFC naming conventions

Example
In the CFC chart "TempControl", the "Motor1.Temperature" instruction is configured for
temperature control of a motor.
The naming convention of the plant owner defines the dot as a separator.
To address the output parameter "OUT" of the instruction in "control flow", the following
notations are permitted:
• TempControl\"Motor1.Temperature".OUT
• TempControl\Motor1$.Temperature.OUT

Configuring CFC charts


42 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings 3
3.1 Basic settings for CFC charts
The basic settings of CFC charts refer to all charts that you have configured in a target system.

Default settings for new charts


You define the basic settings for new charts in the "Options > Settings > Charts" menu.
You can change the properties of each CFC chart at any time regardless of the basic settings.

Basic settings
The following settings are specified when you create new charts:
• Independent of the target system:
– Color of interconnection lines
• Dependent on the target system:
– Appearance of the CFC charts, e.g. sheet bar settings and layout
– If necessary, additional settings, such as the reserved number ranges for user blocks

Changing basic settings


Changes to the basic settings only affect newly created CFC charts.
Existing CFC charts remain unchanged.

Task assignment of CFC charts


Newly created CFC charts have an assigned main task.
Depending on the target system, you change this task assignment in the
"Chart sequence & extras" editor.
Additional information: "Runtime model (Page 166)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 43
Elements and basic settings
3.1 Basic settings for CFC charts

Representation of the CFC chart in the editor


If you adapt the zoom factor or the representation of the grid lines in a CFC chart,
these changes apply to all CFC charts you open from this point onwards.
This behavior also applies following a program restart.

Zoom function in the CFC chart


You zoom in the CFC chart with the <Ctrl> key and the mouse wheel.
The zoom focuses on the position of the mouse pointer.
Alternative zoom options:
• Keyboard shortcuts <Ctrl+"+"> and <Ctrl+"-">
• Zoom scale at the bottom of the editor window
• % entry or selection in the drop-down list
Position: in the toolbar or next to the zoom scale

See also
Adding an instruction or block to the CFC chart (Page 109)
Printing a CFC chart (Page 79)
CFC views (Page 66)
Extending a CFC chart (Page 72)
"Chart sequence & extras" Editor (Page 49)
Basics of CFC (Page 25)

Configuring CFC charts


44 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.2 "CFC" Editor

3.2 "CFC" Editor


In the "CFC" Editor, you configure CFC charts graphically or as a list.
The two configuration methods have the same priority.
You can change from one configuration method to the other at any time.

Open "CFC" editor


You open the "CFC" editor for the first time by adding a new chart.
1. Open the "Charts" folder in the "Project tree".
2. Double-click "Add new chart".
A new CFC chart is created and opened in the editor.
3. To open an already-created CFC chart in the editor, double-click the chart.
The "CFC" editor always contains a CFC chart when it is opened.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 45
Elements and basic settings
3.2 "CFC" Editor

Layout of the "CFC" Editor

① Work area: Display area of the "Data flow" and "Control flow" tabs
② "Data flow" tab
③ "Control flow" tab
④ Task cards
⑤ Inspector window
⑥ Detail view
⑦ "Charts" folder
⑧ Project tree

Configuring CFC charts


46 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.2 "CFC" Editor

Work area with the "Data flow" and "Control flow" tabs
• In the "Data flow" tab, you configure a CFC chart graphically.
• In the "Control flow" tab, you specify the run sequence of the instructions and blocks in
the CFC chart.
You also display the configured instructions and blocks with their input and output
parameters in form of a list.
You also select the input and output parameters for testing.
• Both in "Control flow" and "Data flow" mode, you can insert, interconnect and set
parameters for instructions and blocks.

Task cards

Task card Use


Instructions Access to all instructions provided by CFC.
Libraries Access to the project library and global libraries.
Testing Configure test settings.

Note
Depending on the target system
The availability and the content of the task cards depend on the target system for which you
are configuring.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 47
Elements and basic settings
3.2 "CFC" Editor

Inspector window
Additional information on a selected object or executed actions are displayed in the Inspector
window.
The Inspector window includes the following elements or functions:
• Different tabs, e.g. "Properties", "Info", "Diagnostics":
Information on selected objects is displayed and editable properties can be changed.
In the "General" tab, you can enter additional details on the CFC chart, a comment or
version information, for example.
• Additional lower-level tabs in the "Info" and "Diagnostics" tabs
Alarms and warnings are displayed in the "Info" tab, for example, during compiling or
loading.
• Navigation functions within the tabs
You use the Inspector window for the following tasks:
• Set parameters of the instructions/blocks.
• Select parameters of the instructions/blocks for testing.
• Manage interconnections

Note
Depending on the target system
The properties or options in the Inspector window depend on the target system for which you
are configuring.

See also
Basic settings for CFC charts (Page 43)
Configuration options for CFC charts (Page 26)
Overview of CFC instructions (Page 286)
Selecting parameters for testing (Page 176)
Adding an instruction or block to the CFC chart (Page 109)
"Chart sequence & extras" Editor (Page 49)
Overview for configuration of CFC charts (Page 63)
Keyboard operation in CFC (Page 51)
Icons in CFC (Page 53)

Configuring CFC charts


48 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.3 "Chart sequence & extras" Editor

3.3 "Chart sequence & extras" Editor

Overview
In the "Chart sequence & extras" editor, you configure the run sequence of charts.
The assignment of the instructions/blocks to the tasks and therefore the run sequence within
the target system is also displayed.

Note
Depending on the target system
The availability and the content of the tabs depend on the target system for which you are
configuring.

Tab
You are working in various tabs of the editor.
Depending on the target system, the following tabs are displayed:
• "Chart sequence": Run sequence of the CFC charts
• "Task assignment": Tasks and assigned blocks
• "Tag interconnections": Points of use of interconnected tags and global data blocks
• "Target system settings": Basic settings for chart folder
• "Block instances": Block types with their associated instances
Tabs that are not supported by the target system are not visible.

Information on S7 target systems


• "Working with CFC charts for S7 > "Chart sequence & extras" editor for S7"

Table layout
In most tabs, you are working in a table.
Depending on the selected tab, you can adapt the representation of the columns in the table.
• Column width:
– You change the width of the individual columns with the mouse.
– You optimize the column width automatically via the shortcut menu.
• To change the sequence of the columns, move a column header with a drag-and-drop
operation.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 49
Elements and basic settings
3.3 "Chart sequence & extras" Editor

See also
Basic settings for CFC charts (Page 43)
"CFC" Editor (Page 45)
Keyboard operation in CFC (Page 51)
Icons in CFC (Page 53)
Displaying points of use of interconnections (Page 153)
Adapting the run sequence (Page 166)

Configuring CFC charts


50 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.4 Keyboard operation in CFC

3.4 Keyboard operation in CFC


In the TIA Portal and in CFC, keyboard shortcuts are also available for many functions.
Alternatively, you can use user-defined keyboard shortcuts.

Keyboard shortcuts in CFC


The following shortcuts enable operation without the mouse:

Function Keyboard shortcut Menu command


Go to the next open CFC chart <Ctrl+F6>
Go to the previous open CFC chart <Ctrl+Shift+F6>
Go to the next chart partition, if more than <Shift+PgDn>
one chart partition has been created
Go to the previous chart partition, if more <Shift+PgUp>
than one chart partition has been created
Project tree: <Ctrl+Arrow up>
Go to the next CFC chart
Project tree: <Ctrl+Arrow down>
Go to the previous CFC chart
Open/close project tree <Ctrl+1> View > Project tree
Open/close task card <Ctrl+3> View > Task card
Open/close detail view <Ctrl+4> View > Detail view
Open/close Inspector window <Ctrl+5> View > Inspector window
Display or hide reference projects <Ctrl+9>
Download project data to the device <Ctrl+L> Online > Download to device
Open Help <F1> Help > Show help
Open help on a block <Shift+F1>

TIA Portal: Operation with the keyboard


You can find an overview of all keyboard shortcuts and the option of assigning user-defined
keyboard shortcuts in the settings of the TIA Portal:
1. Select the "Settings" command in the "Options" menu.
The settings of the TIA Portal are displayed.
2. Open the "Keyboard shortcuts" entry in the area navigation.
You can see an overview of all default and user-defined keyboard shortcuts that are valid
for the currently installed products.
More information in the TIA Portal Information System:
• "User interface and operation > Keyboard operation in the TIA Portal"
You learn how to navigate in the TIA Portal using the keyboard, edit objects and customize
the TIA Portal to your needs.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 51
Elements and basic settings
3.4 Keyboard operation in CFC

See also
"CFC" Editor (Page 45)
"Chart sequence & extras" Editor (Page 49)

Configuring CFC charts


52 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.5 Icons in CFC

3.5 Icons in CFC


The tables below show the icons that you use when working with CFC and describe their
meaning.
• TIA Portal project tree: CFC charts
– Icons under the "Charts" entry
– Online/offline comparison status
• Project tree / Trend editor: Trend display/Dynamic display
• Project tree / Toolbars: Other icons
• CFC editor: Toolbar
• CFC editor: Chart view in the "Data flow" tab
– Icons at the block instances
– Interconnections
– Other icons
• "Chart sequence & extras" editor
– General
– "Chart sequence" tab
– "Textual interconnections" tab (S7 target system)
– "Block types" tab (S7 target system)
• "Update blocks" dialog

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 53
Elements and basic settings
3.5 Icons in CFC

TIA Portal project tree: CFC charts

Icons under the "Charts" entry

Icon Meaning
Navigation area for managing CFC charts

Opens the "Chart sequence & extras" editor

Creates a new CFC chart.

CFC chart:
Opens the chart in the CFC editor.
Hierarchical CFC chart:
Icon for a group of hierarchical charts, consisting of the basic chart and subcharts
Hierarchical CFC chart:
Opens the basic chart in the CFC editor.
Password-protected CFC chart
The password serves only to protect a CFC chart from unintentional editing.
Password-protected hierarchical chart
The password of basic charts does not affect the subcharts contained therein.
To protect the subchart of a protected basic chart from unintentional editing,
open the subchart. In the project tree, the "Access protection" entry is displayed
in the shortcut menu of the subchart.

Online/offline comparison status


The icons for the status display identify whether changes exist in the project and a download
to the device is required.

Icon Meaning
The CFC chart exists in the project but not in the device.

The basic chart exists in the project but not in the device.

The CFC chart is identical in the project and device.

The basic chart is identical in the project and device.

The CFC chart has been changed in the project and exists in the device but is different.

The basic chart has been changed in the project and exists in the device but is different.

The basic chart is identical in the project and device, but a subchart has been changed.

Configuring CFC charts


54 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.5 Icons in CFC

Project tree / Trend editor: Trend display/Dynamic display

Icon Meaning
Project tree:
Navigation area for the "Trend display", "Dynamic display", "Force table" components
Project tree:
Creates a new trend display or dynamic display
Project tree:
Opens the dynamic display in the table editor
Project tree:
Opens the trend display in the trend editor
Trend editor:
Adds an analog axis in the trend display
Trend editor:
Adds a digital axis in the trend display

Project tree / Toolbars: Other icons

Icon Meaning
Opens the force table.
You find the entry in the project tree under "Charts - Trend/dynamic display & force table"
Refreshes the display
The icon is used in multiple editors and views.
TIA Portal toolbar:
Split editor area horizontally or vertically
Use the split editor areas to drag interconnections between charts or chart partitions.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 55
Elements and basic settings
3.5 Icons in CFC

CFC editor: Toolbar

Icon Meaning
List of created chart partitions in the open CFC chart
Clicking on an entry changes the view to the selected chart partition.

Create new chart partition

Delete displayed chart partition


Requirement: The CFC chart consists of at least 2 chart partitions.
Zoom in /out on the display of the CFC chart:
• Zoom in
• Fit chart to work area
• Fit selection to work area
• Zoom out
Open displayed CFC chart in a second editor window
This can be used, for example, to simultaneously edit two chart partitions
of the same CFC chart.
Select sheet bar view:
• Static sheet bars
• No sheet bars
• Dynamic sheet bars
Select display of sheet bar entries:
• One-line
• Two-line
Show / hide sheet borders
Requirement: The chart or chart partition is divided among at least 2 sheets.
Show / hide sheet numbers

Show / hide grid in chart background

Show / hide position number in the run sequence above the block header.

Show / hide assigned task above the block header.

Show / hide unit of measurement of the parameters


Requirement: A unit of measurement has been configured for the parameter.
Signal flow highlighting: The signal flow is highlighted in color.
Requirement: The instance of a block or subchart has been selected.
Change between the display of parameter names and comments
Requirement: A comment has been entered for the parameter.
Insert new subchart

Insert text box

Configuring CFC charts


56 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.5 Icons in CFC

Icon Meaning
Optimize run sequence in a CFC chart according to the signal flow

Place blocks in the displayed chart according to the data flow

Show selected object in the control flow

Task assignment of the open CFC chart

Monitoring on/off
Activates the display of the current values during testing.
If you have connected online, all input and output parameters selected
for testing are supplied with current values from the device and also
highlighted in color.
Control flow:
Collapse display and show only the top elements
Control flow:
Expand display and show all lower-level elements
Control flow:
Show selected object in data flow

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 57
Elements and basic settings
3.5 Icons in CFC

CFC editor: Chart view in the "Data flow" tab

Icons at the block instances

Icon Meaning
Identifies the instance of a function block (FB) in the open chart.

Identifies the instance of a function (FC) in the open chart.

Identifies the instance of a subchart in the open chart.

Without icon / Instances of instructions can be marked with different icons or only with
/ the instruction name.
Identifying instruction instances: The entry "Go to block type" is missing
in the shortcut menu of instruction instances.
Colored border:
The instance has been positioned automatically in the chart.

Instances with a colored background:


Not enough space for a complete display or the objects lie on top of each other.
Move the instance or increase the sheet size.
Block is not processed.
The reason is that the enable input "EN" at the block is "FALSE" or the
"Enable chart" option of the chart has been disabled.
Block is processed conditionally.
The reason is that the enable input "EN" at the block or the "Enable chart" option
of the chart has been interconnected.
An interconnected parameter is hidden.

A non-interconnected parameter is hidden.

Add additional input parameters at an instruction instance


The icon is hidden in the following cases:
• Addition is not possible.
• The maximum number of possible input parameters has been reached.
Connector display for an interconnection that cannot be fully displayed:
• Light beige: The destination connector lies within the sheet or
in the sheet bar.
• Dark beige: The destination connector lies in the extended sheet bar.
The interconnection is represented by connectors with the same numbers.
To jump between the connectors, double-click the corresponding connector.
Status display for the "Forcing" function
• Brown (online) / light brown (offline):

The "Add forcing" option has been enabled.


• Blue (online) / light blue (offline):
The "Add forcing" and "Forcing active" options have been enabled.

Configuring CFC charts


58 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.5 Icons in CFC

Interconnections in the data flow


The color of the interconnection lines depends on the data type of the data source.
You select the colors in menu "Options > Settings > Charts > CFC > General".
For interconnections to operands whose data type is not defined, the default value "black"
is used.

Icon Meaning
Create interconnections
When you move the mouse over the input parameters, the interconnectable
parameters are displayed with a green background.
The selected parameter is displayed with a light green background.
Colored signal flow marking
Requirement: The "Highlighting for signal flow" option has been enabled
in the toolbar.

Interconnections in online mode


For BOOL-type interconnections, the display of interconnection lines in online
mode is dependent on the current value.
• Green line: Value = "1"
• Dashed blue line: Value = "0"
Identifies textual interconnections in the sheet bar

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 59
Elements and basic settings
3.5 Icons in CFC

Other icons

Icon Meaning
Shows and hides window areas

Footer:
Select zoom factor of work area
Footer:
Slider for zoom factor of the work area
Footer:
Opens a window for navigation in the chart
Inheritance status of attributes of a selected parameter in the
Inspector window (tab "Properties > General")
• The value of the attribute is handed down from the type
to the instance.
Inheritance status of attributes of a selected parameter in the
Inspector window (tab "Properties > General")
• The value is not handed down from the type to the instance
because it was changed at the instance.

To restore the inheritance, click on the icon.


Data flow:
Open textual interconnections of interface parameters have
the background color "yellow" in the "Operand" column.

Chart interface:
As long as an interface parameter has not been interconnected,
the table cell of the "Data type" column has a "light gray"
background color.
Upon interconnection, the background color changes to
"medium gray".

Configuring CFC charts


60 System Manual, 11/2023, A5E53466205-AA
Elements and basic settings
3.5 Icons in CFC

"Chart sequence & extras" editor

General

Icon Meaning
Expand display and show only the top elements

Expand display and show all lower-level elements

Refreshes the display

"Chart sequence" tab

Icon Meaning
Optimize run sequence of CFC charts

Show selected object in data flow

Show selected object in the control flow

"Textual interconnections" tab (S7 target system)

Icon Meaning
Select all displayed textual interconnections

Undo selection of textual interconnections and select no interconnection

Close textual interconnection

Delete textual interconnection

"Block types" tab (S7 target system)


The "Differences" column displays the status of the block in comparison with the block types.

Icon Meaning
There are no differences between the compared blocks.
No action required.
No instances of this imported block are currently used in the CFC.
Existing differences have no effect in the CFC.
There are differences between the compared blocks.
The differences are displayed in the Inspector window in the "Properties >
Differences" tab.
The block type of the imported block was not found in the block folder.

Other status Status information is displayed in the "Properties" tab of the


Inspector window.
Example:
Example: The block is not compiled.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 61
Elements and basic settings
3.5 Icons in CFC

"Update blocks" dialog


The icons are displayed in the last column of the "Differences" window.

Icon Meaning
No download necessary:
Identifies changed blocks that can be inserted without a download to the CPU.
STEP 7 downloads changed blocks to the PLC where appropriate,
irrespective of CFC.
Download of software necessary

Download with CPU Stop necessary

See also
Basics of CFC (Page 25)
"CFC" Editor (Page 45)
"Chart sequence & extras" Editor (Page 49)

Configuring CFC charts


62 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts 4
4.1 Overview for configuration of CFC charts

Preparing the configuration


There is normally a planning phase prior to the configuration of CFC charts.
During this planning phase, you specify, for example, how the open-loop and closed-loop
control is structured in the CFC charts.
You can, for example, create a separate CFC chart for each measuring point.
With this strategy, you have greater flexibility when reacting to expansions in the plant.

Note
Using the functions "Undo" and "Redo"
Use the "Undo" and "Redo" buttons in the toolbar to undo or redo any basic actions you have
executed in CFC.
The options on how you can influence the actions with the two buttons also depend on the
target system.
Additional information: ""Undo" and "Redo" functions in CFC (Page 65)"

Basic procedure
1. Create a controller and program block types.
2. Create a CFC chart, or open an existing CFC chart for editing.
3. Add and manage objects in the CFC chart, e.g. blocks, instructions, text boxes.
4. Configure input and output parameters by interconnection or parameter assignment.
5. Adapt the run sequence (*):
– Sequence of blocks/instructions within a CFC chart
– Sequence of the CFC charts
6. Compile and download the CFC chart. (*)
You can find additional information in the documentation for the specific target system.
7. Test the CFC chart or user program. (*)
(*): Whether and to what extent you perform these steps depends on the target system you
are using.
Additional information on the S7 target system: "Working with CFC charts for S7 (Page 256)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 63
Configuring and adapting CFC charts
4.1 Overview for configuration of CFC charts

See also
"CFC" Editor (Page 45)
Basics of CFC (Page 25)
Creating a CFC chart (Page 70)
Adding an instruction or block to the CFC chart (Page 109)
Interconnecting input and output parameters (Page 136)
Setting the parameters of the input and output parameters (Page 123)
Adapting the run sequence within the CFC chart (Page 171)
Adapting the run sequence of CFC charts (Page 173)

Configuring CFC charts


64 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.2 "Undo" and "Redo" functions in CFC

4.2 "Undo" and "Redo" functions in CFC


Use the "Undo" and "Redo" buttons in the toolbar to undo or redo any actions
you have performed.

Action stack
Every action you perform is saved in an action stack.
When undoing actions, the list is processed from top to bottom.
In other words, if you undo an action that lies further down in the list, all actions
located above it in the list will also be undone automatically.
If you perform a new action, then the redo list is emptied.

Displaying the undo/redo list


The "Undo" button in the toolbar is enabled as soon as you perform an action that
can be undone.
This button is split; you can use the arrow down to open a drop-down list.
It contains all actions of the action stack that you can undo.
If you performed actions in an editor other than the currently displayed editor,
then the corresponding editor will also be displayed as a subheading.
This allows you to always identify the point at which the undo operation is applied.

Points to note
The listed actions empty the action stack.
You cannot redo or undo actions after such an action.
• Saving the project
• Project management (creating a new project, opening project, closing a project,
deleting a project)
• Compile
• Restoring blocks
• Establishing an online connection
• Download
Additional information in the information system of the TIA Portal:
• "Introduction to the TIA Portal > Undoing and redoing actions"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 65
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3 Creating and managing CFC charts

4.3.1 CFC views

Overview
When configuring a CFC chart, you have the following CFC chart views available:
• CFC chart with static sheet bars
• CFC chart with dynamic sheet bars
• CFC chart without sheet bars
You can change the sheet bar view in the toolbar of a CFC chart as required.
More information: "Changing the sheet bar view of a CFC chart (Page 87)"

CFC chart with static sheet bars


A static area is reserved to the right and left in a CFC chart for the sheet bars.
This area is intended solely for sheet bar entries, for example for interconnections
between charts.
The following figure shows a CFC chart with sheet bars:

Sheet bar width


The right and left sheet bars of a chart are always the same width.
You can change the width of the sheet bars by dragging with the mouse or in the
Inspector window of the CFC chart.
To adapt the sheet bar width to the text length of the interconnections, double-click
the boundary line of the sheet bar.

Configuring CFC charts


66 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

CFC chart with dynamic sheet bars


A CFC chart with dynamic sheet bars displays the sheet bar entries only when required and
has the following features that differ from a CFC chart with static sheet bars:
• You can place instructions, blocks or text boxes in the sheet bar area.
• The sheet bar area is not highlighted.
The following figure shows a CFC chart with dynamic sheet bars.
The text boxes are placed in the sheet bar area:

CFC chart without sheet bars


The CFC chart is displayed without sheet bars.
Interconnections to other CFC charts or to operands are displayed by connectors. The
connectors are placed next the interconnected input or output parameters.
Interconnections between sheets are displayed as if they were on one sheet.
The following figure shows a CFC chart without sheet bars with sheet borders displayed:

Printing CFCs without sheet bars


Instructions or blocks in sheet borders are not shown completely when printed.
If you configure without sheet bars, make sure that you do not place these objects in sheet
borders.
In this case, show the sheet borders during configuration.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 67
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Sheet bar extension


If you create more sheet bar entries than there is room for in the sheet bar, then the
sheet bar is automatically extended.
If a sheet bar has been extended, you will see an arrow in the sheet bar at the bottom
of the sheet.
The following figure shows a sheet bar with the arrow for an extended sheet bar:

Show the extended sheet bar


If you click on the arrow, the extended sheet bar is shown.
The extended sheet bar is displayed slightly offset above the sheet bar.
The following figure shows an extended sheet bar.
If you click on the arrow at the top border, you return to the sheet bar.

Configuring CFC charts


68 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Representation and signal tracking of interconnections

Interconnections that cannot be displayed


If the connection line of an interconnection cannot be displayed, the interconnection
is displayed with connectors.
The color of the connector indicates the type of interconnection.
The following color coding can be seen in the figure above:
• Connector color "Light beige":
The associated target connector is displayed in the sheet at a parameter or
in the sheet bar.
These are connectors "1" to "5" as well as "7" in the figure.
• Connector color "Dark beige":
The selected target connector is displayed in the extended sheet bar.
These are connectors "6" and "8" in the figure.

Signal tracking
If you click on an interconnection or a connector, the interconnection or the associated
connector is highlighted in color.
Interconnections to other sheets are also highlighted.
Additional information on the representation and signal tracking of interconnections:
"Representation and properties of interconnections (Page 127)"

See also
Placing instructions and blocks in the CFC chart (Page 105)
Basic settings for CFC charts (Page 43)
Representation of instructions and blocks (Page 94)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 69
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.2 Creating a CFC chart

Overview
CFC charts always belong to one target system.
A CFC chart is uniquely identified by its name.
The settings, such as sheet number and sheet size, are taken from the basic settings
of charts.
Additional information: "Basic settings for CFC charts (Page 43)"

Display in the overview window


The created CFC charts are displayed in the overview of the project tree.
The column "Author" contains the user who created the chart. To sort by user, double-click
on the column title.

Storage of CFC charts


CFC charts are stored in the project tree under the target system in the "Charts" folder.
You cannot rename the "Charts" folder.

Creating groups
To structure the storage of CFC charts, create groups within the "Charts" folder.
Storing CFC charts in groups has no effect on interconnections or the run sequence.
Additional information: "Managing CFC charts and groups (Page 77)"

Requirement
• The target system has been created.
• The Inspector window is open.

Procedure
1. Double-click "Add new chart" in the project tree.
The CFC chart is added to the "Charts" folder and displayed in the editor window.
– The configuration data are displayed in the Inspector window in the "Properties" tab.
– The chart interface is displayed in the top area of the editor window.
In the "Interface" area you create, delete and interconnect the parameters of the CFC
chart.
You can create interconnections to other CFC charts and block elements.
2. Under "General", enter a meaningful name for the CFC chart in the Inspector window.
3. If necessary, change the sheet number and sheet size under "Sheet bars/layout".

Configuring CFC charts


70 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

S7 target systems: Advanced settings


1. If necessary, change the assigned main task under "S7 specific > Sequence".
2. If necessary, change the settings for the run sequence.

Result
The CFC chart has been created and is open in the work area of the CFC editor.
Additional information on the CFC editor: ""CFC" Editor (Page 45)"

See also
Create CFC chart partitions (Page 74)
CFC naming conventions (Page 41)
Changing the sheet bar view of a CFC chart (Page 87)
Runtime model (Page 166)
Options for determining the run sequence (Page 168)
Extending a CFC chart (Page 72)
Adding an instruction or block to the CFC chart (Page 109)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 71
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.3 Extending a CFC chart

Overview
When it is created, a CFC chart consists of a sheet on which you place and interconnect
instructions and blocks.
If there is not enough space for placing or displaying interconnections, extend the CFC chart.
You can extend an existing CFC chart in the following ways:
• Increase the number of sheets, for example in the vertical direction.
• Increase the sheet size, for example from A4 to A3.
• Add chart partitions.
Additional information: "Create CFC chart partitions (Page 74)"

Requirement
• The CFC chart is open.
• "Data flow" is displayed.
• The Inspector window is open.

Procedure
1. Click in a free area of the CFC chart.
2. Select the "General" tab in the Inspector window.
3. Select the "Sheet bar/Layout" entry in the area navigation.
4. To extend the CFC chart, increase the number of sheets or enlarge the sheet size.
Change the vertical and horizontal outline of the sheets, if necessary.
The layout settings apply to all chart partitions of a CFC chart.
5. To display all sheets for an overview, select the zoom view "Fit to screen".
Alternatively, switch to this view with a double-click in the sheet background.
With a double-click in a sheet, you switch from the overview to the clicked sheet.

Alternative procedure
You can also increase the number of sheets by dragging with the mouse.
If you move an instruction or a block beyond the borders of the sheet with drag-and-drop,
the number of sheets increases automatically.

Configuring CFC charts


72 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Reducing the number of sheets or sheet size


When you reduce the sheet size or the number of sheets, some objects may be located
outside the new sheet borders.
These objects are automatically positioned in the remaining area.
If the area is not large enough for all objects, the objects are placed at the top left
in the CFC chart.
Increase the number of sheets and place the objects manually.

Result
The CFC chart is extended.
Use the following keyboard shortcuts to navigate between sheets:
• <Ctrl+Right/Left>
• <Ctrl+Top/Bottom>

See also
Placing instructions and blocks in the CFC chart (Page 105)
Representation and properties of interconnections (Page 127)
Managing CFC charts and groups (Page 77)
Basic settings for CFC charts (Page 43)
Create CFC chart partitions (Page 74)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 73
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.4 Create CFC chart partitions

Overview
When it is created, a CFC chart consists of a sheet on which you place and interconnect
instructions and blocks.
If there is not enough space for placing or displaying interconnections, extend the CFC chart.
You can extend an existing CFC chart in the following ways:
• Add chart partitions
• Increase the sheet size or the number of sheets
More information: "Extending a CFC chart (Page 72)"

Working with chart partitions


You work in chart partitions as you do in the sheets of a CFC chart.
You can interconnect and move instructions and blocks between the chart partitions.
The placement in chart partitions has no effect on the control flow.
When you add a block to the control flow, the block is placed in the first chart partition.

Chart partition names


You can give each chart partition its own name:
• Maximum 15 characters
• The name must be unique in the CFC chart.
• The name is always language-neutral.

Configuration limits
A CFC chart contains a maximum of 6 chart partitions with up to 6 sheets each.
When you add additional sheets to a chart partition, this setting also applies to all the other
chart partitions of the CFC chart.

Configuring CFC charts


74 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Navigating between chart partitions


When you open a CFC chart for the first time after starting the TIA Portal, the first
chart partition is displayed. The name of the chart partition is displayed grayed out.
As soon as you add a second chart partition, the drop-down list "Changes to another
chart partition" is activated. The drop-down list box contains the chart partitions sorted
alphabetically by name.
Navigate between the chart partitions using this drop-down list:

Alternatively, change between the chart partitions of the open CFC chart with the following
keyboard shortcuts:
• Next chart partition: <Shift+PgDn>
• Previous chart partition: <Shift+PgUp>

Requirement
• The CFC chart is open.
• "Data flow" is displayed.

Procedure: Creating a chart partition


1. In the toolbar, click on the button "Adds a chart partition in the CFC chart":
The new chart partition is displayed in the editor.
New chart partitions are always created with the name "Partition_<consecutive number>".
2. To change the name, select the entry "Displayed chart partition" in the "General" tab of the
Inspector window.
Enter a meaningful name and a comment, if necessary.
You can enter up to 1000 characters in the comment field.
3. To return to the previous view, select the desired chart partition in the drop-down list.
4. To delete a chart partition, display this chart partition and click on the button
"Deletes the currently displayed chart partition":
All objects and interconnections of the chart partition are also deleted.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 75
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Procedure: Configuring interconnections between chart partitions


1. To display both chart partitions, click on the button
"Opens the CFC chart in a second window":
The CFC chart is displayed in two editor windows.
To display both windows, click on one of the buttons for splitting the editor area:
2. Select the required chart partition from the drop-down list.
3. Create the interconnection between the two chart partitions, for example, by using
drag and drop or copy and paste.
The connector at the sheet bar contains the name of the chart partition and the
sheet number.

Alternative procedure: Example "Click Clack"


1. Click on a parameter so that it is displayed in magenta.
2. Use the drop-down list to switch to the required chart partition.
3. Move the mouse pointer to the required parameter.
4. Click on the parameter as soon as it is displayed in green.

Result
The CFC chart is divided up into chart partitions.

See also
Extending a CFC chart (Page 72)
Creating a CFC chart (Page 70)
Creating a subchart for a hierarchical CFC chart (Page 88)

Configuring CFC charts


76 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.5 Managing CFC charts and groups


The names of a group or CFC must be unique within a target system.
Inside the target system, you can move or copy the CFCs to any other group within the
"Charts" folder.

Add group
Create groups to structure the CFCs in the "Charts" folder.
You can create additional subgroups to an existing group.
1. Select the "Charts" folder or an existing group in the project tree.
2. Select "Add new group" from the shortcut menu.
3. Enter a meaningful name for the group.
4. Move the CFCs you want to move from the "Charts" folder or another group to the
new group using drag-and-drop.
You can also copy the required CFCs and add them to the new group.
To create a new CFC in a group, select the item "Add new chart" in the shortcut menu
of the group.

Copying a group
1. Select the group you want to copy in the project tree.
2. Select "Copy" from the shortcut menu.
3. Highlight the position of the group you want to create in the project tree within the
"Charts" folder.
4. Select "Paste" from the shortcut menu.

Note
Naming conflicts during copying
If you copy one or more groups, only the group is checked for name conflicts at the
destination location.
If the group is replaced, charts with the same name are automatically renamed in the group.

Renaming a CFC or group


1. Select the CFC or the group in the project tree.
2. Select the "Rename" command in the shortcut menu.
Alternatively, press the <F2> key.
3. Enter the new name.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 77
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Deleting a CFC

Note
Checking interconnections
If you delete a CFC, interconnections to other charts are also deleted.
Before deleting a CFC, you should therefore check whether the chart has interconnections
to other charts.
The values of the respective input and output parameters are reset to the values preset
in the block type.
Correct the reset parameters if necessary.

Procedure
1. Select the CFC in the project tree.
2. Select the "Delete" command in the shortcut menu.
The CFC is deleted.
Interconnections to other charts are also deleted.

Deleting a group
When you delete a group, you also delete all the objects it contains.

Procedure
1. Select the group in the project tree.
2. Select the "Delete" command in the shortcut menu.

See also
Copying objects (Page 40)
Copying instructions, blocks and charts (Page 107)
Creating a CFC chart (Page 70)
Overview of textual interconnections (Page 158)
Hierarchical CFC charts (Page 31)

Configuring CFC charts


78 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.6 Printing a CFC chart

Overview
You can print CFC charts, for example, to create documentation.
Using multiple selection, you can print several CFC charts at the same time.
In addition to the selected view, the instructions and blocks configured in the CFC chart and
their input and output parameters are also printed.

Settings
You can select different print settings for printing the CFC charts, e.g. sheet bars, number of
sheets, sheet size.

Menu bar: Basic settings for all CFC charts to be newly created
• "Options > Settings > Charts"
Chart properties in the Inspector window Print settings for one or more selected CFC charts
• "General > Sheet bars/Layout"

Note
Taking into account format and sheet borders
If you use CFC charts without sheet bars, make sure that instructions/blocks are not placed
on sheet borders.
If the sheet size used in the CFC chart does not match the sheet size in the printer,
the CFC chart is scaled automatically when it is printed.
If you select a smaller sheet size for a CFC chart, the position of the objects in the chart
is maintained.
Objects that would be outside the sheet size after the size reduction is positioned
automatically.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 79
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Print settings

Printer Select the desired printer from the list or via the "Advanced" button.
Document information Select the desired layout from the list.
The frame stored in the document information is used for the printout.
Print the cover page The cover page from the layout selected under "Document
information" is used.
Print table of contents The table of contents contains the structure of the CFC charts in the
navigation area.
Properties • All: Prints all project data of the selected CFC charts.
• Compact: Prints the project data in compact form.

Additional information in the information system of the TIA Portal:


• "Edit project data > Print project contents > Print project documentation"

Procedure: Displaying print preview


1. Select the CFC charts you want to print in the project tree.
2. Select the "Print preview" command in the shortcut menu.
3. Select the print settings.
4. Start creating the print preview by pressing the "Preview" button.
The print preview is opened in the work area.
You can also print the CFC chart from the print preview.

Procedure: Printing a CFC chart


1. Check the chart settings:
– By using the "Options > Settings > Charts" menu command
– In the properties of the CFC chart in the Inspector window under "Sheet bars/Layout"
2. Select the CFC charts you want to print in the project tree.
3. Select the "Print" command from the shortcut menu.
Alternatively, use the keyboard shortcut <Ctrl+P>.
4. Select the print settings.
5. Start the printout with the "Print" button.

Alternative procedure: Print a group


Instead of selecting multiple CFC charts, you can also select a group and then the "Print"
command from the shortcut menu of the group.
in this case, all the CFC charts in the group are printed.
The order in which they are printed is decided by the order of the CFC charts in the
project tree.

Configuring CFC charts


80 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Result
The CFC chart is output on the printer.
Chart partitions are sorted alphabetically in a CFC chart.
If you have selected several CFC charts, they are printed in the order in which you
selected them.

See also
Basic settings for CFC charts (Page 43)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 81
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.7 Limiting editing of CFC with password

4.3.7.1 Activating password for a CFC chart


To protect a CFC chart or hierarchical CFC chart from unintentional editing, you can protect
the chart with a password.

NOTICE
Password: No authorization, no know-how protection of the charts
The password serves only to protect a CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts
More information:
• "Protection from unintentional access to CFC charts (Page 36)"

Procedure
1. Go to the required CFC chart in the project tree.
2. To open the "Enable protection" dialog, select the menu command "Access protection" from
the shortcut menu.
Alternative procedure:
– Double-click on the CFC chart to open it.
– Select the entry "Protection" in the "Properties" tab of the inspector window.
– Click the "Protection" button.
3. Enter the desired password in both boxes.
4. Click "OK" to close the dialog box.

Result
The password is activated for this CFC chart.
This is indicated by a small padlock symbol on the icon of the CFC chart in the project tree.

See also
Protection from unintentional access to CFC charts (Page 36)
Changing or deactivating password for a CFC chart (Page 83)
Opening a password-protected CFC chart (Page 85)

Configuring CFC charts


82 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.7.2 Changing or deactivating password for a CFC chart


When a password was assigned for a CFC chart, you can change or deactivate the password.

Procedure
1. Go to the required CFC chart in the project tree.
2. To open the "Change protection" dialog, select the menu command "Access protection" from
the shortcut menu.
Alternative procedure:
– Double-click on the CFC chart to open it and enter the password.
– Select the entry "Protection" in the "Properties" tab of the inspector window.
– Click the "Protection" button.
3. Enter the current password in the "Old password" box.
4. Select whether you want to change or deactivate the password:
– To deactivate the password, click on the "Remove" button.
– To change the password, enter the new password in the boxes "New password" and
"Confirm password".
5. Click "OK" to close the dialog box.

Result
The password is activated or changed for this CFC chart.
When you have deactivated the password, the small padlock symbol is no longer shown on
the icon for the CFC chart in the project tree.

NOTICE
Password: No authorization, no know-how protection of the charts
The password serves only to protect a CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts
More information:
• "Protection from unintentional access to CFC charts (Page 36)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 83
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

See also
Protection from unintentional access to CFC charts (Page 36)
Activating password for a CFC chart (Page 82)
Opening a password-protected CFC chart (Page 85)

Configuring CFC charts


84 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.7.3 Opening a password-protected CFC chart

Requirement
• The password is activated in the CFC chart.
Charts with activated password are indicated by a small padlock symbol on the icon of the
CFC chart in the project tree.

Procedure
1. Go to the required CFC chart in the project tree.
2. Double-click on the CFC chart.
The "Access protection" dialog opens.
3. Enter the password and click "OK".
The CFC chart is open in the "CFC" editor.
The contents of the chart and the interface can be edited.
4. To open the CFC chart write-protected, click the "Cancel" button in the "Access protection"
dialog.
– A message is displayed in the editor window, but the contents of the chart are not
displayed.
– Editing the chart interface is possible to a limited extent.

Result
The CFC chart is opened as editable.

NOTICE
Password: No authorization, no know-how protection of the charts
The password serves only to protect a CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts
More information:
• "Protection from unintentional access to CFC charts (Page 36)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 85
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

See also
Protection from unintentional access to CFC charts (Page 36)
Activating password for a CFC chart (Page 82)
Changing or deactivating password for a CFC chart (Page 83)

Configuring CFC charts


86 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.8 Changing the sheet bar view of a CFC chart

Layout of the sheet bars


The following sheet bar views are available:
• Static sheet bars
• No sheet bars
• Dynamic sheet bars

Procedure
1. Click in a free area of the CFC chart.
2. Select the required sheet bar view under "Sheet bars/layout" in the Inspector window.

Alternative procedure
You can also change the sheet bar view using the icon in the toolbar.

Result
The sheet bar view changes.
Connectors in the sheet bars are positioned either in the sheet bar or beside the input or
output parameters on the sheet bar view you have set.
To adapt the width of fixed sheet bars to the text length of the interconnections, double-click
the boundary line of the sheet bar.

See also
CFC views (Page 66)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 87
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.9 Creating a subchart for a hierarchical CFC chart


You can create CFCs in hierarchical structures.
In doing so, you add one or more CFCs as "subcharts" into a "basic chart".

Procedure: Create a new subchart


1. Open the CFC in which you want to insert a different chart as subchart.
2. To insert a new CFC as subchart, click the "Insert a new subchart" icon in the toolbar of the
"CFC" editor:
The mouse pointer transforms into an attached subchart icon.
3. Click the position at which you want to insert the new subchart.
The new subchart is displayed as an icon in the opened CFC.
The changes are displayed in the "Charts" folder:
– If the CFC into which the new subchart was inserted did not contain any subcharts, it is
now displayed as a basic chart.
– The new CFC was created automatically and is now displayed as subchart.
– The new subchart has the name of the basic chart with the suffix "_1".
Assign a meaningful name to the subchart.
4. Configure the newly created subchart.

Alternative procedure: Shortcut menu


1. In the open chart, right-click the location where you want to insert a subchart.
2. Select the "Insert a new subchart" command from the shortcut menu.

Alternative procedure: Insert existing CFC


1. Open the CFC in which you want to insert a different chart as subchart.
2. Drag a CFC from the project tree or a library to the open CFC in the editor.
The new subchart is displayed as an icon in the opened CFC.
The changes are displayed in the "Charts" folder:
– If the CFC into which the new subchart was inserted did not contain any subcharts, it is
now displayed as a basic chart.
– The CFC you inserted is copied and displayed as subchart in the tree structure of the
basic chart.
The new subchart and the CFC inserted as source can be configured independently of one
another.
When you change the original, inserted CFC and want to apply the change to the
subchart, you can replace the subchart.
Additional information: "Replacing hierarchical CFC charts (Page 90)"

Configuring CFC charts


88 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

Result
You have inserted a subchart in a CFC that represents a hierarchical chart with basic and
subcharts.
In the subchart and basic chart, you can configure new parameters and create
interconnections to parameters in the chart interface.

See also
Hierarchical CFC charts (Page 31)
Create CFC chart partitions (Page 74)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 89
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.10 Replacing hierarchical CFC charts


You can replace a hierarchical CFC with a different hierarchical CFC.
If possible, the interconnections of the "old" chart are retained.

Use case
Replacement can be used, for example, in situations where subcharts are configured
as sub-functions that are intended for use in different applications.

Example
You configured a sub-function as hierarchical CFC and interconnected this subchart in a CFC.
This sub-function could be a control for a ventilation system that is available in different
variants, depending on the application.
You can always interchange these variants in the overall structure without having to change
the interconnections.

Requirement
• The CFC that is to replace a specific subchart is available in a library in the "Charts" folder
as a basic chart, or in a different CFC.

Procedure
1. Open the basic chart that contains the subchart you want to replace.
2. In the project tree or in a library, navigate to the CFC that is to replace the subchart.
You can also open a different CFC that contains the desired CFC.
3. Drag-and-drop the CFC from the project tree, from the library, or a different CFC into the
subchart that is to be replaced.
4. Release the mouse button as soon as the mouse pointer is positioned exactly over the CFC to
be replaced.
Alternatively, copy the CFC and select the "Paste" command in the shortcut menu at the
icon of the subchart to be replaced.
A dialog opens and prompts you to confirm the replacement of the CFC.
5. Confirm the replacement with "Yes".

Result
The subchart is replaced by the inserted CFC.
The name of the replaced subchart remains the same.

Configuring CFC charts


90 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

See also
Hierarchical CFC charts (Page 31)
Creating a subchart for a hierarchical CFC chart (Page 88)

4.3.11 Moving subcharts to the root level

Requirement
• The CFC to be moved may not contain any external interconnections to the chart
interface.

Procedure
1. Select the subchart that is to be moved to the root level from the "Charts" folder of the
project tree.
2. Drag-and-drop the subchart to the root level of the "Charts" folder.
You can also copy and paste the subchart to the root level.

Result
You have successfully moved or copied the previous subchart to root level in the "Charts"
folder.

See also
Hierarchical CFC charts (Page 31)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 91
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

4.3.12 Adding, editing and sorting parameters of the chart interface

Chart interfaces
Hierarchical CFC charts and standard CFC charts have an interface structure that is similar to
that of blocks.
This means that these CFC charts can be configured and interconnected externally similar to
blocks.
Interconnections with chart interface parameters are visualized using the chart sheet bar or
via connectors.

Procedure
1. Open the CFC chart whose interface you want to change.
The chart interface is displayed in the top area of the "Data flow" or "Control flow" section
in the "CFC" editor.
The properties of the attributes are displayed in the Inspector window.
When the "Interface" area is hidden, enlarge the area with the mouse or click the unhide
icon:

2. If you want to add a new parameter, click the "<add>" line in the "Name" column in the
required Input, Output or InOut section.
The new parameter is added in the selected line.
The "Name" field is opened for editing.
To add a line, select the item "Insert line" or "Add line" from the shortcut menu of the line.
3. Enter the name of the new parameter.
4. Select the desired data type in the "Data type" column.
All CFC data types are supported in the chart interface except:
– TIMER
– COUNTER
– Hardware data types
5. If necessary, change the other attributes of this parameter, for example, "Value" or
"Configurable".
6. If you wish to change a parameter, click the required field in the table line.
Depending on the type of field, it is opened for editing or a drop-down list is displayed.

Configuring CFC charts


92 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.3 Creating and managing CFC charts

7. To change the sequence of parameters in the table, drag the name of the parameter or the
line to the new position.
You can only change the sorting within a section, for example, the parameters in the
section "Input".
8. If you wish to delete a parameter, select the name of the required parameter.
Select the "Delete" command in the shortcut menu.
The line of this parameter is removed from the table.

Result
A parameter was added, edited or deleted in the chart interface.
The sorting of the parameters was changed, if necessary.

See also
Hierarchical CFC charts (Page 31)
Interconnections to parameters of the chart interface (Page 144)
Data types in CFC (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 93
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4 Adding and managing objects in the CFC chart

4.4.1 Representation of instructions and blocks

Overview
The following section contains information related to instructions/blocks in the CFC chart:
• Block icon: visualization, layout, editing options
• Block interface: layout, editing options
• Additional information at the block icon: For example, display of run sequence, processing
display, display of hidden parameters
• View in the CFC chart: Zoom function, signal flow

Note
Use of the terms "instruction" and "block"
The following description applies to both instructions and blocks.
For simplification, however, we only use the term "block", for example, "block header".

Representation of the block icon


An instruction or a block is represented as a symbol in the CFC chart.
The following options are available for the representation:
• You cannot change the representation of the block icon in the case of instructions from
the "Instructions" task card.
• For blocks, several options are available for the representation of the block icon in the CFC
chart.
More information: "Representation options for the block icon in the CFC chart (Page 102)"
Additional icons are used for representation of the basic and subcharts.
More information: "Hierarchical CFC charts (Page 31)"

Configuring CFC charts


94 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Structure of the block icon


In principle, the block icon in the CFC chart consists of the so-called block header and the
block interface.
However, this is not true for the smallest representation option "BuiltIn;SmallBlock" of the
block icons.

(1) Block header


(2) Block interface
(3) Display for hidden parameters
(4) Processing display
(5) Run sequence: Position number, assigned task (optional display)

Change size
• You can change the width as required.
• The height of the icon depends on the number of input and output parameters.
To change the height of the icon, show or hide the input and output parameters.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 95
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Block header (1)


The block header can display the following information:
• Instance name (e.g. "myblock_1_1")
• Type name (e.g. "MyBlock_1")
• Instance comment
• Processing display
The information shown in the block header depends on the instruction or block and the
target system you are using.
With some types of instructions and blocks, the block header may be missing altogether or
simply contain a small icon, for example, an instruction for an OR logic operation.

Editing options in the block header


In the work area, you have the following options for editing the block header:
• Changing the instance name and instance comment
• Selecting a block/instruction

Configuring CFC charts


96 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Block interface (2)


The block interface displays the input and output parameters:
• Left: Input parameters
• Right: Output parameters
Normally, the block parameters have the parameter values of the type by default.
The name of the input and output parameter is displayed in full length or truncated
depending on the width of the symbol.

Comments of the block type


You can show the comments instead of the names of the input and output parameters.
To toggle between names and comments, use the following button in the toolbar:

Parameter: Tooltips
When you hover your mouse over an input or output parameter, a tooltip with the following
information is displayed:
• Name of the parameter
• Data type of the parameter
• Comment of the parameter
When you expand the tooltip, the following information is displayed:
• Value of the parameter
• Parameter section

Editing options in the block interface


In the work area, you have the following options for editing the block interface:
• Set the parameters of the input and output parameters.
• Interconnect the input and output parameters using drag-and-drop.
• Select the input and output parameters.
• Selecting a block/instruction

Navigation with the keyboard


• To select individual parameters with the keyboard, click on the block and press the
<Down> arrow key:
• Use the <Right> and <Left> arrow keys to switch between the parameters: ,
• Use the <Up> arrow key to return to the block level:
• When the entire block is selected, use the <Right> and <Left> arrow keys to switch
between the blocks.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 97
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Display for hidden parameters (3)


The icon indicates that the "Invisible" property of the parameter is activated.
If input or output parameters are set to "invisible" and are therefore hidden in the block icon,
this fact is indicated by an additional triangle symbol at the bottom of the icon.

Icon Meaning
A non-interconnected parameter is hidden.

An interconnected parameter is hidden.

More information: "Hiding input and output parameters (Page 151)"

Processing display (4)


The processing display at the top left corner of the block header indicates whether the block
is processed in the program sequence.
If the block header is missing, for example in the case of instructions, the processing display
is shown at the block interface.
The processing of a block depends on the following elements:
• Enable input "EN" at the block
• "Enable chart" option of the CFC chart in which the block is added
The display shows the following states:

Icon Meaning
No symbol Block is always processed.
Block is processed conditionally.
The reason is that the enable input "EN" at the block or the "Enable chart" option of the
chart has been interconnected.
Block is not processed.
The reason is that the enable input "EN" at the block is "FALSE" or the "Enable chart"
option of the chart has been disabled.

Configuring CFC charts


98 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Additional information at the block icon

Mouse pointer
The change in the mouse pointer over the instruction or block icon indicates the various
editing options available, for example, moving or selecting.

Tooltip
When you hover your mouse over the block icon, a tooltip with the following information is
displayed:
• Instance name
• Type name
• Task
• Comment
If the instance has no comment, the comment of the type is displayed.

Display of the run sequence (5)


Using the toolbar of the data flow, you can show the position of the instruction or block in
the run sequence.

Icon Meaning
The position number in the run sequence is displayed above the block header.

The name of the assigned task is displayed above the block header.
For subcharts, information that the task was inherited from the basic chart is added
where appropriate.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 99
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Data flow: Zoom function


You can set the zoom ratio and customize the size of the view in the CFC chart using the data
flow toolbar functions.

Zooming in on multiple objects


If you select multiple objects in the CFC chart and then run the "Zoom in" or "Zoom out"
function, the view is zoomed automatically to the center of the selected objects in the work
area.
The objects may also extend to other sheets.

Input boxes: Response to zooming


When you increase the zoom factor for the view of the CFC chart to over 100%, the input
boxes in the chart and in the sheet bar are also zoomed in on. At 200%, input boxes in the
sheet bar are enlarged up to the edge of the area.
The text size in the input box is not affected by the zoom factor. The larger input boxes
therefore allow convenient editing of even long interconnection paths.

Highlighting for signal flow


You can highlight the flow of signals in the CFC chart.
The signal is highlighted starting from the selected block or subchart, ending at the I/O of the
signal in the sheet bar of the CFC chart. All relevant interconnections and blocks are marked
in color here.
The signal is highlighted only within the CFC chart, but not in other charts.
The signal flow is only displayed when a block or subchart is selected.
The function is enabled using the "Highlight signal flow" toolbar icon:

Example
The following figure shows an example of the highlighted signal flow for an interconnection
of type "BOOL". The example in this figure shows a chart section with three instructions.
The arrow marks the click position for the "AND" instruction.
The highlighting is continued to the left and right of the click position up to the chart
boundaries because all three instructions are involved in the signal flow.

Configuring CFC charts


100 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

See also
Representation and properties of interconnections (Page 127)
Placing instructions and blocks in the CFC chart (Page 105)
Adding an instruction or block to the CFC chart (Page 109)
Setting the parameters of the input and output parameters (Page 123)
Adapting the run sequence within the CFC chart (Page 171)
CFC naming conventions (Page 41)
Options for determining the run sequence (Page 168)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 101
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.2 Representation options for the block icon in the CFC chart

Overview
You specify the representation of the block icon in the CFC chart with an attribute at the
block type.
There are multiple options for displaying the block instances.

Note
Block instances
The configured representation option at the block type cannot be changed for specific
instances.
Changing the representation option at the type affects all instances.
Instructions
You cannot change the representation option for instructions from the "Instructions" task
card.

Basic procedure
You specify the size of the block icon in the CFC chart in the properties of the type with the
attribute "Block representation":
1. Open the properties via the shortcut menu of the block type.
2. In the "General" tab, select the "Attributes" item.
3. Enter the required representation option in the "Block representation" field in the "User-
defined attributes" area.
Use the following syntax for this:

Large BuiltIn;Block
Medium BuiltIn;MediumBlock
Medium / narrow BuiltIn;NarrowMediumBlock
Small BuiltIn;SmallBlock

4. Save and compile the changed block.


If you wish to use the changed block as type in a library, copy the changed block into the
respective library.
5. Update the instances of this type in CFC.
Additional information: "Updating instances of a changed block type (Page 120)"

Configuring CFC charts


102 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Representation options for the block icon


The table shows the various representation options.
The same block is displayed in the "Example" column in the corresponding representation
option.

Representation option/syntax Example


"Large" version
Syntax:
• BuiltIn;Block
The block icon is displayed in full size in the CFC
chart with all details in the block header and
block interface.

"Medium" version
Syntax:
• BuiltIn;MediumBlock
The block icon is displayed in medium size in the
CFC chart.
The block header is reduced in size and displays
only the block name.
The parameter names in the symbol are
displayed in abbreviated form in the block
interface.
The complete parameter name is displayed as a
tooltip.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 103
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Representation option/syntax Example


"Medium/narrow" version
Syntax:
• BuiltIn;NarrowMediumBlock
This version corresponds to the "Medium" version
in the representation of block header and
interface.
The width of the block icon is also reduced.

"Small" version
Syntax:
• BuiltIn;SmallBlock
The block icon is displayed in the smallest size.
The block header is hidden.
The parameter names in the block interface are
only displayed as tooltip.

See also
Representation of instructions and blocks (Page 94)

Configuring CFC charts


104 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.3 Placing instructions and blocks in the CFC chart

Adding instructions and blocks


The positioning of instructions/blocks on the sheet of a CFC chart depends on whether you
are working in "data flow" or "control flow" tab.
• Data flow:
Position the inserted object by dragging it with the mouse.
• Control flow:
The inserted object is automatically placed at a free location in the CFC chart.

Automatic placing of instructions/blocks


Objects, such as instructions/blocks, are positioned automatically in "data flow" mode under
the following conditions:
• You add the object in the control flow.
• You add instructions to the CFC chart by double-clicking in the library.
• You enable automatic positioning in the shortcut menu of the object.
If the location of an automatically placed object is occupied by another object, then this
object is moved automatically to a free location.
The property "Position automatically" is set at the properties of an object.
The following figure shows two instructions; automatic positioning is enabled for the
instruction on the left.
The automatically positioned instruction has a colored border:

You disable automatic positioning of an object as follows:


• You disable automatic positioning using the shortcut menu.
• You move the object.

Positioning objects in the CFC chart according to the data flow


Use the function "Place blocks according to the data flow" to place the objects in the CFC
chart, e.g. blocks and instructions, according to the data flow.
This option makes for clearer positioning of objects and data flow as well as easier signal
tracking.
The function is executed only manually in the open CFC chart and you cannot enable it
permanently.
Additional information: "Positioning objects according to the data flow (Page 113)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 105
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Instructions/blocks that cannot be fully displayed


Under the following conditions, objects such as instructions/blocks are displayed without
interconnections and in a different color:
• Automatic placing: There is not enough space for all objects on the sheet of a CFC chart.
• Manual placing: You position objects on top of each other, on an interconnection or on a
sheet border.
Interconnections to objects that cannot be fully displayed are shown as connectors.
If objects are located on top of each other, the lowest object is shown completely. All objects
above it are shown incompletely.
The following figure shows an instruction located on the sheet bar.
The interconnection between the two instructions is displayed as a connector in the sheet
bar:

See also
Representation and properties of interconnections (Page 127)
Adding an instruction or block to the CFC chart (Page 109)
Deleting an instruction or block from the CFC chart (Page 114)
Aligning objects in a CFC chart (Page 112)

Configuring CFC charts


106 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.4 Copying instructions, blocks and charts

Blocks with interconnections to external tags


If you interconnect an input or output parameter with an external tag, a connector is created.
The connector has the name of the external tag.
If you copy an instruction or a block with an interconnection to an external tag, the connector
is also copied.
The name of the tag will remain the same in the copy of the connector.
Check the interconnection with the external tag in the copy and change the name, if
necessary.

WARNING
Check the user program before using it
Despite a valid criteria check, the algorithm can be different in the instructions or blocks.
To avoid possible errors in the plant, check the code of the user program in the instruction
or block if you are uncertain.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 107
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Copying CFCs
If you copy a chart, an instruction or a block across devices or projects, then the following
conditions will apply:

Condition Resulting action


The block that is to be copied The block is copied completely, including all necessary called
is missing in the target system. blocks, to the "Program blocks" folder.
At the same time, the block is imported as type into the CFC
of the target system.
The block / type that is to be The CFC is copied to the target system. The type remains the
copied differs only in the same in the target system. The copied CFCs in the target system
block numbering in source and is adapted.
target system.
A type, instruction or block with The two instructions/blocks are compared based on their input
the same name already exists and output parameters and the following criteria:
in the target system.
• Quantity
• Name
• Data type
• Section
• Order
The copy function will only be performed if all the criteria match.
Otherwise, the copy function is canceled.
The task of the CFC to be copied The CFC is not copied to the target system.
does not exist in the Special considerations for the S7 target system
target system.
The CFC is copied to the target system. The assignment of the
CFC to the task is retained. A non-existent task is created during
the next compilation of the software, if the target system
supports this task.

See also
Copying objects (Page 40)
Interconnecting the input and output parameters with an external tag (Page 146)
Overview of textual interconnections (Page 158)

Configuring CFC charts


108 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.5 Adding an instruction or block to the CFC chart


For configuration of a CFC chart insert the instructions or blocks to the chart and configure
interconnections and parameters.

Requirement
• A CFC chart is open.
• The "Instructions" or "Libraries" task card is open.

Procedure
1. Navigate to the storage location of the selected instruction or block.
Possible storage locations:
– "Instructions" task card
– Library
– "Program blocks" folder in the project tree
2. Drag-and-drop the instruction or block to the CFC chart.
3. Place the instruction or block at the desired location in the CFC chart.

Alternative procedure
You can insert one or more existing blocks using copy and paste:
• Keyboard shortcuts <Ctrl+C> and <Ctrl+V>
Blocks copied in are placed at an offset over the blocks that serve as the copy source.
• Shortcut menu: "Copy" and "Paste" entries
The position of the mouse pointer when selecting the "Paste" entry determines where the
blocks are inserted.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 109
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Result
The instruction or block is inserted into the CFC chart.

Note
Inserting a deleted instance again
Before you insert the deleted instance of a block type again, transfer the change to the
controller via a full download or 2x download of changes.
This prevents name conflicts during download.
Additional information: "Deleting an instruction or block from the CFC chart (Page 114)"

See also
Interconnecting input and output parameters (Page 136)
Adapting the run sequence within the CFC chart (Page 171)
Representation and properties of interconnections (Page 127)
Deleting an instruction or block from the CFC chart (Page 114)
Type and instance (Page 29)
Updating instances of a changed block type (Page 120)
"CFC" Editor (Page 45)

Configuring CFC charts


110 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.6 Adding a text box to a CFC chart

Overview
To document the function of the CFC, add texts and images to the CFC:
• You can use texts, for example, to document the signal path.
• With an image, you can, for example, represent the part of the plant that is processed by
the CFC.
Use the text boxes to add texts and images to the CFC.
Text boxes can be located in the foreground or background of the CFC and can contain text
as well as a background image.
Text boxes in the background are ignored by blocks, instructions and interconnections.

Requirement
• A CFC is open.
• "Data flow" is displayed.

Procedure
1. Click "Insert text box" in the toolbar.
2. Keep the mouse button pressed to move the text box to the required position in the CFC and
adjust it in size.
3. Select the "Text box in background" option under "General" in the Inspector window.
4. To display a graphic, select the "Use background image" option under "General".
Select the graphic in the file selection dialog.
5. If necessary, enter the "text" for the text box.
6. If necessary, you can set additional properties of the text box in the Inspector window, such
as border, font or font size.

See also
Aligning objects in a CFC chart (Page 112)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 111
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.7 Aligning objects in a CFC chart


You can align objects, such as instructions, blocks and text boxes, in the CFC or distribute
them evenly.
First, select the required objects.

Alignment
The reference object on which the other objects will orient themselves is decided
automatically within the selection.
The following criteria apply:

Align
The selected objects are aligned with each other.
The object used as the reference is the furthest object in the required alignment direction.
Example: If you want to right align the edges of three objects, the objects are aligned with
the object located furthest right.

Distributing
The selected objects are distributed evenly.
The reference value used is the average position value of all the objects included in the
selection.

Requirement
• A CFC is open.
• "Data flow" is displayed.
• Multiple objects have been added.

Procedure
1. Select the objects in the chart.
2. Select the command you require under "Align" in the shortcut menu of the selection.

Result
The selected objects are aligned or distributed evenly depending on the command you select.

See also
Adding an instruction or block to the CFC chart (Page 109)
Adding a text box to a CFC chart (Page 111)

Configuring CFC charts


112 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.8 Positioning objects according to the data flow

Overview
When you configure a CFC, objects, such as instructions, blocks and text boxes, are added,
positioned and interconnected one after the other.
The representation of the chart can get confusing when you have a large number of objects
and interconnections.
Use the function "Place blocks according to the data flow" to place the objects in the CFC, e.g.
blocks and instructions, according to the data flow.
This option makes for clearer positioning of objects and data flow as well as easier signal
tracking.

Response
• The objects in the CFC are sorted automatically in columns one below the other and
aligned on a mutual axis in the columns.
The width of a column is determined by the widest object in the column.
• Independent subnets are listed one after the other and have columns independent of one
another.
• Each object is placed automatically in the chart this way so that it does not intersect the
sheet bar or other objects.
• For all objects that do not take part in the data flow, e.g. text boxes, the property "Position
automatically" is selected.
The function is executed only manually in the open CFC and you cannot enable it
permanently.

Requirement
• A CFC is open.
• "Data flow" is displayed.
• Multiple objects have been added.

Procedure
1. In the toolbar select the symbol "Place blocks according to the data flow":
The selected objects are aligned automatically.
2. Use the "Undo" button in the toolbar to undo this change.

Result
The objects in the CFC are sorted according to the data flow.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 113
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.9 Deleting an instruction or block from the CFC chart


You can delete instances of instructions and block types in a CFC chart.

Note
Checking interconnections
If you delete an instruction or a block with interconnections, the interconnections are also
deleted.
Before deleting an instruction or block, you should check whether the chart has
interconnections.
The values of the respective input and output parameters are reset to the values preset in the
block type.
Correct the reset parameters if necessary.

Deleting instances in the device


When you insert a new instance of the same block type in the CFC chart after deleting an
instance, this instance is given the same name as the deleted instance.
As long as the deleted instance is still in the controller, this leads to a conflict during
download.
To restore consistency, perform one of the following actions:
• Full download
• 2x consecutive downloads of changes
After the first download of changes, the instance in the device may still not have been
fully deleted.

Requirement
• The CFC chart is open.
• An instruction or block has been created.

Procedure
1. Select the instruction or block.
2. Select the "Delete" command in the shortcut menu.
3. Start either a full download or two consecutive downloads of changes.
This also deletes the instance in the device.

Configuring CFC charts


114 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Result
The instruction or block is deleted.
All incoming and outgoing interconnections are also deleted.
As default, the affected input and output parameters are assigned the values of the type.

See also
Adding an instruction or block to the CFC chart (Page 109)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 115
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.10 Central change of a block type

Overview
A block type is a reusable, pre-defined function.
You can create your own block type or use a block type from a library.
You create an instance by inserting a block type into a CFC chart.
The advantage of this type-instance concept is that any change of the block type can be
implemented at all instances.

Changing the block type


If the interface, the system attributes or the algorithm is changed at a block type, then an
update of the instances in the CFC charts becomes necessary.
To this end, the changed block is added to a CFC chart.
All instances of this block are also changed in all CFC charts of this target system so that they
match the new block.

Options for block change


You can change the following blocks:
• Self-created block type in the "Program blocks" folder in the project tree
• Provided block type in a library

CAUTION
Interface change can result in full download
After interface changes at the block type and subsequent update of the block type in the
target system, you will often only be able to compile and load the entire software.
An interface change is, for example, the change of the parameter data type.
Loading of the entire software with the S7 target system requires a CPU stop.
Effects of the block change
Note the effects on the instances with every change.
Do not change internal CFC blocks
CFC creates system blocks that are displayed in a number of views or lists, for example,
under "Program information".
You may not change these objects.
Only edit your own blocks and instructions using the STEP 7 editors.

Configuring CFC charts


116 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Note
"Instructions" task card
You cannot change block types in the "Instructions" task card because they are an integral
part of CFC.

Updating the instances


To update the instances after a block type change, you will have to import the new version of
the block type into the CFC.
You have the following options to do this:
• Blocks from a library:
Adding the changed block type to a CFC chart
• Blocks from the "Program blocks" folder:
– Adding the changed block from the "Program blocks" folder
– Use the "Chart sequence & extras" editor in the "Block types" tab (depending on the
target system)
Before the changed block type is imported, the block versions are compared.
The differences are displayed in the "Update blocks" dialog.
An icon in the last column indicates whether or not the change requires a download of the
software.
Additional information: "Updating instances of a changed block type (Page 120)"

Effects on the instances

Note
Checking the effects
When you update an instance after a central block type change, all other block instances in
the CFC charts of the CPU are changed automatically.
This also applies to instances in password protected CFC charts.
Therefore, check the effects in the instances before you perform the update.

Block name
Changing the block name does not affect existing instances.
Only the name of the block type is changed in the "Type data" area of the instance properties.
The instance name in the "Instance data" area is not changed.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 117
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Comments
Comments are usually overwritten at the instances.
However, comments that were changed for specific instances are not overwritten.

Parameter
Examples of typical changes to block type parameters:

Change to the block type Effect


Parameter is added This change takes effect in the instances.
The system attributes are set to default values.
Check and update the parameter assignment or interconnection of the
new parameter at the instances.
The interconnections are hidden when the block instance becomes too
large for display in the CFC chart due to an increase in the size of the
block type.
If necessary, move the instance so that it is displayed completely in the
chart.
Parameter was deleted The parameter is deleted in the instances.
If the parameter is interconnected, the interconnection is also deleted.
After the deletion, check the parameter assignment at the
interconnection partner.
Changed data type of a The behavior corresponds to deleting and creating a new parameter.
parameter
Changed parameter name The system cannot automatically make a connection to the old name.
This happens when you delete a parameter and create a new one.
Changed sequence of The sequence of parameters is taken into account.
parameters The interconnection, the parameter assignment, and the attributes are
retained.
However, moving two subsequent parameters with the same data type
only corresponds to renaming the two parameters. It does not include
the interconnection of the parameters.

Configuring CFC charts


118 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Values, comments and system attributes of the parameters


Effect of attribute changes:
• Changes that cannot be made for a specific instance are made automatically at the
instances.
• Instance-specific values, comments, and system attributes are usually overwritten.
However, values, comments or system attributes that were changed for specific instances
are not overwritten.
The table shows examples of deviations from this rule:

Change to the block type Effect


The "Configurable" attribute The "Configurable" attribute cannot be changed for specific instances.
is deleted. The change has an effect on all instances:
• Existing parameter assignments of the input or output parameter
are maintained.
The "Interconnectable" The "Interconnectable" attribute cannot be changed for specific
attribute is deleted. instances.
The change has an effect on all instances:
• Existing interconnections are deleted.
The "Low limit" and "High "Low limit" and "High limit" cannot be changed for specific instances.
limit" attributes are The change has an effect on all instances:
configured.
• When an existing parameter value exceeds a limit value in the
instance, the parameter value is set to the default value of the
block.

See also
Type and instance (Page 29)
Creating a block type for CFC (Page 122)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 119
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.11 Updating instances of a changed block type

Overview
Blocks added in the CFC chart represent an instance of a block type.
The block type exists, for example, in a library or in the "Program blocks" folder of the project
tree.
After changing a block type, you can update the instances of this block in all CFC charts of a
target system.
Additional information: "Type and instance (Page 29)"

CAUTION
Interface change can result in full download
After interface changes at the block type and subsequent update of the block type in the
target system, you will often only be able to compile and load the entire software.
An interface change is, for example, the change of a default value.
Loading of the entire software with the S7 target system requires a CPU stop.
Effects of the block change
Note the effects of the change on the updated instances.
Additional information: "Central change of a block type (Page 116)"

Requirement
• A CFC chart is open.
• The changed block type exists in a library, for example.

Configuring CFC charts


120 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

Procedure
1. Select the changed block type in a library or in the project tree in the "Program blocks"
folder.
2. Drag the symbol in the CFC chart.
If at least one instance of the block is used in a CFC chart of the CPU, the "Update blocks"
dialog is displayed.
– The changes and their effects are listed.
– An icon in the last column indicates whether or not the change requires a download of
the software:
No download necessary *)
Download of the software required
Download with CPU Stop required
*) Regardless of CFC, changed blocks may be downloaded by STEP 7 into the
controller.
3. To update the instances, click "OK".
The block instances are updated in all CFC charts of the same target system to the
changed version.
If necessary, change the interconnections at the instances.

S7 target systems: Alternative procedure


You can also update block types in the "Program blocks" folder in the "Block types" tab of the
"Chart sequence & extras" editor.
The functionality in this tab is specific to the target system.
Additional information: "Working with CFC charts for S7 > Updating block type imported in
CFC"

Result
The instances of a changed block type are updated in all CFC charts of the target system.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 121
Configuring and adapting CFC charts
4.4 Adding and managing objects in the CFC chart

4.4.12 Creating a block type for CFC


Complex functions can be combined and reused in a block in the type-instance concept.
You can define a block you have created yourself as a type and save it in the project library or
a global library.

Requirement
• The "Libraries" task card is displayed.
• You have created a block in the project tree.

Procedure
1. Select the pane with the library in the "Libraries" task card in which you want to define a
block type:
– The "Global libraries" pane for the required global library
– The "Project library" pane
2. Click the "Master copies" folder in the selected library.
Any existing subfolders are displayed.
You can create a new subfolder, if necessary, in the shortcut menu with the "Add folder"
command.
3. Copy the required block with drag-and-drop to the intended position in the "Master copies"
folder.
The shape of the mouse indicates where you can add the block.

Result
A new block type has been defined in the project library or in a global library.
You can create instances of this block type and use them in CFCs.

See also
Type and instance (Page 29)
Central change of a block type (Page 116)

Configuring CFC charts


122 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5 Configuration and interconnection of input and


output parameters

4.5.1 Setting the parameters of the input and output parameters

Overview
If you add an instruction from the "Instructions" task card or a block from a library to a CFC,
then the parameters are assigned with the values of this object type by default.
Values that were changed at the type are passed to the instance in the CFC the next time a
type import is performed.
If you assign parameter values to the input or output parameters, passing on the parameter
value from the type to the instance is interrupted.
You can re-enable the passing on of these values at any time in the Inspector window. The
assigned parameter value is then once again replaced by the default value of the type.
When you assign a parameter value, the entered value is checked for plausibility and syntax
depending on the data type.

Requirement
• A CFC is open.
• "Data flow" is displayed.
• An instruction or block has been added.

Procedure
1. Select the required input or output parameter in the CFC.
2. Enter a value for the input or output parameter in the "Value" field of the Inspector window.
This stops the value from being passed on by the type of this instruction or block.
If the values for "Low limit" and "High limit" are configured at the type, these limits are
taken into consideration when you make an entry in the "Value" field.
3. If necessary, enter a measurement unit in the "Unit" field or select a unit from the list.
If a unit is assigned at the type, this unit is passed on to the instance.
You can disable this process by making an entry or selecting from the list.

Alternative procedure
As an alternative, you can set the input or output parameters directly in the CFC.
If you need to set many parameters for the input or output parameters, use the "control flow"
mode.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 123
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Result
The input or output parameter has been assigned.
When you download the CFC to the device, the input or output parameter has the assigned
value as default.

Configuring CFC charts


124 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.2 Pre-assignment of attributes for input and output parameters

Attributes at the block type


You can configure the attributes of an input or output parameter at each instance of a block.
It is also possible to pre-assign the attributes of an input or output parameter at the block
type.
These pre-assigned values are passed on at an instance of this type.
You can either accept this pre-assignment or, if necessary, change it for specific instances.
These attributes include, for example:
• Can be changed for specific instances:
– Comments
– Attributes, e.g., "Value", "Unit", "Invisible", "For test"
• Cannot be changed:
– e.g. the attributes "Configurable", "Interconnectable" "Low limit", High limit"

Basic procedure
1. Open the block used as type, for example, in the "Program blocks" folder of the project
navigation.
2. Select the required input or output parameter in the interface.
The "General" tab is displayed in the Inspector window.
3. Under "Attributes", make the required settings to be passed on as pre-assignment to the
associated instances.
4. Save and compile the changed block.
If you wish to use the changed block as type in a library, copy the changed block into the
respective library.
5. Update the instances of this type in the CFC.
Additional information: "Updating instances of a changed block type (Page 120)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 125
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Display and update at the instance


If the input or output parameter is selected, the pre-assigned values are displayed in the
"Type data" column under "General" in the Inspector window.
The pre-assignments for values and functions configured in the type are passed on to the
instance.
You can make your own configurations in the instance, e.g., enter start values, select units.
This stops the respective value from being passed on by the block type.
The following symbols display the status:

Icon Meaning
The value is passed on from the type to the instance.

The value is not passed on from the type to the instance because it was changed
at the instance.
You can re-enable the passing on by clicking on this symbol.

Updating instance
Instance-specific changes are not automatically overwritten when the type is updated.

Notes: "Low limit" and "High limit"


The low limit and high limit values are displayed after the data type as additional information
at the parameter of the block instance in the "Type data" column of the "Type" field.
"Low limit" and "High limit" cannot be changed for specific instances.
These two values have an effect on all instances when the type is updated:
If an existing parameter value exceeds a limit value, the parameter value is set to the default
value of the type and a log entry is made.

Example
• Data type = INT
• Low limit = 10
• High limit = 90
Display in the "Type" field:
• Int (10..90)

Configuring CFC charts


126 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.3 Representation and properties of interconnections

Routing of an interconnection
When configuring interconnections, you only specify which output parameter is
interconnected with which input parameter.
The routing of the interconnection is handled by the editor. Other objects in the CFC chart are
automatically avoided.
If you move interconnected instructions or blocks in the CFC chart, the routing of the
interconnections is adapted automatically.
The following figure shows the routing of an interconnection around a third object:

If you have marked text boxes as being in the "background", these are ignored by the routing.

Interconnection options
The following options are possible for interconnections:
• From one output parameter to one or several input parameters
• From one input or output parameter to one external tag
An overview of the points of use of interconnected tags and global data blocks can be
found in the "Tag interconnections" tab of the "Chart sequence & extras" editor.
• Several options are available for input and output parameters of STRUCT data type.
More information: "Interconnections with structures as input and output parameters
(Page 133)"

Note
Interconnections to constants are not possible.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 127
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Interconnections from one output parameter to several input parameters


You can use the value of an output parameter as the value for several input parameters.
You need a multiple interconnection for this purpose.
An interconnection node is inserted for each branch to an input parameter. An
interconnection node corresponds to an interconnection at the output parameter.
If you drag an interconnection node to an output parameter, all interconnections leaving the
interconnection node is interconnected to this output parameter.
The following figure shows an interconnection from one output parameter to two input
parameters with one interconnection node:

Interconnection that cannot be fully displayed


Every object and every interconnection requires space in the CFC chart. If interconnections
cannot be displayed fully, the editor automatically uses connectors.
The following figure shows an interconnection between two AND logic operations that
cannot be displayed completely:

The interconnection is represented by connectors with the same numbers.


If there are multiple connectors, the numbers are incremented continuously.
To jump between connectors in the view, double-click the respective connector.

Interconnection beyond sheet borders


If you interconnect instructions or blocks beyond sheet borders, the interconnection leads as
far as the sheet bar of the sheet.
A connector is inserted in the sheet bar. The connector has the name of the target object and
the parameter.
If the destination of an interconnection is located in a different CFC chart, the name of the
CFC chart is also displayed. When the CFC chart contains multiple chart partitions, the chart
partition name and the sheet number are also displayed.

Configuring CFC charts


128 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Color display
The color of the connector shows the type of interconnection.
• Connector color "Light beige":
The selected target connector is displayed in the sheet bar.
• Connector color "Dark beige":
The selected target connector is displayed in the extended sheet bar.
Connectors 1 to 8 are shown in the following figure at the different output parameters.
• Connectors "1" to "5" as well as "7" are "light beige".
This means the selected target connector is displayed in the sheet bar.
• Connectors "6" and "8" are "dark beige".
This means the selected target connector is displayed in the extended sheet bar.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 129
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Navigation beyond sheet borders


When you double-click on a connector or sheet bar entry, the destination of the
interconnection is displayed centered in the work area.
To jump back, select the "Back" command in the shortcut menu of the chart.
To continue configuration, use "Back" to switch between the last two positions.

Display in the sheet bar view


The following figure shows an interconnection between two instructions on different sheets
of a CFC chart with the sheet bars enabled.

If the sheet bar view is disabled, the following rules apply to interconnections between sheets
or between charts:
• Between sheets:
The interconnection is displayed normally on one sheet.
• Between charts:
The connector is placed next to the parameter.

Placing a connector manually


In a chart with disabled sheet bar view, you can manually move connectors between sheets
and between charts:
• Automatic placing of the moved connector is disabled.
The connector remains in this position, regardless of the associated instruction position.
• To reenable automatic positioning, select the "Position automatically" option from the
shortcut menu of the connector.

Configuring CFC charts


130 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Signal tracking for interconnections


If you click on an interconnection or a connector, the interconnection is highlighted in color.
The mouse pointer changes and is shown as "Interconnection cursor".
If output parameters have several interconnections, which interconnection is highlighted
depends on where you click. Depending on the position of the click, either all
interconnections or only some of them are highlighted.
You have the following options to track a signal for an interconnection across sheets:
• A single click on the connector at the parameter of the block or instruction displays the
associated connector in the sheet bar or the extended sheet bar.
• If you double-click on a connector in the sheet bar, then the destination of the
interconnection is displayed in the work area.
Depending on the position of the interconnection target, the respective sheet of the same
CFC chart or chart partition is displayed or the respective CFC chart opened.
To jump back or to switch between positions, select the "Back" command in the shortcut
menu of the chart.
For navigation between the chart partitions, also use the drop-down list or the keyboard
shortcuts <Shift+PgUp> and <Shift+PgDn>.

Example
The following figure shows an output parameter with multiple interconnections of a sheet-
internal interconnection.
The arrow shows the click position and the resultant color highlighting.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 131
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Color of connection lines depends on the data type


The interconnection lines in the "Data flow" view of the CFC chart are displayed in different
colors depending on the data type.
The assignment of the data type and color can be changed.
The data type of the data source determines the shown color.
For interconnections to operands whose data type is not defined, the default value "black" is
used.
More information: "Changing the color of interconnection lines (Page 135)"

See also
Displaying points of use of interconnections (Page 153)
CFC views (Page 66)
Placing instructions and blocks in the CFC chart (Page 105)
Interconnecting input and output parameters (Page 136)
Working with multiple interconnections (Page 141)
Changing an interconnection (Page 155)
Changing the color of interconnection lines (Page 135)
Deleting an interconnection (Page 157)
Adding or removing input parameters (Page 148)
Hiding input and output parameters (Page 151)
Interconnecting the input and output parameters with an external tag (Page 146)
Interconnections with structures as input and output parameters (Page 133)
Negating input parameters (Page 150)
TERMINAL: Summary of interconnections (Page 289)

Configuring CFC charts


132 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.4 Interconnections with structures as input and output parameters

Interconnecting structures and structure elements


In CFC, it is possible to interconnect the input or output parameters of the STRUCT data type
as a complete structure.
However, you can also interconnect individual structure elements of a parameter of the
STRUCT data type.
Structure elements can be of an elementary data type or "STRUCT in STRUCT".

Note
Configuration depending on the target system
Interconnection of structures and their elements depends on the target system.
Target system S7: Interconnection with the chart interface
The individual structure elements cannot be interconnected for a parameter of the STRUCT
type in the chart interface.
Only the complete structure can be interconnected.

Requirement for interconnection


To interconnect the structure and its elements at the block icon, the "invisible" option must
be disabled for the parameter containing the structure or structure element. The
corresponding parameter is visible at the block icon.
If you only need to interconnect individual structure elements, the parameter containing the
corresponding structure element must be visible, but not necessarily the parameter
containing the structure itself.
The "invisible" option is enabled by default and must be disabled at specific instances for each
parameter that contains a structure or structure element.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 133
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Appearance

Block icon in the CFC


Parameters of the STRUCT data type and their elements are displayed at the block icon similar
to other block parameters. Requirement is that the "invisible" option is disabled in the
parameter properties.
The visible parameters of structure elements are displayed with indent, even if the "invisible"
option is set for the parameter containing the structure itself.

Control flow
Structure elements are displayed in the control flow with right indent.

Invisible structures and structure elements at the block


In CFC, the triangular icons below the block icon are normally used to indicate whether this
block contains hidden parameters, or hidden interconnected parameters.
For parameters of the STRUCT data type, the triangular icons are only used to indicate the
hidden, interconnected structures and structure elements, as structures and structure
elements are normally hidden in CFC.

Interconnection options
• Input parameter "Input" or "InOut" with the STRUCT data type:
The parameter can either be interconnected as a complete structure or the individual
structure elements of this input parameter can be interconnected individually.
• Output parameter "Output" with the STRUCT data type:
The complete structure, as well as individual structure elements, can be interconnected.
• Individual structure elements of input or output parameters of the STRUCT data type can
be interconnected to a different, compatible input or output parameter.

See also
Interconnecting the input and output parameters with an external tag (Page 146)

Configuring CFC charts


134 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.5 Changing the color of interconnection lines

Line color and data type


The interconnection lines in the "Data flow" view of the CFC are displayed in different colors
depending on the data type.
The assignment of the data type and color can be changed.
The data type of the data source determines the shown color.
For interconnections of operands whose data type is not defined, the default value is "black".
Changing the color assignment has an effect on the display of interconnection lines in an
open CFC.

Procedure
1. Select the "Settings" command in the "Options" menu.
2. Select the "Charts > CFC > General" group in the area navigation.
3. Select the desired colors for the data types in the "Color of interconnection lines" area.
You can also use the "Default values" button to reset all settings to the default values.

Result
The color setting for the interconnection lines has been changed.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 135
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.6 Interconnecting input and output parameters

Overview
You always interconnect an output parameter with an input parameter.
When you click on an instruction or block while creating an interconnection, the possible
destination points are shown in color.
The following rules apply to interconnecting input and output parameters:
• You can only interconnect an input parameter once.
• You can interconnect an output parameter more than once.
• An interconnection is only possible if the data types of the input and output parameters
are compatible.

Possible procedures
You can create interconnections using the following methods:
• Double-click / Click
• Drag-and-drop
• Click Clack
• <C> key and click
• Copy&Paste
• Manual input of the interconnection target (Textual interconnection)

Requirement
• All CFC charts are open whose parameters you want to interconnect.
• "Data flow" is displayed.
• Instructions/blocks have been inserted.

Configuring CFC charts


136 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Procedure
1. Double-click on the required output parameter.
An interconnection line is shown between the output parameter and the mouse pointer.
2. If the interconnection destination is in the same chart, click on the input parameter at the
target object that you want to interconnect.
When you move the mouse over the input parameters, the interconnectable parameters
are displayed with a green background.
The selected parameter is displayed with a light green background.

The interconnection is inserted and the interconnection line displayed.


3. If the interconnection destination is located in another CFC chart, move the mouse pointer
onto the respective CFC chart in the taskbar after step 1.
The CFC chart is displayed in the work area.
4. In this CFC chart, click on the input parameter at the target object that you want to
interconnect.
The interconnection is inserted and the interconnection line displayed.
Depending on the space available in the CFC chart, the interconnection is displayed either
fully or by connectors.
5. To cancel the interconnection, click on a free location in the CFC chart or press <Esc>.

Alternative procedure: Drag-and-drop


1. Select the input or output parameter and keep the mouse button pressed.
2. Drag the interconnection line to the desired parameter and release the mouse button.

Drag-and-drop between charts


1. Open the CFC chart and the target chart in the data flow.
2. To display both charts, click one of the buttons for splitting the editor area:
3. Drag the cross-chart interconnection with the mouse button.
As an alternative, drag the parameter to the target chart using the taskbar of the open charts.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 137
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Alternative procedure: Click Clack


1. Select the interconnection line at the input or output parameter.
The selected parameter turns magenta.
2. Select a parameter that is shown in green when you place the mouse cursor over it.
3. To create multiple interconnections, click on additional parameters displayed in green while
pressing the <Ctrl> key.
The interconnections for the clicked parameters are created.

Alternative procedure: <C> and click


1. Select the input or output parameter and press the <C> key.
The selected parameter turns magenta.
2. Click on a parameter that is displayed in green.
3. To create multiple interconnections, click on additional parameters displayed in green while
pressing the <Ctrl> key.
The interconnections for the clicked parameters are created.

Alternative procedure: Copy&Paste

Keyboard
1. Select the output parameter and press <Ctrl+C>.
2. Select the output parameter and press <Ctrl+V>.
Use the arrow keys to switch between the parameters of a block or between blocks.

Mouse operation
1. Select the "Copy" entry in the shortcut menu of the output parameter.
2. Select the "Paste" entry in the shortcut menu of the input parameter.

Configuring CFC charts


138 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Alternative procedure: Manual input

Enter parameter manually


Interconnection possibilities:
• Direct entry of the parameter in the input field
You are supported by the auto-complete function in this process.
• Opening a selection dialog with the triangle symbol to the right of the input field
Syntax for manual input:
• Interconnection destination is in the other CFC chart:
– "\<Chart name>\<Object name>.<Parameter name>"
Example: \Chart_1\AND_1.OUT2
• Interconnection destination is in the same CFC chart:
– "<Object name>.<Parameter name>"
Example: AND_1.OUT2

Enter operand manually


Interconnection possibilities:
• Direct entry of the operand in the input field
You are supported by the auto-complete function in this process.
Syntax for manual input:
• Interconnection destination is an external tag.
– "<Tag name>"
Example: "StartMotor"
• Interconnection target is a data block:
– "<DB name>.<Parameter name>"
Example: "MotorDB.Start"

Procedure
1. Select the parameter to be interconnected at the block in "Data flow" or the corresponding
cell in "Control flow".
2. To create an interconnection to an address:
– Select "Interconnection to operand..." from the shortcut menu.
– Enter the interconnection destination manually or use the selection dialog box.
3. To create an interconnection to a parameter select the command "Textual interconnection
to chart..." from the shortcut menu.
– Enter the interconnection destination manually or use the selection dialog box.
Additional information: "Creating, editing and closing textual interconnections (Page 161)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 139
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Result
The parameters of the two instructions/blocks are interconnected with each other.
Depending on the space available in the CFC chart, the interconnection is displayed either
fully or by connectors.
To display an overview of the points of use of interconnected tags and global data blocks, use
the "Tag interconnections" tab of the "Chart sequence & extras" editor.

See also
Displaying points of use of interconnections (Page 153)
Representation and properties of interconnections (Page 127)
Working with multiple interconnections (Page 141)
Deleting an interconnection (Page 157)

Configuring CFC charts


140 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.7 Working with multiple interconnections

Overview
You can interconnect an output parameter with several input parameters.
Place instructions or blocks with multiple interconnections in the CFC chart so that few
interconnection nodes are necessary.
The following figure shows the same interconnection, the only difference being the
positioning of the objects:

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 141
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Creating multiple interconnections


You create multiple interconnections by connecting the output parameter to the input
parameters of the target objects.
Depending on the positions of the target objects, this step results in one or more
interconnection nodes.
You have the following options to interconnect an output parameter with several input
parameters:

Procedure: <C> key and click


1. Click on the output parameter.
2. Press the <C> key.
3. Press and hold down the <Ctrl> key and click on the input parameters one after the other.

Alternative procedure: Click Clack


1. Select the interconnection line at the input or output parameter.
The selected parameter turns magenta.
2. Select a parameter that is shown in green when you place the mouse cursor over it.
3. Press and hold down the <Ctrl> key and click on other parameters displayed in green.

Alternative procedure: Copy&Paste


1. Click on the output parameter.
2. Press the shortcut <Ctrl+C>.
3. Click on the input parameters, one after the other, and press <Ctrl+V>.
Instead of the keyboard shortcuts, you can also use the "Copy" and "Paste" entries in the
shortcut menu of the parameters.

Alternative procedure: Drag-and-drop, double-click


With this procedure you need to return to the output parameter for each interconnection.
1. Create an interconnection from the output parameter to the input parameter.
2. Select the output parameter again and create the next interconnections, one after the other.

Configuring CFC charts


142 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Editing multiple interconnections


If you point to an interconnection with the mouse, editing areas are marked.
The following figure shows the editing areas with two multiple interconnections:

① Interconnection at the input parameter.


Drag-and-drop: Interconnection with another input parameter.
Signal tracking: If you click on an editing area at the input parameter, the interconnection is
highlighted in color.
② Represents the interconnection at the output parameter of the source block.
Drag-and-drop: Interconnection with another output parameter. The interconnection then no
longer belongs to the multiple interconnection.
③ Represents some of the interconnections at the output parameter of the source block.
If several interconnection nodes result, these are arranged hierarchically.
Drag-and-drop: Interconnecting the input parameters with another output parameter.
④ Represents all interconnections at the output parameter of the source block.
Drag-and-drop: Interconnecting all input parameters with another output parameter.

See also
Representation and properties of interconnections (Page 127)
Interconnecting input and output parameters (Page 136)
Displaying points of use of interconnections (Page 153)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 143
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.8 Interconnections to parameters of the chart interface

Overview
Hierarchical CFCs and standard CFCs have an interface.
This means that these CFCs can be configured and interconnected externally similar to
blocks.
Interconnections of interface parameters with blocks within the CFC are displayed in the
sheet bar of the chart with connectors.

Parameters and data types


New parameters can be added, modified or deleted in the Input, Output, InOut sections of
the chart interface.
All CFC data types are supported in the chart interface except:
• TIMER
• COUNTER
More information: "Adding, editing and sorting parameters of the chart interface (Page 92)"

Note
S7 target system: Interconnection of structure elements
The S7 target system does not support interconnections of individual structure elements of
parameters of the STRUCT data type in the chart interface.
You can only interconnect the complete structure.
S7 target system: No hardware data types
Chart interfaces do not support any hardware data types.

Interconnection between interface and block parameters


You create a new interconnection between the input or output parameters of a block and an
existing parameter in the chart interface.
Drag the required block parameter with the mouse to the desired location in the chart
interface, for example, to the "Output" section for an output parameter of a block.
When you release the mouse button, the new interconnection is created and displayed in the
sheet bar of the chart with connectors when the data type matches.

Configuring CFC charts


144 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Interconnection with the creation of a new interface parameter


You can also create a new interconnection when the interface parameter does not exist yet.
Drag the required block parameter to an empty line of the matching section of the chart
interface, for example, to the "Input" section for an input parameter of a block.
When you release the mouse button, the new interface parameter with the matching data
type is created. The attributes of the associated block parameter are applied.

Rewire interconnection: Blocks


In a rewire you change an existing interconnection between the input and output parameters
of blocks in the chart interface.
Drag the required interconnection at the block parameter to an existing parameter in the
chart interface using drag-and-drop.
The mouse pointer indicates if this interconnection is possible.
When you release the mouse button, the selected interconnection is rewired to the required
parameter in the chart interface.

Rewire interconnection: Interface and block parameters


You can also rewire an interconnection between a block parameter and an interface
parameter to an existing interface parameter.
Drag the connector of this interconnection in the chart sheet bar, for example, "Input2" to an
existing parameter of the chart interface, for example, "Input7".
The mouse pointer indicates if this interconnection is possible.
When you release the mouse button, the selected interconnection is rewired to the required
parameter in the chart interface. The associated connector in the sheet bar is renamed, for
example, to "Input7".
As long as an interface parameter has not been interconnected, the table cell of the "Data
type" column has a "light gray" background color.
Upon interconnection, the background color changes to "medium gray".

See also
Hierarchical CFC charts (Page 31)
Interconnecting input and output parameters (Page 136)
Displaying points of use of interconnections (Page 153)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 145
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.9 Interconnecting the input and output parameters with an external tag

Overview
If you need values from the device in the CFC, or want to return values to the PLC,
interconnect an input and output parameter with an external tag.
Depending on the target system you are using, an external tag represents signals from
modules or the device.
An external tag can also be a structure.

Note
Interconnection only possible in the target system
You can only use external tags that belong to the same controller as the CFC.
Synchronization while compiling the chart
Only the name of the external tag is stored in the connector.
Whether or not a tag with this name exists in the target system is only checked when the
chart is compiled.

Interconnecting structures
You can interconnect structures with input and output parameters of the STRUCT data type.
You can interconnect the complete structure, as well as individual structure elements with
the compatible block parameters.
Additional information: "Interconnections with structures as input and output parameters
(Page 133)"

Requirement
• A CFC is open.
• The detail window is displayed.
• "Data flow" is displayed.
• Instructions/blocks have been inserted.
• The data types of the external tag and the input or output parameters are compatible.

Procedure
1. Select the folder in the project tree in which the external tags are stored.
The position of the folder depends on the target system you are using.
2. Drag the external tag from the detail window to the input or output parameter.

Configuring CFC charts


146 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Alternative procedure
As an alternative, you can also interconnect the external tag using the shortcut menu of the
input or output parameter.
If you have created a tag for a signal, you can drag a signal of a module to an input or output
parameter directly from the device configuration.

Result
The input or output parameter is interconnected to the external tag.
The connector with the tag name is positioned either in the sheet bar or besides the
parameter depending on the sheet bar view you have set.

See also
Setting the parameters of the input and output parameters (Page 123)
Copying instructions, blocks and charts (Page 107)
Interconnecting input and output parameters (Page 136)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 147
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.10 Adding or removing input parameters

Overview
When you insert an instruction to a CFC chart, this object already comes with a certain
number of input parameters by default.
You have the option to change the number of input parameters with generic instructions.
There are generic instructions in CFC in the "Instructions" task card in the following
instruction families:
• BIT_LGC: Bit logic operations
• MATH_FP, MATH_INT: MathFloat (arithmetic instructions)
• MULTIPLX: Multiplexer
• WRD_LGC: Word logic operations
• Additional instructions: TERMINAL (compilation of interconnections)
When an instruction can be extended, the following symbol is displayed at the bottom of the
instruction icon:
The symbol is hidden once the maximum number of possible input parameters has been
reached.

Changing the number of parameters


You can change the number of input parameters using the following options:
• Adding or removing input parameters:
You can make both changes in the properties of the Inspector window.
• Adding input parameters:
To add an input parameter to the instruction, click on the icon at the instruction symbol:

Note
Reducing the number
The value cannot be lower than the number of interconnected input parameters, because
only non-interconnected input parameters can be deleted.
If several parameters are not interconnected, the highest index number of the interconnected
parameters determines the value. If the 1st and the 5th of 10 parameters are interconnected,
the lowest value corresponds to the index of the 5th parameter.

Configuring CFC charts


148 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Example

The figure shows an "OR" instruction with two input parameters that are not interconnected.
The following icons are displayed at the bottom of the instruction symbol:

Icon Meaning
The number of input parameters can be increased.
At least one input or output parameter is invisible.

Requirement
• A CFC chart is open.
• An expandable instruction has been added.

Procedure
1. Select the required instruction in the CFC chart.
2. In the Inspector window, select the "Properties" tab and then the "General" tab.
The current number of inputs are displayed in the "Number of input parameters" field.
3. If you want to add an input parameter, simply increase the value in the "Number of input
parameters" field.
You can also add an input parameter by clicking the icon in the CFC chart below the
instruction symbol.
4. If you want to delete an input parameter, simply decrease the value in the field "Number of
input parameters".

Result
One or several input parameters have been added or removed.
You can see an overview and the status of all input and output parameters in the Inspector
window in the "Properties" tab under "Parameters".

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 149
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.11 Negating input parameters

Requirement
• The input parameter is interconnected.
• The input parameter has the BOOL data type.

Procedure
1. Select the interconnection of the input parameter.
2. Select the "Negate" option in the shortcut menu of the interconnection.
Alternatively, select the option in the properties of the interconnection in the inspector
window.

Result
The negation symbol is shown at the input parameter.
The value at the input parameter is negated.
If you move or copy the negated interconnection, the negation is retained.
The following figure shows a negated interconnection:

See also
Representation and properties of interconnections (Page 127)
Setting the parameters of the input and output parameters (Page 123)

Configuring CFC charts


150 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.12 Hiding input and output parameters


The space available for objects, such as instructions, blocks and interconnections, in a CFC
chart is limited by the sheet size.
To gain more space for displaying objects on a sheet, you can hide the input or output
parameters. This makes the CFC chart clearer to read.

Manage hidden parameters


To display the overview and the status of all parameters, select the instance in the chart and
click on "Properties > Interface" in the Inspector window.
If the hidden parameter is interconnected, it is also listed under "Invisible interconnections".
To edit the interconnection of a hidden parameter, make the interconnection listed in
"Invisible interconnections" visible again. As a result, the interconnected parameter is visible
again.

Display at the icon


Hidden parameters of an instruction or block are identified at the associated icon separated
by input and output parameters:

One or more interconnected parameters are hidden.


One or more non-interconnected parameters are hidden.

Display at the partner block


The interconnection to a hidden parameter is displayed at the partner block depending on the
settings:

Sheet bar mode Display


Static sheet bar In the sheet bar
Dynamic sheet bar In the sheet bar
No sheet bar As connector

Requirement
• A CFC chart is open.
• An instruction or block has been added.

Procedure
1. Select the input or output parameter.
2. Select the "Invisible" option under "General" in the Inspector window.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 151
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Result
The input or output parameter has been hidden.

See also
Representation and properties of interconnections (Page 127)

Configuring CFC charts


152 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.13 Displaying points of use of interconnections

Overview
In the "Chart sequence & extras" editor, all interconnections are displayed in the "Tag
interconnections" tab.
The list of tag interconnections supports you in searching for interconnected tags and
interconnected global data blocks in the CFC charts:
• You can filter the list by different criteria.
• You jump from the tag line in the table directly to the reference location in the CFC chart.
• The list is comparable to the cross-reference list.
However, unlike in the cross-reference list, you cannot add new entries.

CFC tag interconnections


The table contains the following information:

Column Content
Tag name Name of the interconnected tag:
• Tags
• Global data blocks
Address Address of the interconnected tag
Data type Data type of the interconnected tag
Read/write Identification of the access:
• Read access:

Interconnection of output parameters ("Output")


• Write access:
Interconnection of input parameters ("Input", "InOut")
Path Path of the interconnection:
• Chart name
• Block instance name
• Parameters
The path is linked with the interconnected parameter.
When clicking on the path, the view jumps to the reference location in the data flow.
Comment Comment for the tag
Comments of the CFC charts, instances and parameters are not included.
Block type Type of the interconnected block

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 153
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Requirements
Requirement for the full functional scope of the "Tag interconnections" table:
• The CFC charts are not password-protected.
In CFC charts with configured password, the interconnection paths are not shown in full.
You have to enter the password to jump to the interconnection point.
To use the full function scope, open the password-protected CFC charts by entering the
password.

Procedure
1. Open the "Chart sequence & extras" CFC editor.
2. Select the "Tag interconnections" tab.
A table with all interconnections in the CFC charts of the control is displayed.
3. To filter the table, enter the desired character string in the field under the column title.
– Upper and lower cases have no effect.
– To deactivate the filter in a column, click the filter line "*".
– To deactivate all filters, click the filter symbol above the line numbers:
If you click a column title, the lines are sorted alphabetically in ascending or descending
alphabetical order. A further click deactivates the sorting.
Depending on the number of lines, the sorting may take some time though. Avoid sorting
large tables.
4. To jump to the point of use in the data flow, click on the interconnection path in the "Path"
column.
Alternative procedure:
– Select the line and in the toolbar of the table click the symbols "Data flow" or
"Control flow": ,
– Select the jump to the data flow or control flow in the shortcut menu of the line.

See also
Representation and properties of interconnections (Page 127)
Interconnecting input and output parameters (Page 136)
Working with multiple interconnections (Page 141)
Interconnections to parameters of the chart interface (Page 144)
Changing an interconnection (Page 155)

Configuring CFC charts


154 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.14 Changing an interconnection


You can change the existing interconnection with drag-and-drop.
Additional information: "Working with multiple interconnections (Page 141)"

Requirement
• A CFC is open.
• The parameters are interconnected.

Procedure
1. Select the interconnection.
2. Perform one of the following actions:

① Drag-and-drop: Interconnection with another output parameter.


② Drag-and-drop: Interconnection with another input parameter.

See also
Deleting an interconnection (Page 157)
Representation and properties of interconnections (Page 127)
Interconnecting input and output parameters (Page 136)
Displaying points of use of interconnections (Page 153)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 155
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.15 Changing an interconnection to an external tag

Requirement
• A CFC is open.
• Instructions/blocks are interconnected.
• "Data flow" is open.

Procedure
1. Select the connector with the tag name.
2. Select the external tag from the object list.

Result
The interconnection has been changed.
As an alternative, you can also change the interconnections of an instruction or block in the
control flow.

See also
Interconnecting input and output parameters (Page 136)

Configuring CFC charts


156 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.16 Deleting an interconnection

Requirement
• A CFC is open.
• Instructions/blocks are interconnected.
• "Data flow" is open.

Procedure
1. Select the interconnection line at the input parameter.
2. Select "Delete" in the shortcut menu of the interconnection line.

Result
The interconnection is deleted.
As an alternative, you can also delete the interconnections of an instruction or block in the
control flow.

See also
Representation and properties of interconnections (Page 127)
Changing an interconnection (Page 155)
Hiding input and output parameters (Page 151)
Interconnecting input and output parameters (Page 136)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 157
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.17 Overview of textual interconnections

Textual interconnections
Textual interconnections are used for interconnections at which the interconnection source,
for example a block or chart output, does not yet exist.
A textual interconnection serves as the placeholder for a future interconnection.
Enter a free text with up to 1000 characters as the textual interconnection. The same
characters are permitted as for interconnections.
You can create, edit, delete and close textual interconnections in the "Data flow" or "Control
flow".

"Chart sequence & extras" editor


Depending on the target system, the textual interconnections of a project are displayed in the
"Textual interconnections" tab.
You can close or delete the interconnections in the editor.
You can change the path of the interconnection only in the data flow or control flow.

More information
• "Creating, editing and closing textual interconnections (Page 161)"
• "Textual interconnections in the "Chart sequence & extras" editor (Page 164)"

Configuring CFC charts


158 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Overview
A textual interconnection can only be created at a block/chart input and always references a
block or chart output in the CFC.

Entering text of the textual interconnection


• If, after the completion of the entry, the entered text of the textual interconnection can be
interpreted as a reference to a valid path "\Chart\Block.Parameter", the textual
interconnection is closed immediately and is replaced by a real interconnection.
This means that each object can be addressed in the same chart, in a different chart or in a
lower level chart.
• If the configured text of the textual interconnection cannot be interpreted as a reference
to a valid path, this textual interconnection remains "open". The entered text is displayed.
In the "Data flow", an interconnection is then established to the sheet bar and the "Textual
interconnection" symbol is displayed.
When a referenced interconnection source is created after the textual interconnection has
been created, this textual interconnection remains "open" until the user closes it manually.
• Textual interconnections to other sources, such as tags, are not possible.

Copying a chart object


When a chart object is copied, a textual interconnection at this object is not copied.

Moving a chart object


When a chart object is moved, a textual interconnection at this object is retained.

Importing block types


When block types are imported, the textual interconnection behaves like any other
interconnection.

Compiling and loading


Textual interconnections are not relevant for the automation system and operating system
and are therefore ignored during compiling and loading.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 159
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Effects of actions with the CFC chart

Copying
When a chart is copied, the textual interconnections are copied as well.
This is true when the chart is copied within a CPU, between different CPUs and between
different projects.
In the copied chart, all existing interconnections to input parameters of the chart or its blocks
are replaced by textual interconnections.

Moving
Existing textual interconnections are moved with the chart.
If existing interconnections are disconnected by moving a chart, a new textual
interconnection is created for each disconnected interconnection.
In this process, the new textual interconnection is created depending on the previous
interconnection target, because a textual interconnection can only arise at a block/chart
input.
The newly created textual interconnections contain the reference to the path of the
interconnection before the move.
• Moving a chart into a different folder of the same CPU:
Because all the interconnections lie within the same CPU, they can still be reached.
Interconnections and textual interconnections are retained.
• Moving a subchart to a different folder of the same CPU:
Interconnections to chart objects and textual interconnections are retained.
Interconnections to chart interfaces are converted to textual interconnections.
• Moving a chart to a different CPU or a different project:
To move a chart, copy the chart to the other CPU or project and delete the original chart.
Interconnections to input parameters are converted to textual interconnections.
The interconnections of output parameters of the chart or its blocks to other charts are
removed in all charts.

Deleting
When a CFC chart is deleted, all interconnections of the chart are also deleted.
Interconnections from other CFC charts to the deleted chart are not converted into textual
interconnections but are also deleted.

See also
Managing CFC charts and groups (Page 77)
Hierarchical CFC charts (Page 31)
Copying objects (Page 40)
Copying instructions, blocks and charts (Page 107)

Configuring CFC charts


160 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.18 Creating, editing and closing textual interconnections


You can create, edit or close textual interconnections in the "Data flow" or in the "Control
flow".

Requirements
• A CFC is open.
• Instructions/blocks have been inserted.
• "Data flow" or "Control flow" is open.

Procedure in "Data flow"

Creating a textual interconnection


1. Select the input parameter at the desired block or chart at which you want to create the
textual interconnection.
2. Select the command "Textual interconnection to chart..." from the shortcut menu.
An input field is opened at the parameter.
3. Enter a text.
A maximum of 1000 characters is permitted.
Result:
• If the entered text can be interpreted as a valid path to the interconnection source, a real
interconnection is created.
• If the entered text cannot be interpreted as a valid path to the interconnection source, an
interconnection to the sheet bar is created.
The entered text and the "textual interconnection" symbol are displayed in the sheet bar
to identify the textual interconnection:

Edit
1. Click the desired textual interconnection in the sheet bar.
2. Edit the text.
3. Exit your entry with the <Enter> key.
Result:
• If the entered text can be interpreted as a valid path, the textual interconnection is
replaced by a real interconnection.
• If the entered text cannot be interpreted as a valid path to the interconnection source, the
textual interconnection remains.
The changed text is displayed in the sheet bar.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 161
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Delete
1. Click the desired textual interconnection in the sheet bar.
Alternatively, click the interconnection line in the chart.
2. Press the <Del> key or select the "Delete" command from the shortcut menu.

Closing an "open" textual interconnection


When a referenced interconnection source is created after the textual interconnection has
been created, this textual interconnection remains "open" until the user closes it manually.
Depending on the target system, you can also close an "open" textual interconnection in the
"Chart sequence & extras" editor.
1. Click the desired textual interconnection in the sheet bar.
2. Select the menu command "Close textual interconnections" from the shortcut menu.
Result:
• If the entered text can be interpreted as a valid path, the textual interconnection is
replaced by a real interconnection.
• If the entered text cannot be interpreted as a valid path, the textual interconnection
remains and is displayed in the sheet bar.
• A message for the procedure is displayed in the Inspector window in the "Info > General"
tab.

Procedure in "Control flow"

Creating a textual interconnection


1. Navigate in the table to the input parameter of a block at which you want to create the
textual interconnection.
2. Click in the row of this input parameter in the table cell of the "Operand" column.
3. Select the command "Textual interconnection to chart..." from the shortcut menu.
An input field is opened in the table cell.
4. Enter a text.
A maximum of 1000 characters is permitted.
Result:
• If the entered text can be interpreted as a valid path to the interconnection source, a real
interconnection is created.
• If the entered text cannot be interpreted as a valid path to the interconnection source, the
textual interconnection is created in the table cell.
As identification of the textual interconnection, a colored background is assigned to the
entered text.

Configuring CFC charts


162 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Edit
1. Click in the table on the table cell in the "Operand" column that belongs to the desired
textual interconnection.
2. Edit the text.
3. Exit your entry with the <Enter> key.
Result:
• If the entered text can be interpreted as a valid path, the textual interconnection is
replaced by a real interconnection.
• If the entered text cannot be interpreted as a valid path to the interconnection source, the
textual interconnection remains.
The changed text is displayed in the table cell.

Delete
1. Click the desired textual interconnection in the table.
2. Select "Delete interconnection" from the shortcut menu.

Closing an "open" textual interconnection


When a referenced interconnection source is created after the textual interconnection has
been created, this textual interconnection remains "open" until the user closes it manually.
1. Click the desired textual interconnection in the table.
2. Select the menu command "Close textual interconnections" from the shortcut menu.
Result:
• If the entered text can be interpreted as a valid path, the textual interconnection is
replaced by a real interconnection.
• If the entered text cannot be interpreted as a valid path, the textual interconnection
remains.
• A message for the procedure is displayed in the Inspector window in the "Info > General"
tab.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 163
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

4.5.19 Textual interconnections in the "Chart sequence & extras" editor


All open textual interconnections are displayed in the "Textual interconnections" tab of the
"Chart sequence & extras" editor in a table. This display depends on the target system.
Up to 600 interconnections are displayed below the associated CFC chart. If more than 600
textual interconnections were created, the entries for the most recently edited
interconnections are displayed.

Note
Configuration depending on the target system
You can use the "Chart sequence & extras" editor to check, close or delete open textual
interconnections.
The availability and the content of the tabs depend on the target system for which you are
configuring.

Table columns

"Chart/Textual interconnection" column


The associated chart and the text of the textual interconnection are displayed for each textual
interconnection.

"Interconnected with" column


The column contains the input parameter at which the textual interconnection is configured.

"Status" column
The status or a possible action is shown in a comment.

Configuring CFC charts


164 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.5 Configuration and interconnection of input and output parameters

Functions
Various functions for textual interconnections are available through the toolbar and the
shortcut menu:

Hierarchy
In the "Chart/Textual interconnection" column you can completely show or hide the
hierarchy.

List entries
You can select or deselect all list entries.

Deleting textual interconnections


You can select multiple textual interconnections. All selected interconnections are deleted.
When all textual interconnections of a CFC were deleted, the CFC is removed from the table.

Closing textual interconnections


You can select textual interconnections as well as CFCs.
A comment is displayed in the "Status" column to help with the selection.
When you select a chart and start the "Close textual interconnections" function, all displayed
"open" textual interconnections of this chart are closed. You do not need to select the textual
interconnections additionally.
After the process has been completed, a message is displayed for each selected textual
interconnection in the "Info > General" tab in the Inspector window.
When all "open" textual interconnections of a CFC are closed, the CFC is removed from the
table.

Jump to "Data flow" or "Control flow"


When a textual interconnection is selected, you can use the symbols to jump to the "Data
flow" or the "Control flow".
When several textual interconnections are selected, the first textual interconnection in the
selection is displayed.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 165
Configuring and adapting CFC charts
4.6 Adapting the run sequence

4.6 Adapting the run sequence

4.6.1 Runtime model

Overview
The runtime model describes the following functions:
• If and when CFC charts are to be executed
• When and in which sequence the blocks and instructions in the CFC charts are to be
executed in the user program

Note
Configuration depending on the target system
You can use the "Chart sequence & extras" editor to check and change the run sequence and
task assignment.
The availability and the content of the tabs depend on the target system for which you are
configuring.

How the runtime model functions

Task assignment of the CFC charts


The runtime model is based on the assumption that the target system has one or more tasks.
• In the "Chart sequence & extras" editor you specify the task assignment for the chart
folders of the target system.
When you create a new CFC chart, this task is assigned to the chart as the main task.
For S7 target systems, you select the main task of a CFC chart in the "Target system
settings" tab.
• You can change the task assignment of the chart in the CFC chart properties.

Run sequence within the CFC chart


When you insert an instruction or block in the CFC chart, it is assigned to the main task.
However, you can specify the run sequence and the task assignment in the CFC chart
individually for each instruction or block.
Additional information: "Adapting the run sequence within the CFC chart (Page 171)"

Configuring CFC charts


166 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.6 Adapting the run sequence

Run sequence of the CFC charts


The chart sequence determines the order in which the various CFC charts of the target system
is run.
Depending on the target system, you are able to determine the time of the execution of a
CFC chart with additional functions, e.g. "Reduction ratio", "Phase offset".
Additional information: "Options for determining the run sequence (Page 168)"

Optimization of the run sequence


You can have the run sequence optimized automatically:
• Run sequence of the CFC charts
• Run sequence of the instructions or blocks within the CFC charts
Additional information: "Optimizing the run sequence of CFC charts automatically
(Page 174)"

Run sequence and task assignment


Instructions and blocks are always assigned to one or more tasks of the target system.
Because of this, the following rules apply:
• If a block or instruction is assigned to several tasks, this object is executed in every task.
• Within a task, the instructions/blocks assigned to it execute in the configured run
sequence.
Example for target system S7
All blocks of the main task of the chart "task_1" are assigned in a CFC chart.
• An instruction "and_1" in this chart is assigned to another task "task_2".
The instruction "and_1" is not executed in "task_1" of this CFC chart.
• An instruction "and_2" has been assigned "task_1" and an additional "task_2":
The instruction "and_2" is executed in both tasks, "task_1" and "task_2".

See also
Adapting the run sequence of CFC charts (Page 173)
Basic settings for CFC charts (Page 43)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 167
Configuring and adapting CFC charts
4.6 Adapting the run sequence

4.6.2 Options for determining the run sequence

Run sequence of instructions and blocks


The run sequence within the CFC chart is determined by the order in which you insert the
instructions or blocks in the CFC chart.
You change the run sequence in the control flow.

Note
Depending on the target system
The display of the options "Enable chart", "Optimize chart", reduction ratio and phase offset
depends on the target system.
This means these options may not always exist and be adjustable in the properties of a chart.

"Enable chart" option


CFC charts are enabled or disabled for execution with the "Enable chart" option.

Configuration
You set the option at the "EN" parameter:
• 1 = Chart is enabled
• 0 = Chart is not enabled
To interconnect the "EN" parameter, select the output parameter of a block or CFC chart in
the "Enable chart" field.

Editor Selected object Configuration Interconnections


Chart sequence & extras - "Enable chart" column Create
> "Chart sequence" tab Change
Delete
Data flow CFC chart "S7 specific": Create
> Inspector window (No object is selected.) Change
> "Properties" tab • "Enable chart" field
Delete
Subchart in a CFC chart "Interface": Interconnected
parameters cannot be
• "EN" parameter edited.
"EN" parameter of a "General": Interconnected
subchart parameters cannot be
• "Value" field edited.
Control flow "EN" parameter of a "Operand" column Change
subchart Delete

Test mode
The "Enable chart" option can be changed online.
When the option is interconnected with a parameter, it cannot be edited online.

Configuring CFC charts


168 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.6 Adapting the run sequence

"Optimize chart" option


You enable the setting "Optimize chart" in the chart properties.
When this setting is enabled the following options for optimizing the run sequence of this
CFC chart are available:

Editor Button Effect


Chart sequence & extras: Optimize run sequence according to the Chart sequence and / or content
signal flow of the CFC charts are optimized.
• Chart sequence
CFC chart: Optimize run sequence of the CFC chart The content of the CFC chart
according to the signal flow is optimized.
• Data flow
• Control flow

When the "Optimize chart" field is disabled, the buttons in the editors have no function.

Reduction ratio
The reduction ratio specifies if the CFC chart is executed with each task call or only after a
specified number of runs.
The reduction value R is always a power of 2:
• R=2t
With 0 ≤ t ≤ 7
This means possible values are:
• 1, 2, 4, 8, 16, 32, 64, 128
Example for SIMATIC S7:
• Basic cycle of a cyclic interrupt:
500 ms
• Possible cycles due to reduction ratio:
500 ms, 1 s, 2 s, 8 s, 16 s, 32 s, 64 s
In hierarchical charts you can only use the reduction ratio in basic charts and not in subcharts.

Phase offset
Phase offset enables an even load distribution within the target system.
The phase offset always depends on the reduction ratio "R".
The charts are processed as frequently as configured with the reduction ratio "R" and are each
shifted by "m" units of the task cycle.
• "m" is an integer
With 0 ≤ m ≤ (R-1)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 169
Configuring and adapting CFC charts
4.6 Adapting the run sequence

Example with reduction ratio and phase offset


Settings:
• Basic cycle of a cyclic interrupt: 500 ms
• Reduction ratio = 16
(The chart is executed every 8 seconds.)
• Phase offset = 3
The chart is executed after 1.5 s; 9.5 s; 17.5 s, etc.
The default setting is "0".

Configuring
The configuration of the reduction ratio and the phase offset depends on the target system.

Configuration for S7 target systems


You configure the reduction ratio and the phase offset in the chart properties under "General
> S7 specific > Sequence".
You check and configure other settings for the run sequence in the "Chart sequence & extras"
editor, for example, the task assignment or the run sequence of the charts.
The Editor gives you an overview of the settings of all CFC charts.

See also
Runtime model (Page 166)
Representation of instructions and blocks (Page 94)

Configuring CFC charts


170 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.6 Adapting the run sequence

4.6.3 Adapting the run sequence within the CFC chart


When you insert an instruction or a block in the CFC chart, the instruction or block is assigned
to the task of the CFC chart.
The run sequence of the instructions and blocks is decided by the order in which you have
inserted them in the CFC chart.
You change the run sequence in the control flow.

Optimizing the run sequence


You can also have the run sequence optimized automatically in the CFC chart.
You start this function using the toolbar in the control flow or data flow.
Additional information: "Optimizing the run sequence of CFC charts automatically
(Page 174)"

Requirement
• The CFC chart is open.
• "Control flow" is displayed.
• Instructions/blocks have been configured.

Procedure in the control flow

Adapting the run sequence manually


1. Drag the required instruction or block to the new position in the table.

Adapting the run sequence automatically


1. Enable the "Optimize chart" property for the chart.
2. In the toolbar, click on "Optimize run sequence of the CFC chart according to the signal
flow":

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 171
Configuring and adapting CFC charts
4.6 Adapting the run sequence

Alternative procedure: Data flow

Adapting the run sequence manually


You can specify the run sequence in a CFC chart while adding additional instructions/blocks:
1. In the data flow, select an inserted instruction or an added block.
2. In the shortcut menu of the instruction or block, select the entry "Use as predecessor in the
run sequence".
The next instruction or block is added in the run sequence after this object.

Adapting the run sequence automatically


1. Enable the "Optimize chart" property for the chart.
2. In the toolbar, click on "Optimize run sequence of the CFC chart according to the signal
flow":

Result
The run sequence is adapted.

See also
Optimizing the run sequence of CFC charts automatically (Page 174)
Runtime model (Page 166)

Configuring CFC charts


172 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.6 Adapting the run sequence

4.6.4 Adapting the run sequence of CFC charts

Requirement
• Two or more CFCs have been created for a controller.
• The CFCs have interconnections between charts.
• The "Chart sequence & extras" Editor is open.
• "Chart sequence" is displayed.

Procedure
1. Select a CFC.
2. Move the CFC to the new location by dragging it with the mouse.

Result
The run sequence is adapted.

See also
Optimizing the run sequence of CFC charts automatically (Page 174)
Runtime model (Page 166)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 173
Configuring and adapting CFC charts
4.6 Adapting the run sequence

4.6.5 Optimizing the run sequence of CFC charts automatically

Overview
To keep the dead times in the user program of a target system low, use the automatic
optimization of the run sequence.
The automatic optimization of the run sequence is based on the fact that the objects
executed first are those whose output values are used as input values for other objects.
You can, however, also exclude CFC charts explicitly from the automatic optimization.
Additional information: "Adapting the run sequence within the CFC chart (Page 171)"

Optimization options
You start the automatic optimization in the toolbar of the "Chart sequence & extras" editor.
In the "Optimize run sequence" dialog, you select the scope of the optimization:

Option Response
Chart sequence and contents of all charts Optimizes the run sequence of the charts as well as the
instructions and blocks within the charts.
Chart sequence Optimizes only the run sequence of the charts.
Contents of all selected charts Optimizes only the run sequence of the instructions and
blocks within the selected charts.

Include/exclude chart content


To enable the automatic optimization within a chart, enable the "Optimize chart" property for
the CFC chart.
If the setting is disabled at a chart, the following applies to this chart:
• The content of this chart is not optimized.
• The chart is taken into account during the optimization of the chart sequence.

Requirement
• Cross-chart interconnections or interconnections in the CFC charts are configured.
• The "Chart sequence & extras" editor is open.
• The "Chart sequence" is displayed.

Configuring CFC charts


174 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.6 Adapting the run sequence

Procedure
1. Select the CFC charts whose run sequence you want to optimize automatically.
2. In the toolbar, click on "Optimize run sequence of the CFC chart according to the
signal flow":
The "Optimize run sequence" dialog opens.
3. Select the required option in the dialog.
4. Click "OK".
The selected optimization of the run sequence is started.

Result
Depending on your selection, the run sequence of instructions and blocks within the
CFC charts and/or the chart sequence are optimized automatically.

See also
Adapting the run sequence within the CFC chart (Page 171)
Adapting the run sequence of CFC charts (Page 173)
Runtime model (Page 166)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 175
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7 Testing the CFC chart

4.7.1 Selecting parameters for testing


After configuration of the instructions and blocks in the CFCs, you can test the function of the
CFCs.
Values from the device are displayed at the input and output parameters for this.

Basic procedure
Configuration takes place in the following steps:
1. Start by selecting the input and output parameters for the test.
2. Then you start the actual test in which values from the device are displayed at the input and
output parameters.
Additional information: "Testing the CFC (Page 178)"

Note
Value display depending on the interconnection
Input parameters of instructions and, for example, of "FC" functions in S7 can only display
values from the device if they are interconnected.
Although they can be selected in the table of parameters for testing, no values are displayed
for existing online connections.
Test settings
Various test settings are available depending on the target system you are using.
In test mode, you have the option to register or unregister parameters for testing.
Additional information: "Testing the CFC (Page 178)"

Deregister input and output parameters from testing


To deregister an input or output parameter from the test, disable the option "For test".

Requirement
• The CFC is open.
• Instructions/blocks have been configured.
• "Data flow" is shown in the work area.

Configuring CFC charts


176 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Procedure
1. Select the required instruction or block.
2. Enable under "Parameters" in the Inspector window for the required input and output
parameters the "For test" option.
3. If you want to select all input and output parameters for testing, select the "Activate all"
command in the shortcut menu of the header.
4. If you want to test several instructions/blocks of the CFC, repeat steps 1 to 3.
5. If necessary, configure the settings of the update times in the "Testing" task card for the
visible area of the CFC and the selected parameter or the interconnection.

Result
The required input and output parameters have been selected for testing.

See also
Setting the parameters of the input and output parameters (Page 123)
"CFC" Editor (Page 45)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 177
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7.2 Testing a CFC chart

Overview
After configuration of the instructions and blocks in the CFC charts, you can test the function
of the CFC charts.
Values from the device are displayed at the input and output parameters for this.

Note
Procedure depending on the target system
The following section explains the procedure without covering properties of the specific
target system.
Additional information is available in the target system documentation e.g. for the S7 target
system under:
• "Working with CFC charts for S7"

Basic procedure
You always need to perform the following steps to test CFC charts:
1. Start by selecting the input and output parameters for the test.
Additional information: "Selecting parameters for testing (Page 176)"
2. Then you start the actual test in which values from the device are displayed at the input and
output parameters.

Conditions for the test


The following conditions apply to the test:

Displaying the latest values


The input and output parameters only receive the latest values for testing at the following
conditions:
• The parameters have been selected for the test.
• The parameters are available in the visible part of the CFC chart within the work area.
• Data memory is assigned to the parameters.
No values are displayed at parameters without data memory.
• The input parameters are connected to a source.
In the table of parameters, all parameters can be selected for testing, including
parameters that are not connected.

Configuring CFC charts


178 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Comparison status of the block parameters


The values of the input and output parameters are highlighted in color:

Yellow The display of the parameters is uninterrupted.


The CFC charts and blocks are identical in the project and on the device.
The usual editing functions can be performed. For S7 target systems, for example,
you can change unconnected input parameters.
Red The status in the project and on the device does not match.
The chart has been changed, for example, but not yet downloaded to the device.
Editing functions are restricted. For example, you cannot change any parameters
in the CFC chart for S7 target systems.

Testing structures
If you select a parameter of the STRUCT data type for testing, the value of the first structure
element of the configured structure is displayed.

Requirement
• The online connection to the device can be established.
• Rules for the device containing the CFC charts to be tested:
– The corresponding software must be compiled and loaded.
– To display value changes, the CPU of the device must be in "RUN" mode.
• The required CFC chart is configured and open.
• "Data flow" is shown in the work area.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 179
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Procedure
1. Click in the CFC chart, or select an instruction, or a block.
2. Click "Go online" in the toolbar.
Once you are online, all input and output parameters selected for testing are provided
with the current values from the device and are highlighted in color.
To monitor the values, click the "Monitor on/off" icon in the CFC editor:
3. If necessary, you can register or deregister a selected input or output parameter in the
"Testing" task card for testing.
You do not have to open the Inspector window for this purpose.
4. If necessary, select additional parameters for testing or remove previously tested parameters
in the Inspector window under "Parameters".
5. Depending on the target system, the "Testing" task card may contain additional settings that
may be relevant to the test.
Example S7 system: Update time of the visible area of the CFC chart.

Alternative procedure
You can also use the following options in the "Data flow" online mode to show values from
the device:

Value as tooltip
If you point to the input or output parameter with the mouse pointer, then the latest value
from the device is shown as tooltip.
Use the shortcut menu command "For test" to display the value.

Value with the STRUCT data type


The structure with all structure elements appears as a tooltip when you move the mouse
pointer over a parameter of STRUCT data type.

Display value permanently


If you have not selected the input or output parameter for testing, then you can keep the
<Ctrl> key pressed and click on an input or output parameter or an interconnection with the
mouse pointer.
The parameter is permanently selected for the test and the latest value from the device is
displayed.
Repeat this step to revert this function and no longer display the value.

Result
All input and output parameters in the visible work area that have been selected for testing
are supplied with the latest values from the device.
This enables you to test the function of the instructions and blocks.

Configuring CFC charts


180 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7.3 Effects of test mode on object properties


There are different special considerations in test mode that have an effect on specific
functions or editing options.

Properties of CFCs

"Enable chart" option


The "Enable chart" option can only be changed when online test mode is running.
When the option is interconnected with a parameter, it cannot be edited online.
You set the option at the "EN" parameter.

Properties of blocks and instructions

Interconnection
You cannot change an interconnection online which means it is blocked from changes in test
mode.
Any changes to an interconnection will have to be made offline and transferred by
compilation and downloading to the device.

Changes in parameter assignment


In test mode, changes to the parameter assignment of input/output parameters of blocks and
instructions are transferred directly to the device and into the project.
Such changes do not require a new download.

Representing interconnections
The connection lines of interconnections of data type BOOL are visualized in online mode
based on their current values.
• Value = "1": Green line
• Value = "0": Dashed blue line
The example in the following figure shows an interconnection of data type BOOL in online
mode.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 181
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Additional information
Notes on special considerations in test mode are included in the description of the respective
target system.

See also
Optimizing the run sequence of CFC charts automatically (Page 174)
Options for determining the run sequence (Page 168)

Configuring CFC charts


182 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7.4 Testing with the "Forcing" function

Overview
Individual parameters of a block can be set to a defined value for testing with the "Forcing"
function.
The so-called force table includes all parameters for which the "Add forcing" option is
selected.
The force table also provides an overview of all these parameters.
The use of the force table makes sense if you want to test several parameters with the
"Forcing" function and if these are located in different charts, for example.

Supported parameters and data types


• The "Forcing" function only supports parameters of the type "IN" or "INOUT".
• Parameters in the interface of a CFC are not supported.
• The table "Data types" contains the list of the data types that are supported or not
supported.

Configuration and use


In offline mode, configure the function "Add forcing".
You can enable the function "Forcing active" in online or offline mode and enter the desired
values.
However, the effects of the force value in the program are only visible in online mode.
Configuration consists of the following steps:
1. "Add forcing" at the parameter of a block
2. Enable forcing and enter the test value

1. "Add forcing" at the parameter of a block

Configuration
• Enable the option at the parameter of a block in "Data flow" or "Control flow" of an open
chart.

Effects
• The "Forcing active" and "Force value" columns of an interconnected parameter can be
edited.
If the parameter has not been interconnected, the "Forcing active" option and the "Force
value" input field remain grayed out.
• The status "Add forcing" is indicated by a corresponding status display at the associated
parameter in the "Data flow".
• The parameter registered for forcing is also displayed in the so-called force table.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 183
Configuring and adapting CFC charts
4.7 Testing the CFC chart

2. Enable forcing and enter the test value


Enable the "Forcing" function for the desired parameter and enter the respective test value.

Configuration at the block parameter in "Data flow" or "Control flow"


• Enable the option "Forcing active" for an interconnected parameter and enter the required
force value in the input box.
• For a parameter that is not interconnected, you can enter the required value as a
parameter value in the "Value" input box in the "Instance data" area.
Effects:
• The status "Forcing active" is indicated by a corresponding status display at the associated
parameter in the "Data flow".
• The "Forcing active" status and the force value appear simultaneously in the row of the
force table belonging to the parameter.

Configuration in the force table


• Enable the "Forcing active" option in the associated table row of an interconnected
parameter.
Enter the desired force value in the "Force value" column.
• For a parameter that is not interconnected, the table lines associated with the parameter
for "Forcing active" and "Force value" are deactivated.
In this case, select the required parameter in the table.
The configuration data are displayed in the "Instance data" area in the Inspector window.
Enter the required value as a parameter value in the "Value" input box in the "Instance
data" area.
Effects:
• The entered force value is also displayed at the associated parameter in "Data flow" or
"Control flow".
• The status "Forcing active" is indicated by a corresponding status display at the associated
parameter.

Configuring CFC charts


184 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Status displays for "Forcing" function in "Data flow"


The status displays are shown at the associated block parameter in "Data flow":
• The "Add forcing" option has been enabled: the associated parameter is identified by a
brown rectangle.
• The "Add forcing" and "Forcing active" options have both been enabled: the associated
parameter is identified by a blue rectangle.

Example
In this example, the following status displays are shown at a block in "Data flow":
• 1st input parameter:
The "Add forcing" option has been enabled. The "Forcing active" option has been disabled.
• 2nd input parameter:
The "Add forcing" and "Forcing active" options have both been enabled.

Offline display

Online display

Data types
The following tables show the supported and unsupported data types.

Data type category Unsupported data types


Parameter types TIMER
COUNTER
BLOCK_DB
BLOCK_FB
BLOCK_FC
Pointer POINTER
ANY
VARIANT
Data structures ARRAY

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 185
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Data type category Supported data types


Binary numbers BOOL
BYTE
WORD
LWORD
DWORD
Integers SINT
USINT
INT
DINT
UDINT
LINT
ULINT
Floating-point numbers REAL
LREAL
Times S5TIME
TIME
LTIME
Date and time DATE
TOD
LTOD
DT
LDT
DTL
Strings CHAR
WCHAR
STRING
STRING[N]
Data structures STRUCT
The data types listed above are supported in each level of the
structure for the STRUCT data type.

See also
Setting parameters to defined values for testing ("Forcing" function) (Page 187)
Setting several parameters to defined values with the "Forcing" function (Page 189)

Configuring CFC charts


186 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7.5 Setting parameters to defined values for testing ("Forcing" function)

Overview
Parameters of a block can be set to a defined value for testing with the "Forcing" function.
If you want to test several parameters with the "Forcing" function that are, for example,
located in different charts, use of the so-called force table is recommended.

Additional information
• Supported data types:
"Testing with the "Forcing" function (Page 183)"
• "Setting several parameters to defined values with the "Forcing" function (Page 189)"

Basic procedure
Configuration basically takes place in two stages in "Data flow" or "Control flow":
1. "Add forcing" at the parameter of a block
2. Select the "Forcing" function for this parameter and enter the required force value of the
parameter.
In offline mode, configure the function "Add forcing".
You can enable the function "Forcing active" in online or offline mode and enter the desired
values.
However, the effects of the force value in the program are only visible in online mode.

Requirements
• The online connection to the device has been established once before.
• Rules for the device containing the CFCs to be tested:
– The corresponding software must be compiled and loaded.
– The CPU of this device must be in "RUN" operating mode.
• The required CFC is configured and open.
• "Data flow" or "Control flow" is shown in the work area.
The following section explains the procedure in "Data flow".

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 187
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Procedure
1. Select the required parameter of an instruction or block.
The "General" tab is displayed in the Inspector window.
2. Select the "Add forcing" option in the "Instance data" area under "General" in the Inspector
window.
In "Data flow", a green rectangle at the associated parameter indicates that the parameter
is registered for "Forcing".
The parameter is also displayed in the so-called force table under "Charts - Trend/dynamic
display & force table".
3. Further configuration depends on whether or not the parameter is interconnected.
– If the parameter is interconnected, the check box "Forcing active" and the input box
"Force value" are shown.
Select the "Forcing active" check box and enter the required force value in the "Force
value" input box.
– If the parameter is not interconnected, the check box "Forcing active" and the input
box "Force value" are not shown.
4. To test the effects of the force value in the CFC, click "Go online" in the toolbar.
5. All force values are transferred to the device once you are connected online.
All input and output parameters in the visible work area that have been selected for
testing are supplied and displayed with the latest values from the device.
You can change the force values in online mode.
When you change force values offline, these values will not become effective until after
they were downloaded to the PLC.

Result
The parameter of an instruction or a block is registered for "Forcing".
The "Forcing" function is selected for this parameter and a force value is configured.
The effect of the force value can be tested in the chart with an existing online connection.

Configuring CFC charts


188 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

4.7.6 Setting several parameters to defined values with the "Forcing" function

The "Forcing" function


Parameters of a block can be set to a defined value for testing with the "Forcing" function.
The following section explains how to use the so-called force table with which you use the
"Forcing" function for several block parameters.
The use of the force table makes sense if you want to test several parameters with the
"Forcing" function and if these are located in different charts, for example.

Additional information
• Supported data types:
"Testing with the "Forcing" function (Page 183)"
• "Setting parameters to defined values for testing ("Forcing" function) (Page 187)"

Basic procedure
Configuration basically takes place in two stages:
1. "Add forcing" at a block parameter in "Data flow" or "Control flow":
2. Select the "Forcing" function for this interconnected parameter and enter the required force
value of the parameter.
The following paragraph describes the method for working with the force table.
You can also make this configuration for individual parameters in the "Data flow" or
"Control flow" of a chart.
In offline mode, configure the function "Add forcing".
You can enable the function "Forcing active" in online or offline mode and enter the desired
values.
However, the effects of the force value in the program are only visible in online mode.

Requirements
• The online connection to the device has been established once before.
• Rules for the device containing the CFCs to be tested:
– The corresponding software must be compiled and loaded.
– The CPU of this device must be in "RUN" operating mode.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 189
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Procedure
1. To use the parameters of instructions or blocks in the force table for testing, you first have to
select the "Add forcing" option at the required individual parameters.
If you have already made this configuration, you can continue with step 5.
Open the CFC of a required parameter in "Data flow" or "Control flow" that is to be
available for testing in the force table.
2. Select the required parameter of an instruction or block.
The "Forcing" function only supports parameters of the type "IN" or "INOUT".
The "General" tab is displayed in the Inspector window.
3. Select the "Add forcing" option in the "Instance data" area under "General" in the Inspector
window.
In "Data flow", a green rectangle at the associated parameter indicates that the parameter
is registered for "Forcing".
The parameter is also displayed in the so-called force table under "Charts - Trend/dynamic
display & force table".
4. Repeat steps 1 - 3 for each parameter that is to be available for testing in the force table.
5. Download the program to the device.
6. Click "Go online" in the toolbar.
7. Open the force table.
Double-click the "Force table" entry in the "Charts - Trend/dynamic display & force table"
folder of the project tree.
The force table is opened in the work area.
– You can turn the sorting of the table on/off or change it by clicking the respective table
column.
– You can manipulate the display and width of the table columns with the shortcut menu
of a column header.
– The "Tag" column displays all parameters with the
"<Chart>\<Block_name>.<Parameter_name>" path for which the "Add forcing" option is
selected.
– Double-click the path in the "Tag name" column to open the associated CFC and select
the configured parameter.
– When you select a table line, the "General" tab with the configuration data of this
parameter is displayed in the Inspector window.
– If you clear the "Add forcing" option for a parameter, this parameter is removed from
the table.

Configuring CFC charts


190 System Manual, 11/2023, A5E53466205-AA
Configuring and adapting CFC charts
4.7 Testing the CFC chart

8. Further configuration depends on whether or not the parameter is interconnected.


– If the parameter is interconnected, the "Forcing active" option and the input box in the
"Force value" column can be configured in the table.
Select the "Forcing active" option for the required parameters and enter the required
force value in the table column of the same name.
– If the parameter is not interconnected, the "Forcing active" option and the "Force
value" input box cannot be configured in the table.
9. All force values are transferred to the device because you are already in online mode.
10.To check the effects of the force value of a parameter, open the associated chart with a
double-click on the path in the "Tag name" column.
All input and output parameters in the visible work area that have been selected for
testing are supplied and displayed with the latest values from the device.

Result
Several parameters of instructions or blocks are registered for "Forcing" and are displayed in
the force table.
The "Forcing" function is selected for these parameters and a force value is configured, if
necessary.
The effect of the force value can be tested in the chart with an existing online connection.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 191
Configuring and adapting CFC charts
4.7 Testing the CFC chart

Configuring CFC charts


192 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and
dynamic displays 5
5.1 Overview of the trend and dynamic displays
The following options are available for monitoring multiple static and online values:
• Trend display
This allows you to visualize multiple values in a trend chart.
• Dynamic display
This allows several values to be displayed in the form of a watch table.
The compilations of selected tags/parameters are stored for reuse.

General properties
• The trend and dynamic displays are stored and managed in the project tree, in the "Charts
- Trend/dynamic display & force table" folder.
The objects can be copied to or deleted from this folder.
• You can create several trend and dynamic displays for each target system.

Overview of the trend display


The trend display configured in the editor window consists of the following objects:
• Definition table
• Trend window with operator controls and trend chart

Parameters in the trend display


The parameters to be monitored can be added to the trend display as follows:
• Using drag-and-drop with trend display opened in the editor window, or using copy/paste
to the definition table.
The parameter you inserted can be assigned directly to an axis.
• If the trend display is not open, you can drag-and-drop the parameter to the trend display
in the project tree.
In this case, the parameter is assigned automatically to an appropriate axis
(digital/analog).
If it does not yet exist, the axis is generated automatically.
The values are assigned to digital and analog axes and displayed.
A trend display can contain several digital and analog axes.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 193
Configuring and using the trend and dynamic displays
5.1 Overview of the trend and dynamic displays

Exporting values
The values of the trend chart can be exported or imported in CSV format.

Printing the trend display


You start the print in the project navigation via the shortcut menu or from the opened trend
display.
Alternatively, you can open the "Print" dialog in the definition table with the key combination
<Ctrl+P>.
• Print the axis and curve definition table in the project navigation or in the definition table.
• In the open trend display, print the trend chart using the "Print" button.

STEP 7 traces
Alternatively, you can also display the parameters of the CFC blocks in STEP 7 traces.
During trace configuration, the block parameters are listed in the "Signals" table in the
selection dialog.
Additional information in the TIA Portal Information System:
• "Using online and diagnostics functions > Using the trace and logic analyzer function"

Additional information
• "Creating a trend display (Page 202)"
• "Using the trend display (Page 204)"
• "Trend display - Functions and operating options (Page 196)"

Configuring CFC charts


194 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.1 Overview of the trend and dynamic displays

Overview of the dynamic display

Parameters in the dynamic display


The parameters to be monitored can be added to the dynamic display as follows:
Using drag-and-drop with dynamic display opened in the editor window, or using copy/paste
to the definition table.
If the dynamic display is not open, you can drag-and-drop the parameter to the
corresponding dynamic display in the project tree.

Printing the dynamic display


You start printing in the project navigation via the shortcut menu.
Alternatively, you can open the "Print" dialog in the open dynamic display with the <Ctrl+P>
key combination.
• In offline mode, the offline values are printed.
• In online mode, the corresponding online values are printed.

Additional information
• "Creating a dynamic display (Page 206)"
• "Using the dynamic display (Page 208)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 195
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

5.2 Trend display - Functions and operating options

Layout and operating options


The trend display consists of the following objects:
• Definition table
• Trend window with operator controls and trend chart
The trend window provides various functions for operating and controlling visualization in
the trend chart.
The tables below contain the following descriptions:
• Toolbar functions
• Trend window elements and operating options
• User actions for rapid working

Overview of the trend view layout


The following figure provides an overview of the elements.

Configuring CFC charts


196 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

Toolbar functions
The toolbar provides the following functions.

Element Function Description


(icon / selection box)
(1) Zoom The zoom icons can be used to zoom the horizontal and vertical axes separately.
(icons) The toolbar provide a zoom in and a zoom out icon.
(2) Display mode The display mode for the x time axis of the trend chart can be set up using the
(selection box) selection box of the toolbar.
The following display modes are available:
• "Static" option (static time range display)

The time interval is not refreshed. You can set any range. This mode can be
used to visualize all logged values in detail.

It is recommended to use this display mode for static values.


• "Strip" option (dynamic display)

The time axis always displays the current time at the far right. The duration of
the time interval can be changed.
• "Scope" option (jumping time range display)

The time axis displays a fixed time interval. Once the trend values reach the
right edge, the display changes so that the current time is shown at the left
edge.
• "Sweep" option (sweep mode display)

Similar to "Scope". However, the values of the "last sweep" continue to be


displayed until they are overwritten by the current values.
(3) Trend manager The trend manager visualizes the trend to axis assignments.
("Select trend:" selection You can hide trends by disabling the corresponding check box. Hidden trends are
field) no longer recorded in the trend chart, but still displayed in the legend in grayed
out mode.
Select trends to be edited in the trend manager.
In addition to a color code, the trends in the trend chart are also provided with a
marker to enable their quick identification in the legend and trend manager.
(4) Import/export The trends can be exported or imported in CSV format.
(icons) The export icon is enabled once you have selected a trend in the trend manager
(3).
Imported trends are visualized on separate x and y axes. You can improve the
comparison of an imported trend with a trend from active logging by linking the
x axis of the imported trend with the existing axis.
(5) Customizing the user This menu can be used to show and hide display elements such as the legends,
interface rulers, or markers.
("View" menu)
(6) Linking x axes When a trend is imported, the new x axis (axis "B") can be linked to the existing x
("Link axes" selection field) axis (axis "A"). In linked mode, axis "B" moves simultaneously with axis "A", but
can be adjusted without interfering with axis "A". This mode allows you to
compare history trends with the current trend.
(7) Printing The print dialog can be used to print the currently displayed trends of the trend
("Print" icon) chart. The printout can include a comment.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 197
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

Trend view elements and operating options


The following operator controls are provided in the trend view.

Element Function Description


(icon / selection box)
(8) Maximum value Field for displaying the maximum value of an analog axis.
Access for editing depends on the state of the associated write protection
(9).
• "Write protection disabled" state (open padlock icon):

You can edit the value in the corresponding column of the definition
table, or directly in this field. Changes to the cell in the definition table
are transferred to the field of the y axis.

However, changes to the field of the y axis are not transferred to the
corresponding cell in the definition table!
• "Write protection enabled" state (closed padlock icon):

The value cannot be edited in the corresponding column of the definition


table or in the y axis field.
You can restore the configured minimum/maximum with double-click on the
y axis.
(9) Lock text box Using this icon, you can enable write protection for the input field next to
the icon (closed padlock icon), or disable it (open padlock icon).
(10) Y axis (here: analog axis) The y axis is labeled with the axis name and the configured physical unit.
In the figure above, axis position "right" was configured for the analog y axis.
(11) Minimum value Field for displaying the minimum value of an analog axis.
Access for editing depends on the state of the write protection (9).
• "Write protection disabled" state (open padlock icon):

You can edit the value in the corresponding column of the definition
table, or directly in this field. Changes to the cell in the definition table
are transferred to the field of the y axis.

However, changes to the field of the y axis are not transferred to the
corresponding cell in the definition table!
• "Write protection enabled" state (closed padlock icon):

The value cannot be edited in the corresponding column of the definition


table or in the y axis field.
You can restore the configured minimum/maximum with double-click on the
y axis.
(12) Time (right edge of the visualized The field displays the time for right edge of the x axis.
trend range) Write access depends on:
• The state of the associated write protection (9)
• The selected display mode (2)
You can use the selection function to open a calendar and select a different
day.
(13) Time range of the x-axis The time range of the x axis is set in the definition table.

Configuring CFC charts


198 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

Element Function Description


(icon / selection box)
(14) Time (left edge of the visualized The field displays the time for the left edge of the x axis.
trend range) Write access depends on:
• The state of the associated write protection (9)
• The selected display mode (2)
You can use the selection function to open a calendar and select a different
day.
(15) Digital trend names The names of the digital trends (25) are displayed outside of the trend chart.
The position depends on the configured position of the digital axis (16).
(16) Y axis (here: digital axis) The y axis is labeled with the axis names.
In the figure above, axis position "left" was configured for the digital y axis.
(20) Legend (analog trends) The legend displays the markers and names of the visualized analog trends.
The corresponding values are displayed to the right of the trend name:
• If there is no ruler, the last values added to the trend are displayed.
• If at least one ruler is displayed, the associated values are displayed to
the right of the trend name at the active ruler.
(21) Analog trends Analog trends are visualized in the upper area of the trend window.
The names of the analog trends (F) are displayed in the legend of the trend
chart.
A tooltip is displayed for each visualized trend whenever you position the
mouse pointer on the trend line. The tooltip first displays the trend name;
click this name to display the configured data source.
(22) Markers Markers help you to distinguish between several trends.
You can enable the display of markers in the "View" menu.
(23) Interpolated trend value A value without underscore on the ruler indicates that this is an
interpolated value.
A defined online value is not available for this trend point.
(24) Defined trend value An underscored value on the ruler indicates that this is a defined online
value.
(25) Digital trends Digital trends are visualized in the lower area of the trend window.
The names of the digital trends (15) are displayed outside of the trend chart.
The position depends on the configured position of the digital axis (16).
A tooltip is displayed for each visualized trend whenever you position the
mouse pointer on the trend line. The tooltip first displays the trend name;
click this name to display the configured data source.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 199
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

Element Function Description


(icon / selection box)
(26) Ruler A ruler displays the value of each trend at the ruler/trend intersections.
Every ruler displays the associated time stamp with data and time.
A trend chart may have several rulers.
The active ruler is indicated by a yellow marker at its top end. The values at
the active rulers are displayed in the legend (A) to the right of the trend
name.
Adding rulers:
• You can drag-and-drop a new ruler from its docking position on the left
edge of the trend chart to a specific position in the trend chart.
Copying rulers:
• Press <CTRL> and click the ruler to paste a copy thereof.
Deleting rulers:
• Drag the ruler to the left edge of the trend chart.
• Press <ALT> and click the ruler to be deleted.
(27) Ratio display / scroll bar (y axis) This function depends on the selected display mode (2) and only affects
analog trends.
• Scroll bar function + ratio display in "Static" display mode.
• Ratio display in all other display modes.
Ratio display:
The scroll bar displays the approximate ratio between the configured and
currently displayed range of values of the y axis in the trend chart.
Scroll bar:
The scroll bar can be used to shift the visible range of a trend in the trend
chart if the displayed range of the y axis was modified in vertical direction,
for example, by means of the zoom icons (1).
(28) Ratio display/scroll bar (x axis) This function depends on the selected display mode (2) and only affects
analog trends.
• Scroll bar function + ratio display in "Static" display mode.
• Ratio display in all other display modes.
Ratio display:
The scroll bar displays the approximate ratio between the configured and
currently displayed range of values of the y axis in the trend chart.
Scroll bar:
The scroll bar can be used to shift the visible range of a trend in the trend
chart if the displayed time range of the x axis was modified in horizontal
direction, for example, by means of the zoom icons (1).

Configuring CFC charts


200 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.2 Trend display - Functions and operating options

User actions for rapid working


Various toolbar functions and mouse actions are available to accelerate your work.

Action Function Description


Zooming windows with Zoom function with window You can define the display range of the trend chart by
pressed left mouse button dragging the window while pressing the left mouse button.
All axis value ranges for which write protection is not
enabled by means of the lock icon are adapted when you
release the mouse button.
Double-click on the chart Adapting trends Double-click on the chart area of the trend chart sets the
area analog range of values of the y axes for analog trends so
that the trends are completely visible in the current time
range.
<Alt> + double-click on the Arranging trends <Alt> + double-click in the chart area of the trend chart
chart area adapts the range of values of the y axes for analog trends so
that the trends are arranged vertically.
Dragging the scale with Editing the range of values of To change the range of values of an axis, click the axis and
pressed left mouse button the axes then drag the scale to the new value while keeping the left
mouse button pressed.
• The arrows at the mouse pointer indicate the possible
direction of change.
– If the arrows point in both directions you can edit
both values.
– You can only edit one value if only one arrow is
displayed, for example, in the direction of the
minimum value.
• Only the axis value ranges for which write protection is
not enabled by means of lock icon are adapted.
Example:
If write protection of the minimum and maximum values of
the y axis is not enabled, both values change simultaneously
when you drag the scale while keeping the left mouse
button pressed. The current difference between both
values remains unchanged!
Double-clicking on the axis resets the range of values to the
configured values.
Double-click on the axis Resetting the range of values Double-clicking on the axis resets the range of values to the
configured values.
Space bar plus drag-and- Moving axes The position of the y axes is specified in the definition table
drop of an axis of the trend display.
However, you can change the position of the x and y axes in
online mode by pressing the space bar and moving the
selected axis to the new position using drag-and-drop.
This method can be used, for example, to move the x axis
towards the top.

See also
Overview of the trend and dynamic displays (Page 193)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 201
Configuring and using the trend and dynamic displays
5.3 Creating a trend display

5.3 Creating a trend display


A trend display allows you to visualize multiple online values in a trend chart.
This section describes how to create and configure a new trend display.

Requirements
• The parameters whose online values are to be displayed in the trend display must be
configured.
• The CFC charts and blocks must be compiled.

Procedure
1. Double-click the "Add new trend display" entry in the "Charts - Trend/dynamic display & force
table" folder of the project tree.
– A new trend display is added to the folder and opened in the editor.
– In the editor window, the table for the axis definition and the window for the trend
chart are displayed.
Work in the definition table of the trend display to configure parameters whose online
values are to be displayed in the trend chart.
2. To change the name of the trend display, select the "Rename" entry in the shortcut menu in
the project tree.
3. Open a CFC chart in a second editor window.
Navigate to the desired parameter in the CFC chart or in the chart interface.
4. Drag-and-drop the parameter from the chart into the "y axis/trend" column.
Alternatively, use Copy and Paste from the shortcut menu or the <Ctrl+C> and <Ctrl+V>
keyboard shortcuts.
The inserted parameter is displayed in a new row of the table:
– The name of the "y axis/trend" column is set by default and cannot be changed.
– The trend name is displayed in the legend in the trend window.
– Since the trend display is newly created, no axes have been defined yet.
Depending on the data type of the inserted parameter, an analog or digital axis is
automatically inserted in the "y axis/trend" column.
5. Configure the properties for the trend representation in the line of the inserted parameter:
– Trend name
– Trend color
– Emphasis (line thickness)
– Value representation (line or points)
– Sampling time
You can show and hide columns via the shortcut menu in the table header.

Configuring CFC charts


202 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.3 Creating a trend display

6. Add additional parameters if needed.


A digital or analog axis is inserted automatically if you insert a parameter of a specific data
type for which an axis does not yet exist.
To add a parameter to a specific axis, select the desired axis during insertion. You cannot
move the parameters in the table.
7. Configure the properties of the inserted axes in the table:
– Name of the axis
The axis name is displayed in the trend view as axis label.
– Minimum value
– Maximum value
– Position (left or right)
– Unit of the values
– Axis mode (linear or logarithmic)
The "Unit" and "Axis mode" properties can only be edited for analog axes.

Alternative procedure: Inserting parameters


If the trend display is not open, drag-and-drop a parameter from the chart to the
corresponding trend display in the project tree.
The parameter is automatically assigned to an axis.
If it does not yet exist, the axis is generated automatically.

Result
You successfully created a new trend display and configured the parameters/tags to be
visualized.

See also
Overview of the trend and dynamic displays (Page 193)
Using the trend display (Page 204)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 203
Configuring and using the trend and dynamic displays
5.4 Using the trend display

5.4 Using the trend display

Overview
A trend display allows you to visualize multiple online values in a trend chart.

Note
Value display depending on the interconnection
You can only record trends from the values that can also be monitored in online mode.
For this reason, no values of instructions are displayed in the trend chart if the input
parameters are not interconnected.

Additional information
• "Creating a trend display (Page 202)"
• "Trend display - Functions and operating options (Page 196)"

Trend values: Performance data and storage capacity requirement

Trend values per trend


A maximum of 10000 trend values per trend can be stored in the trend display.

Memory requirements
Each trend value occupies 16 bytes of memory.
That is, each trend occupies a maximum of 1.6 MB.

Sampling time and time range


You increase the sampling time to extend the time range of stored trend values.
• 1 s sampling time: A time range of approx. 2.7 hours can be stored.
• 10 s sampling time: A time range of approx. 27.7 hours can be saved.
For S7 target systems, you have the following options to specify the sampling time:
• In the "Testing" task card in the "Test settings" area you specify the "Sampling time chart"
in milliseconds.
– Minimum value for CFC charts: 500 ms
– Minimum value for parameters: 200 ms
• You change the sampling time for analog values in the "Sampling time" column of the
definition table in the trend display.
This value can only be equal to or greater than the value of the "Sampling time chart".

Configuring CFC charts


204 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.4 Using the trend display

Requirements
• The CFC charts and blocks have been compiled and downloaded to the device.
• The trend display is configured.
• The online connection to the device has been established once before.
• To display value changes, the CPU of the device must be in "RUN" mode.

Procedure
1. Open the trend display by double-clicking its name in the "Charts - Trend/dynamic display &
force table" folder.
The table for the axis definition and the window for the trend chart are displayed in the
editor window.
2. Click "Go online" in the toolbar.
3. Click the "Monitoring on/off" toolbar icon in the editor window of the trend display:
4. If you hover over the trend line with the mouse, a tooltip with the trend name is displayed
for each displayed digital or analog trend.
When you click on the trend name, the configured data source is displayed.
5. In the toolbar, in the "Time span of x axis" drop-down list, select the time range that the
trend chart is to display.
For analog values, you select the time for each analog trend individually in the "Sampling
time" column of the definition table.
This selection also influences the time range that a trend display can save.
6. In the toolbar, select the functions for controlling the display in the trend view.
The display of the online values and the trend chart is adjusted.
7. Depending on the target system, the "Testing" task card may contain additional settings for
testing and displaying online value.
Additional information on the S7 target system: "Working with CFC charts for S7"

Result
Online values are shown in a trend chart with the trend display.

See also
Overview of the trend and dynamic displays (Page 193)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 205
Configuring and using the trend and dynamic displays
5.5 Creating a dynamic display

5.5 Creating a dynamic display


A dynamic display allows you to visualize multiple online values in a table.
This section describes how to create and configure a new dynamic display.

Requirements
• The parameters whose online values are to be displayed in the dynamic display must be
configured.
• The CFC charts and blocks must be compiled.

Procedure
1. Double-click the "Add new dynamic display" entry in the "Charts - Trend/dynamic display &
force table" folder of the project tree.
– A new dynamic display is added in the folder.
– The table for the dynamic display is opened in the editor window.
Work in the table of the dynamic display to configure parameters whose online values are
to be displayed in the dynamic display.
2. To change the name of the dynamic display, select the "Rename" entry in the shortcut menu
in the project tree.
3. Open a CFC chart in a second editor window.
Navigate to the desired parameter in the CFC chart or in the chart interface.
4. Drag-and-drop the parameter from the chart into the "Tag name" column.
Alternatively, use Copy and Paste from the shortcut menu or the <Ctrl+C> and <Ctrl+V>
keyboard shortcuts.
The inserted parameter is displayed in a new row of the table.
The "Tag name" column contains the link to this parameter.
5. Configure the properties in the row containing the inserted parameter.
You can show and hide columns via the shortcut menu in the table header.
The "Unit" property can only be edited for analog values.
6. Add additional parameters if needed.
7. You can exclude individual parameters from updating:
In the Inspector window, disable the "For test" option in the "Properties" tab. Online values
are displayed only for the parameters for which the option is enabled.
This function is particularly useful if you have numerous tags/parameters in the dynamic
display and do not need all online values.

Configuring CFC charts


206 System Manual, 11/2023, A5E53466205-AA
Configuring and using the trend and dynamic displays
5.5 Creating a dynamic display

Alternative procedure: Inserting parameters


If the dynamic display is not open, drag-and-drop a parameter from the chart to the
corresponding dynamic display in the project tree.

Result
You have successfully created a new dynamic display and configured the parameters/tags to
be visualized.

See also
Overview of the trend and dynamic displays (Page 193)
Using the dynamic display (Page 208)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 207
Configuring and using the trend and dynamic displays
5.6 Using the dynamic display

5.6 Using the dynamic display


A dynamic display allows you to visualize multiple online values in tabular format.
Additional information: "Creating a dynamic display (Page 206)"

Requirements
• The CFC charts and blocks have been compiled and downloaded to the device.
• The dynamic display has been configured.
• The online connection to the device has been established once before.
• To display value changes, the CPU of the device must be in "RUN" mode.

Procedure
1. Open the dynamic display by double-clicking its name in the "Charts - Trend/dynamic display
& force table" folder.
The editor displays a table.
2. Click "Go online" in the toolbar.
3. Click the "Monitoring on/off" toolbar icon in the editor window of the dynamic display:
The current online values of the configured tags or parameters are displayed in the table.
4. Check the settings in the "For test" column:
– If the option is enabled, the online values of the configured tags or parameters are
displayed.
– If the option is disabled, no online value is displayed for the corresponding parameter.
5. You can add additional parameters to the table in online mode.
For example, drag-and-drop a parameter from a CFC chart into the table of the dynamic
display.
6. Depending on the target system, the "Testing" task card may contain additional settings for
testing and displaying online value.
Additional information on the S7 target system: "Working with CFC charts for S7"

Result
Online values are displayed in a table with the dynamic display.

See also
Overview of the trend and dynamic displays (Page 193)

Configuring CFC charts


208 System Manual, 11/2023, A5E53466205-AA
Data types in CFC 6
6.1 Data types in the TIA Portal
CFCs support the standard data types of the TIA Portal.
Additional information on syntax and display of the data types, for example, is available in
the TIA Portal information system:
• "Program PLC > Data types"

6.2 Elementary data types

6.2.1 Bit strings

6.2.1.1 BOOL (Boolean)

Keyword
BOOL

Description
Bit value

Value range
0 to 1

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 209
Data types in CFC
6.2 Elementary data types

6.2.1.2 BYTE

Keyword
BYTE

Description
Sequence of 8 bits

Value range
0 to 255

See also
Data types in the TIA Portal (Page 209)

6.2.1.3 WORD

Keyword
WORD

Description
Sequence of 16 bits

Value range
0 to 65535

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


210 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

6.2.1.4 DWORD (Double Word)

Keyword
DWORD

Description
Sequence of 32 bits

Value range
0 to 4294967295

See also
Data types in the TIA Portal (Page 209)

6.2.1.5 LWORD (Long Word)

Keyword
LWORD

Description
Sequence of 64 bits

Value range
• Signed integers:
-9_223_372_036_854_775_808 to +9_223_372_036_854_775_807
• Unsigned integers:
0 to 18_446_744_073_709_551_615

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 211
Data types in CFC
6.2 Elementary data types

6.2.2 Integers

6.2.2.1 Signed integers

SINT (Short Integer)

Keyword
SINT

Description
Signed integer

Value range
-128 to +127

See also
Data types in the TIA Portal (Page 209)

INT (Integer)

Keyword
INT

Description
Signed integer

Value range
-32768 to 32767

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


212 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

DINT (Double Integer)

Keyword
DINT

Description
Signed double integer

Value range
From -2 147 483 648 to +2 147 483 647

See also
Data types in the TIA Portal (Page 209)

LINT (Long Integer)

Keyword
LINT

Description
Signed integer

Value range
-9_223_372_036_854_775_808 to +9_223_372_036_854_775_807

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 213
Data types in CFC
6.2 Elementary data types

6.2.2.2 Unsigned integers

USINT (Unsigned Short Integer)

Keyword
USINT

Description
Unsigned integer

Value range
0 to 255

See also
Data types in the TIA Portal (Page 209)

UINT (Unsigned Integer)

Keyword
UINT

Description
Unsigned double integer
Length 16 bits

Value range
From 0 to 65_535

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


214 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

UDINT (Unsigned Double Integer)

Keyword
UDINT

Description
Unsigned integer

Value range
0 to 4_294_967_295

See also
Data types in the TIA Portal (Page 209)

ULINT (Unsigned Long Integer)

Keyword
ULINT

Description
Unsigned integer

Value range
0 to 18_446_744_073_709_551_615

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 215
Data types in CFC
6.2 Elementary data types

6.2.3 Floating-point numbers

6.2.3.1 REAL (Real Numbers)

Keyword
REAL

Description
Signed floating-point number

See also
Data types in the TIA Portal (Page 209)

6.2.3.2 LREAL (Long Reals)

Keyword
LREAL

Description
Unsigned floating-point number

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


216 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

6.2.4 Duration (Times)

6.2.4.1 TIME

Keyword
TIME

Description
Duration

Value range
-24d_20h_31m_23s_648ms to 24d_20h_31m_23s_647ms
(In milliseconds: -2147483648 ms to 2147483647 ms)

See also
Data types in the TIA Portal (Page 209)

6.2.4.2 LTIME (Long Time)

Keyword
LTIME

Description
Duration
Days (d), hours (h), minutes (min), seconds (s), milliseconds (ms), microseconds (μs) and
nanoseconds (ns).

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 217
Data types in CFC
6.2 Elementary data types

6.2.4.3 S5TIME

Keyword
S5TIME

Description
Duration in S5 format

Value range
From 0h_0m_0s to 2h_46m_30s
From 0 to 9990 ms in steps of 10 ms
From 100 ms to 99900 ms in steps of 100 ms
From 1 s to 999 s in steps of 1 s
From 10 s to 9990 s in steps of 10 s

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


218 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

6.2.5 Point in time (Date and time)

6.2.5.1 DATE (Date)

Keyword
DATE

Description
Point in time
Date (YYYY-MM-DD), e.g. 2020-01-26

See also
Data types in the TIA Portal (Page 209)

6.2.5.2 TOD (Time of Day)

Keyword
TOD or TIME_OF_DAY

Description
Point in time
Time-of-day in hours:minutes:seconds.milliseconds (HH:MM:SS.MS), e.g. 15:21:00.321

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 219
Data types in CFC
6.2 Elementary data types

6.2.5.3 LTOD (Long Time of Day)

Keyword
LTOD or LTIME_OF_DAY

Description
Point in time
Number of nanoseconds since the start of day (0:00 hrs).
Time-of-day in hours:minutes:seconds.nanoseconds (HH:MM:SS.NS)

See also
Data types in the TIA Portal (Page 209)

6.2.5.4 DT (Date and Time of Day)

Keyword
DT or DATE_AND_TIME

Description
Point in time
Information on date and time of day in BCD format (YYYY-MM-DD-HH:MM.SS.MS)

Value range
Min.: DT#1990-01-01-00:00:00.000
Max.: DT#2089-12-31-23:59:59.999

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


220 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

6.2.5.5 LDT (Long Date and Time)

Keyword
LDT or LDATE_AND_TIME

Description
Point in time
Information on date and time in nanoseconds since 01/01/1970 0:0.

DTL and LDT


The data types DTL and DTL provide the same information. The internal data format of these
two data types has been optimized for specific operations.
Adding and subtracting, for example, is very easy with LDT.
DTL is suitable for reading the date.

See also
Data types in the TIA Portal (Page 209)

6.2.5.6 DTL

Keyword
DTL

Description
Point in time

DTL and LDT


The data types DTL and LDT provide the same information. The internal data format of these
two data types has been optimized for specific operations.
Adding and subtracting, for example, is very easy with LDT.
DTL is suitable for reading the date.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 221
Data types in CFC
6.2 Elementary data types

6.2.6 Characters

6.2.6.1 CHAR (Single-Byte Character)

Keyword
CHAR

Description
Single character

Value range
Depending on the selected Windows character set either "single byte" or "multibyte".

See also
Data types in the TIA Portal (Page 209)

6.2.6.2 WCHAR (Double-Byte Character)

Keyword
WCHAR

Description
Tag.
Single character.
Sequence of 16 bits.

Value range
$0000 - $D7FF

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


222 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.2 Elementary data types

6.2.7 Parameter types

6.2.7.1 TIMER

Keyword
TIMER

Description
Number of an S7 timer.

Value range
0 to 65535 (number depends on the target system).

Notes on use in the CFC chart


The data type is not supported in the chart interface.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 223
Data types in CFC
6.2 Elementary data types

6.2.7.2 COUNTER

Keyword
COUNTER

Description
Number of an S7 counter

Value range
0 to 65535 (number depends on the target system).

Notes on use in the CFC chart


The data type is not supported in the chart interface.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


224 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.3 Compound data types

6.3 Compound data types

6.3.1 STRUCT

Keyword
STRUCT

Description
A structure of data consisting of different elementary and complex data types.

Value range
The value ranges of the used data types apply.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 225
Data types in CFC
6.3 Compound data types

6.3.2 STRING

Keyword
STRING

Description
String

Value range
Without additional information, the data type has a dimension of up to 254 characters.
To explicitly define a specific length, use the syntax STRING[N].

STRING[N]
Character string with a length of "N" bytes.
Depending on the selected Windows character set "single byte" or "multibyte" (at least N/2
characters).

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


226 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.3 Compound data types

6.3.3 ARRAY

Keyword
ARRAY

Description
Data structure consisting of a fixed number of components of the same data type.
All data types except ARRAY and reference data types are permitted for the ARRAY
components.
Multidimensional ARRAYs are also supported, e.g.: "MyDB".MyArray[#i,#j]. You can find
more information on multidimensional ARRAYs as well as an example in the TIA Portal
information system under "Programming the PLC > Data types > Basic information on ARRAY".
Not permitted data types for ARRAY components:
• ARRAY
• Pointer: ANY, POINTER, VARIANT
• Parameter types: COUNTER, TIMER

Format
• ARRAY[Low limit..High limit] of <Data type>

Restrictions
Supported functions in CFC:
• Import of blocks containing parameters of the data type "ARRAY" with fixed dimension
limits
• Import of FBs with the element type "Array of FB":
ARRAYs of FB types are only allowed in the "Static" section of the block.
• Interconnections between same-type block interfaces of ARRAY tags
• Interconnections of ARRAY module connections with type-same parameters of global DBs
Unsupported functions in CFC:
• Import of blocks containing parameters of data type "ARRAY" with dynamic dimension
limits
• Import of FBs with element type "Array of FB" in other sections besides the "Static" section
of the block:
• Access to elements within ARRAY tags
• Online display of values in ARRAY tags
• Testing with the "Forcing" function

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 227
Data types in CFC
6.3 Compound data types

Value range
The specified value ranges are maximum values. The actual number of ARRAY elements that
can be used depends on the data type and the CPU used.

Blocks with standard access


• [-32 768..32 767] of <DataType>

S7-1500 blocks with optimized access *)


• [-2 147 483 648..2 147 483 647] of <DataType>
Maximum number of ARRAY elements in total:
– 16 777 216 (= 2 24)
*) The internal storage structure is hidden for S7-1500 blocks with optimized access. The system automatically optimizes and manages the
addresses. More information: "Working with CFC charts for S7 > Blocks in CFC charts for S7"

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


228 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.4 User-defined data types

6.4 User-defined data types


Overview
In addition to the elementary and complex data types, you can also use your own data types,
so-called "user-defined data types", in a TIA project. These data types are also referred to as
"User Defined Datatypes" (UDT).
A user-defined data type is an individually defined version of the STRUCT data type and is
stored with its own name (UDT name) in the project.
CFC interprets tags with a UDT name, such as block interfaces, as if these tags were combined
directly with a data structure of the STRUCT data type.

See also
STRUCT (Page 225)
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 229
Data types in CFC
6.5 Pointer

6.5 Pointer

6.5.1 VARIANT

Keyword
VARIANT

Description
A block input of the VARIANT data type can be interconnected with a source of any data type.
The block input can also be interconnected with a data block element of an ARRAY type.

Exception
Interconnections with a source of the data type ANY or POINTER are not supported in CFC.

Notes on use in the CFC


Blocks with output parameters of the VARIANT data type cannot be imported into CFC.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


230 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.5 Pointer

6.5.2 POINTER

Keyword
POINTER

Description
Pointer to a memory area

Value range
Only as interconnection

Notes on use in the CFC


You can interconnect an input or output parameter of the data type POINTER with all data
types except POINTER and ANY.
The destination can also be an external tag.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 231
Data types in CFC
6.5 Pointer

6.5.3 ANY

Keyword
ANY

Description
Pointer to a data element

Value range
Only as an interconnection with input or output parameter or external tag.

Notes on use in the CFC


You can interconnect an input or output parameter of the data type ANY with all data types
except POINTER and ANY.
The destination can also be an external tag.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


232 System Manual, 11/2023, A5E53466205-AA
Data types in CFC
6.6 System data types

6.6 System data types


System data types are not supported in CFC.

See also
Data types in the TIA Portal (Page 209)

6.7 Hardware data types


Overview
Hardware data types are made available by the CPU. The number of available hardware data
types depends on the CPU.
Some hardware data types are versions of elementary or complex data types.
CFC interprets tags with hardware data types, such as block interfaces, as if these tags were
an elementary or complex data type.

See also
Data types in the TIA Portal (Page 209)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 233
Data types in CFC
6.7 Hardware data types

Configuring CFC charts


234 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7 7
7.1 CFC charts for S7 target systems
This section includes specific descriptions for the S7 target system when working with CFC
charts.

Additional information in the TIA Portal Information System


• Information about supported systems and overview of supported CPUs:
"Readme > STEP 7 > STEP 7 CFC > System requirements for SIMATIC STEP 7 CFC (Page 13)"
• Licensing information:
"Readme > STEP 7 > STEP 7 CFC > Licensing for SIMATIC STEP 7 CFC (Page 15)"
• Generally valid information for configuring CFC charts:
"Configuring technologically > Configuring CFC charts (Page 63)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 235
Working with CFC charts for S7
7.2 Blocks in CFC charts for S7

7.2 Blocks in CFC charts for S7

Additional S7 blocks
In addition to the function blocks (FB), functions (FC) and instructions, S7 target systems
contain additional block types, e.g.:
• Organization blocks (OB) for structuring the program execution
OBs are created during compiling for tasks that are assigned to the CFC charts. The
properties of these OBs can be changed to a limited extent.
• Data blocks (DB) for data storage
Global data blocks (DB) are used for storing data that can be used by any block.
• Multi-instance blocks
A function block does not store its data in an instance data block of its own, but rather in
the instance of another function block.
When you import or copy a multi-instance block, all blocks called by the multi-instance
block are copied as well.
More information in the information system of TIA Portal under "Programming a PLC >
Programming basics":
– "Block calls > Instances > Multi-instances"
– "Using and addressing operands > Addressing operands > Addressing variables in data
blocks > Addressing instance data"

Configuring CFC charts


236 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.2 Blocks in CFC charts for S7

S7 blocks in CFC
• Data blocks and organization blocks are not inserted or processed in CFC.
• You can interconnect the structure elements of global data blocks with the parameters of
function blocks, functions and CFC charts.
• Typed blocks are not supported in CFC.
Typed blocks are block templates from libraries located in the "Types" folder.
To use a typed block, remove the type assignment after inserting it into the project.

Length of block names


The name of instance data blocks may be a maximum of 125 characters in total.
The instance name consists of the name of the CFC chart in which the instance is located, the
name of the type and the instance number:
• <CFC chart>/<Block name_Instance number>
For hierarchical charts, the instance name contains the entire path of the subcharts:
• <Basic chart>/<Subchart 1>/<Subchart 2>/<Block name_Instance number>
Example with 3 hierarchy levels:
• CFC_2/CFC_2_1/CFC_2_1_1/MyFB_1
Therefore, use short block names.
If necessary, change the block names in STEP 7 before inserting the first instance in an
hierarchical CFC chart.

User-defined attributes
When you select a block parameter, the inspector window shows the properties of the tag in
the "General" and "Attributes" areas.
CFC also uses the following attributes in addition to the standard attributes:

CFC_Configurable Configurable
CFC_EnableTagReadback Tag readback
CFC_EngineeringUnit Assigned engineering unit
CFC_EnumerationTexts No function in CFC
CFC_ForTest Registered for the CFC test mode.
CFC_HighLimit High limit
CFC_Interconnectable Interconnectable
CFC_LowLimit Low limit
CFC_Visible Visible

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 237
Working with CFC charts for S7
7.2 Blocks in CFC charts for S7

S7-1500 blocks: Access modes


CFC charts support blocks with optimized access and standard access.
New blocks and functions are created as data blocks with optimized access.
Blocks that you have imported from a different system, such as an S7-400, may have
standard access.
You can change the access mode in the block type properties under "General > Attributes".

CAUTION
Changing can result in full download
Changing the block access has effects on the internal memory structure.
In most cases, this means you will have to recompile and load the program after block
access has been changed.
Loading of the entire software with the S7 target system requires a CPU stop.
Effects of the type change
Changing the access type corresponds to a type change. Therefore, you must take into
account the effects on the updated instances.
More information: "Central change of a block type (Page 116)"

Note
Performance: Avoid mixing the access types
You can combine blocks with optimized access and blocks with standard access in a CFC
chart.
When you interconnect both types in a CFC chart, the necessary conversions will reduce the
performance.
To improve the performance of a CFC chart, interconnect only blocks and parameters with
the same type of access and retentivity setting.

Configuring CFC charts


238 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.2 Blocks in CFC charts for S7

Data blocks with optimized access


• The internal storage structure is hidden for data blocks with optimized access.
The variable declaration contains only the symbolic names of the data elements.
• The system automatically optimizes and manages the addresses.
Access errors, for example, from SIMATIC HMI, are prevented.
• You can determine the retentivity behavior of individual parameters.
– Retentive
– Non-retentive
– Set in IDB:
The retentivity can be set in the instance data block.
The setting in the instance data block is then valid for all parameters with the setting
"Set in IDB".
This setting affects the performance because a non-optimized storage is used
internally. Interconnections to parameters with the setting "Retentive" or "Non-
retentive" require conversions.
For structured data types, the retentivity setting always applies to the entire structure.
• The optimized access improves the performance of the CPU.

Data blocks with standard access


• The storage structure of the elements in the data block is transparent, for example, offset
and storage length can be displayed.
• The data elements can be addressed via a symbolic name as well as via a fixed address
within the block.
• The retentivity setting is valid for all tags of the data block.
• The data blocks are compatible with S7-300/400 controllers.

More information
Information system of the TIA Portal:
• "Programming a PLC":
– "Programming basics > Blocks in the user program > Blocks with optimized access >
Basics of block access"
– "Creating and managing blocks > Specifying block properties > Overview of block
properties"
– "Declaring the block interface > Rules for declaring the block interface > Setting the
retentivity of local tags"
– "Programming data blocks > Properties of the tags in data blocks"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 239
Working with CFC charts for S7
7.2 Blocks in CFC charts for S7

See also
Instructions and blocks (Page 27)
Updating instances of a changed block type (Page 120)

Configuring CFC charts


240 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.3 Reserved number ranges for user blocks in CFC

7.3 Reserved number ranges for user blocks in CFC


The reserved number ranges for user blocks are set when new project is created. The
reserved number ranges are displayed in the basic settings for CFC charts.
This setting applies to all target systems that are newly added to the project after the
reserved number ranges have been configured.

Do not change internal CFC blocks


Only edit your own blocks and instructions using the STEP 7 editors.

S7-1500 number ranges


The number ranges for data blocks and functions are specified automatically.
The following numbers are available for user blocks:
• 0 - 19999
CFC uses numbers ≥ 20000.

Note
Do not change internal CFC system blocks
You are not permitted to change the system blocks created by CFC in the number range
≥ 20000.
Only edit your own blocks and instructions using the STEP 7 editors.

See also
Basic settings for CFC charts (Page 43)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 241
Working with CFC charts for S7
7.4 "Chart sequence & extras" editor for S7

7.4 "Chart sequence & extras" editor for S7

Target system S7: Tab


The tabs in the "Chart sequence and extras" editor are shown depending on the target
system.
The S7 target system contains the following tabs:
• Chart sequence
• Task assignment
• Target system settings
• Textual interconnections
• Block types
• Block instances
• Statistics

"Chart sequence" tab


In "Chart sequence", you specify the run sequence of all CFC charts of a target system with
drag-and-drop.
You can change the task assignment of individual instructions/blocks or assign additional
tasks.
In the "Chart sequence" you also select charts for automatic optimization of the run sequence
and set the properties for timing of the charts.
Additional information: "Adapting the run sequence (Page 166)"

"Task assignment" tab


The "Task assignment" tab lists the configured tasks and the instructions/blocks executed in
them.
This view shows the actual sequence for processing of the CFC charts and blocks/instructions
in the device.
The "Task assignment" serves only to provide information.
• To change the task assignment of charts, select the "Chart sequence" tab.
Additional information: "Adapting the run sequence (Page 166)"
• To change the task assignment of instructions/blocks, display the CFC chart in the "Control
flow".
Additional information: "Adapting the run sequence within the CFC chart (Page 171)"

Configuring CFC charts


242 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.4 "Chart sequence & extras" editor for S7

"Textual interconnections" tab


For each CFC chart the "open" textual interconnections are displayed in a table.
You can close or delete the textual interconnections in the table.
Additional information: "Textual interconnections in the "Chart sequence & extras" editor
(Page 164)"

"Target system settings" tab


• The tab contains the task assignment for the chart folders of the target system.
New CFC charts are created with this task assignment.
• The reserved number ranges for user blocks are displayed.
Additional information on the task assignment: "Runtime model (Page 166)"

"Block types" tab


The tab is only used for comparing and updating blocks.
The blocks in the "Program blocks" folder and the blocks imported in CFC are displayed.
Specific data are shown for each block, e.g. the version.
There is a version comparison for the blocks imported in CFC with the result represented in a
symbol. This shows existing differences and indicates if there is a need for an update.
Additional information for updating an imported block type: "Importing blocks in CFC with S7
target system (Page 244)"

"Block instances" tab


All block types with their associated instances are displayed in a table.
You can open the associated CFC chart via an instance entry.
Additional information: "Searching for and managing block instances in CFC (Page 253)"

"Statistics" tab
In the "Statistics" area, you can see the number of CFC instance DBs used for the respective
PLC.

See also
"Chart sequence & extras" Editor (Page 49)
Basic settings for CFC charts (Page 43)
SIMATIC STEP 7 CFC licensing (Page 15)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 243
Working with CFC charts for S7
7.5 Importing blocks in CFC with S7 target system

7.5 Importing blocks in CFC with S7 target system


Blocks from the "Program blocks" folder of an S7 target system can be inserted into a CFC
chart and be used several times.
During insertion, this S7 block is imported into CFC and defined as type.
You create an instance of this type by inserting a type into a CFC chart.
If the S7 block used in CFC is changed, the instances of this type can be updated in all CFC
charts of a target system.

Note
Length of block names
Check the block names before importing into CFC.
The name of instance data blocks may be a maximum of 125 characters in total.
• The instance name consists of the name of the CFC chart in which the instance is located,
the name of the type and the instance number.
• For hierarchical charts, the instance name contains the entire path of the subcharts.
If necessary, change long block names in STEP 7 before importing into CFC.

Import and revision comparison

"Chart sequence & extras" Editor


The "Block types" tab in the "Chart sequence & extras" Editor displays the versions of the
blocks in the "Program blocks" folder and the blocks imported in CFC.
This shows existing differences and indicates if there is a need for an update. If necessary,
one or more blocks can be updated or imported for the first time.
Additional information: "Comparison and updating of imported blocks in CFC (Page 248)"

"Update blocks" dialog


The blocks to be updated and the existing differences are displayed in the "Update blocks"
dialog.
If differences exist, the dialog box opens automatically:
• During the updating of the blocks imported into CFC
• During the initial import, for example, when copying a CFC chart from a different S7 target
system
The import process can be continued or cancelled in this dialog box.

Configuring CFC charts


244 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.5 Importing blocks in CFC with S7 target system

Example: Copying CFC charts and importing blocks


The S7 blocks that are to be used in a CFC chart do not have to be configured in the same
target system as the CFC chart.
You can also import S7 blocks from other S7 systems of the project.
The following figure shows an example with the S7 systems "PLC1" and "PLC2" and the
possible copy and import paths for blocks and CFC charts.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 245
Working with CFC charts for S7
7.5 Importing blocks in CFC with S7 target system

In the figure, the following actions are executed with the blocks "FB11" and "FB21":

Action Note
(1) In "PLC1", the "FB11" block is copied from the "Program blocks" folder to the CFC chart
"CFC100".
"FB11" is thus imported as type in CFC of the "PLC1".
"FB11" contains a call for "FC11". However, the function "FC11" is not imported as type
in CFC.
(2) CFC chart "CFC100" with the block "FB11" is copied from "PLC1" to "PLC2".
"FB11" is imported as type in CFC of the "PLC2".
Action "4" is automatically executed as well.
(3) Alternatively to action "(1)" and "(2)", it is also possible to import the block "FB11" from the
"Program blocks" folder of "PLC1" to the CFC chart "CFC100" in "PLC2".
"FB11" is imported as type in CFC of the "PLC2".
"FC11" is also copied, because it is called by "FB11".
Action "4" is automatically executed as well.
(4) For action "(2)" or "(3)", "FB11" and "FC11" are copied to the "Program blocks" folder of
"PLC2".
"FB11" contains a call for "FC11". However, the function "FC11" is not imported as type
in CFC of "PLC2".
(5) From "PLC2", the "FB21" block is copied from the "Program blocks" folder to the CFC chart
"CFC200".
"FB21" is thus imported as type in CFC of the "PLC2".

Overview
The following table describes possible scenarios that can occur when copying CFC charts or
importing of S7 blocks in CFC.

Scenario Reaction
Block does not exist in the target CFC chart is copied.
system. Blocks, including all called blocks, are transferred from the
source system to the target system.
In the process the blocks are first copied to the "Program
blocks" folder and then imported into CFC.
Block in the target system is completely CFC chart is copied.
identical.
Blocks in the source system and target CFC chart is not copied if the blocks in the source and target
system are different. have differences that require a CPU stop during loading.
A CPU stop is required for structural changes in the block
interface, for example, change of data type or default value,
number of parameters.
Note to the user, indicating what the conflict is.

Configuring CFC charts


246 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.5 Importing blocks in CFC with S7 target system

Scenario Reaction
Block exists in the target system, CFC chart is copied. The copied CFC chart is adapted to the
different numbers target system.
Block is not copied. The block number and the block in the
target remain unchanged.
Type update in CFC:
1. Message to the user that only download of the entire
software is possible in CPU STOP.
2. "Update blocks" dialog:
Display of the blocks to be updated and the differences.

User decision on type update.


3. During type update, the existing type receives the new
number.
Block exists in the target system, CFC chart is not copied.
different name Type update in CFC:
1. Message to user indicating that names are different
2. "Update blocks" dialog:
Display of the blocks to be updated and the differences.

User decision on type update.


3. During type update, the block type in CFC receives the
new name.
Downloading of the changed software without CPU
STOP is possible if only the name has been changed.
Block in the target system is completely CFC chart is copied.
identical: Block instance has been However, downloading results in an error due to a name
deleted. conflict.
Change was not correctly transferred Ensure that a full download or two downloads of changes
via full download or 2 x downloads of are always performed after deletion of instances.
changes.
The task of the CFC chart to be copied CFC chart is copied.
does not exist in the target system. The assignment of the CFC chart to the task is retained.
A non-existent task is created during the next compilation of
the software, if the target system supports this task.
Task of the copied chart is different in CFC chart is copied.
source and target system. The assignment of the CFC chart to the task is retained.

See also
Updating block types imported in CFC (Page 250)
Searching for and managing block instances in CFC (Page 253)
"Chart sequence & extras" editor for S7 (Page 242)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 247
Working with CFC charts for S7
7.6 Comparison and updating of imported blocks in CFC

7.6 Comparison and updating of imported blocks in CFC

Chart sequence and extras: "Block types" tab


The blocks in the "Program blocks" folder and the blocks imported into CFC are shown in the
"Block types" tab of the "Chart sequence and extras" editor.
Specific data on each block is displayed.
The blocks imported into CFC are compared; the result of this comparison is represented by a
symbol. This shows existing differences and indicates if there is a need for an update.
The functions in the "Block types" tab are specific to the S7 target system.
More information on updating the block types: "Updating block types imported in CFC
(Page 250)"

Overview: Tables
The name, type and block version, among other things, is displayed for each block.
Additional properties of the selected block are displayed in the Inspector window.
You change the orders of columns in the table by dragging a column header with the mouse.
You change the column width by dragging the mouse or have the shortcut menu optimized
automatically.

"Blocks in the Program blocks folder"


The table contains a list of blocks that you can import into the CFC.

"Block types imported in CFC"


The table contains a list of blocks that were imported as block instances into the CFC.
It also lists blocks whose instances were later deleted in the charts. These unused blocks are
identified with their own status symbol.
The status symbol in the "Difference" column displays the result of the comparison between
the block type in the "Program blocks" folder and the version imported into the CFC.
Information on the comparison status is displayed as a tooltip at the symbol and in the
Inspector window.

Configuring CFC charts


248 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.6 Comparison and updating of imported blocks in CFC

Overview: Buttons

"Importing block(s)"
This button is used to import the blocks selected in the "Blocks in "Program blocks" folder"
table into CFC.
The button is activated if at least one block is selected in the table.
If a conflict occurs during the import, a dialog shows more information on the cause, e.g.
differences between the blocks.
If the operation is canceled, any changes made are discarded.

"Delete unused blocks"


This button deletes blocks that were imported into the CFC but no longer in use.
The button is enabled if the table contains at least one unused block.
Unused blocks can be identified by their status symbol in the "Differences" column.

"Update block(s)"
This button is used to import the blocks selected in the table "Block types imported in CFC"
into the CFC again. The types and their instances are updated when this button is pressed.
The button is activated if at least one block is selected in the table.
After the start of the operation a dialog displays more information about the differences of
the blocks.
If the operation is canceled, any changes made are discarded.

See also
Importing blocks in CFC with S7 target system (Page 244)
Searching for and managing block instances in CFC (Page 253)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 249
Working with CFC charts for S7
7.7 Updating block types imported in CFC

7.7 Updating block types imported in CFC


Blocks added in the CFC represent an instance of a type.
The type exists, for example, in a library or the "Program blocks" folder of the project tree.

"Chart sequence & extras" editor


You can compare and update blocks that were imported from the "Program blocks" folder into
CFC in the "Chart sequence & extras" editor.
The blocks in the "Program blocks" folder and the blocks imported into CFC are displayed in
the "Block types" tab.
The blocks imported into CFC are compared; the result of this comparison is represented by a
symbol. This shows existing differences and indicates if there is a need for an update.

Note
Libraries not included
The comparison and import of blocks is only available for block types that were imported
from the "Program blocks" folder in the project tree.
Abort update
If the update operation is canceled or an error occurs, any changes made are discarded.
Undoing an update
You can use the "Undo" button on the toolbar to undo all changes after a successful update
operation.

User-defined PLC data types (UDT)


When the block instances of PLC data types are updated, the interconnections are
automatically also updated. It is no longer necessary to manually adapt the interconnections
at the instances.
Requirement:
• All changed blocks that are currently interconnected are updated at the same time.
If you update only some of the instances or some of the changed blocks, the
interconnections to the non-updated block instances are lost.
The removed interconnections are listed in the Inspector window "Info" under "General".
Adapt these interconnections afterward.

Configuring CFC charts


250 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.7 Updating block types imported in CFC

Block types imported in CFC


The "Differences" column displays the status of the block in comparison with the block types.

Icon Meaning
There are no differences between the compared blocks.
No action required.
No instances of this imported block are currently used in the CFC.
Existing differences have no effect in the CFC.
There are differences between the compared blocks.
The differences are displayed in the Inspector window in the "Properties >
Differences" tab.
The block type of the imported block was not found in the block folder.

Other status Status information is displayed in the "Properties" tab of the Inspector window.
Example: Example: The block is not compiled.

Procedure
1. Double-click on "Chart sequence & extras" in the project tree.
The editor opens.
2. Switch to the "Block types" tab.
The following information is displayed in the table:
– Blocks in the "Program blocks" folder
– Blocks imported into CFC
– Status of the comparison
3. In the table "Block types imported in CFC" check the status symbols in the column
"Differences".
The symbol indicates whether there are differences between the blocks in the "Program
blocks" folder and the version imported into CFC.
If you point on a status symbol with the mouse, then a tooltip is displayed and provides an
explanation.
4. To import one or more blocks again and thus update the type in CFC, select the
corresponding blocks in the table "Block types imported in CFC".
5. Click "Update block(s)".
The "Update blocks" dialog opens.
The differences between the versions in the "Program blocks" folder and in CFC are
displayed.
6. Click "OK".
The selected blocks are imported into CFC.
The instances are updated.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 251
Working with CFC charts for S7
7.7 Updating block types imported in CFC

Result
The blocks imported in CFC are updated.
The Inspector window contains information on the update where appropriate.

See also
Comparison and updating of imported blocks in CFC (Page 248)
Updating instances of a changed block type (Page 120)
Central change of a block type (Page 116)
Searching for and managing block instances in CFC (Page 253)
Importing blocks in CFC with S7 target system (Page 244)

Configuring CFC charts


252 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.8 Searching for and managing block instances in CFC

7.8 Searching for and managing block instances in CFC


When using types and instances of blocks, it may be necessary to get an overview of all block
types and their instances in the project.
This overview offers the "Block instances" tab in the "Chart sequence & extras" editor.

"Block instances" table


All block types and instances are displayed in the "Block type/instance" column.
The instances are displayed as lower-level objects below the associated types.
You can find and replace strings with the "Find and Replace" function.

Toolbar
The toolbar includes symbols for showing/hiding the lower-level elements/instances.
The symbols for jumping to the "Data flow" or "Control flow" are activated for a selected
instance.

Instance path
The "Path to instance" column displays the path to the instance in the "<Chart>\<Instance
name>" format.
Double-click the path to open the associated CFC and select the type instance.

Formatting table
You can turn the sorting of the table on/off or change it by clicking the respective table
column.
Use drag-and-drop to move the selected column header and change the order of the
columns.

Procedure
1. Double-click on "Chart sequence & extras" in the project tree.
The editor opens.
2. Switch to the "Block instances" tab.
3. Select the "Search and replace" pane in the "Tasks" task card.
– Search: Search for a text in all fields of the table.
If the text searched for can be edited at the location of use, the found text is selected
for editing.
– Replace: You can replace texts in the instance name and comment of the instance.
4. Select a type or an instance in the table.
The corresponding configuration data are displayed in the Inspector window.
– You can change the configuration of an instance.
– Data cannot be edited for a type.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 253
Working with CFC charts for S7
7.8 Searching for and managing block instances in CFC

Result
All block types and their instances in the project are displayed.
When selecting the table entry of an instance, you can jump to the location of use in the CFC
or even change the configuration data.

See also
Updating block types imported in CFC (Page 250)
Comparison and updating of imported blocks in CFC (Page 248)
Importing blocks in CFC with S7 target system (Page 244)
"Chart sequence & extras" editor for S7 (Page 242)

Configuring CFC charts


254 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.9 Comparison status of CFC charts

7.9 Comparison status of CFC charts

Online/offline project status


The status of the CFCs in the project and of the downloaded charts in the S7 target device
are compared automatically and displayed in the project tree.
Each CFC in the "Charts" folder is identified with a corresponding status icon.
The status display provides an overview of potential changes in the project and whether it is
necessary to download data to the device.

Icon Meaning
The CFC exists in the project, but not in the device.

The basic chart exists in the project, but not in the device.

The CFC is identical in the project and in the device.

The basic chart is identical in the project and in the device.

The CFC was modified in the project and exists in a different version in the device.

The basic chart was modified in the project and exists in a different version in the device.

The basic chart is identical in the project and in the device, but a subchart was modified.

See also
Overview: Compiling and downloading CFC charts (Page 256)
Hierarchical CFC charts (Page 31)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 255
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7.10 Compiling CFC charts and downloading them for the


S7 target system

7.10.1 Overview: Compiling and downloading CFC charts

Overview
You will have to compile the configured CFC charts for testing or application and download
them to the respective device, such as the CPU of the S7 target system.
You have the following options:

Downloading and testing during operation


Downloading and testing is not critical to safety and may be carried out on the device
in the real system.
This procedure is described below.

Simulation with a test CPU


For security reasons, downloading and testing may not be carried out on a device of the
real system.
In this case, you can run a complete download to a so-called test CPU.
This test CPU may be a different device of the real system, or the "S7-PLCSIM"
simulation software.
Additional information: "Downloading CFC charts to a test CPU (Page 263)"

Configuring CFC charts


256 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

Basic procedure
The following steps are always performed when you compile and download the CFC charts
to a device:
1. Compiling all charts
This step is necessary if there are no CFC charts in the device or if they have not been
compiled yet.
Additional information: "Compiling CFC charts (Page 258)"
2. Downloading all charts
This step is necessary if there are no CFC charts in the device of the target system.
Additional information: "Downloading all CFC charts (Page 259)"

Further processing of CFC charts


When you change individual CFC charts after these steps, you must execute the
following steps:
1. Compilation of modified charts
Use the compilation of changes to only compile changed CFC charts.
It is necessary that all CFC charts have been compiled once before for this device.
Additional information: "Compiling CFC charts (Page 258)"
2. Downloading modified charts
To download modified CFC charts to the device of the target system, download only
the changes.
It is necessary that all CFC charts have been compiled and downloaded once before
for this device.
Additional information: "Downloading modified CFC charts (Page 261)"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 257
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7.10.2 Compiling CFC charts


You can decide whether you want to compile all charts or only modified charts.
You must compile all charts if no CFCs have been compiled in the device yet.

CAUTION
Interface change can result in full download
After interface changes at the block type and subsequent update of the block type in the
target system, you will often only be able to compile and load the entire software.
An interface change is, for example, the change of a default value.
Loading of the entire software with the S7 target system requires a CPU stop.

Requirement
• The project tree is open.
• The CFCs belong to a specified CPU.

Procedure
1. Select the "Charts" folder in the project tree.
2. Select the scope of the compilation:
– Select the "Compile > Software (rebuild all blocks)" command in the shortcut menu,
if no CFCs have been compiled before.
– If you want to compile only the changes since the last compilation, select the
"Compile > Software" command in the shortcut menu.
The compilation process starts, and the current status is displayed.

Result
The user program for the target system is created from the CFCs.
The project can be downloaded to the device.
The messages regarding the compilation process are displayed in the Inspector window
under "Info > Compile".

See also
Downloading all CFC charts (Page 259)
Downloading modified CFC charts (Page 261)
Downloading CFC charts to a test CPU (Page 263)

Configuring CFC charts


258 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7.10.3 Downloading all CFC charts


You will have to download all CFCs if there have never been any CFCs downloaded to the
device.

WARNING
Execution during plant runtime
Performing the described actions during plant runtime may cause serious injury or material
damage in the event of malfunctions or program errors.
Make sure that no dangerous situations can arise before you start the actions.

Requirement
• The CFCs of the device have been compiled.

Procedure
1. Select the folder of the device or the "Charts" folder in the project tree.
2. In the "Online" menu, select the "Download to device" command.
You can also select the "Software (all blocks)" command in the "Download to device" menu
in the shortcut menu of the "Charts" folder.
– If you have not already established an online connection, the "Extended download
to device" dialog opens.
– If you have already specified an online connection, the "Load preview" dialog opens.
Continue then with step 6.
3. Select the type of interface for your programming device/PC from the "PG/PC interface type"
drop-down list in the "Extended download to device" dialog.
4. Select the interface of your programming device/PC from the "PG/PC interface"
drop-down list.
– If available, select a subnet from the "Connection to subnet" drop-down list that you
can use to link the devices to the PG/PC interface.
If the devices are connected directly to the PG/PC interface, select the "Local" setting.
– If the required devices are accessible via a gateway, select the gateway that connects
the two subnets involved in the "1st gateway" drop-down list.
5. Select your device in the "Accessible devices in target subnet" table and confirm your
selection with "Load".
If necessary, the project data is compiled.
The "Load preview" dialog opens. This dialog displays messages and recommends actions
necessary for loading.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 259
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

6. Check the messages in the "Load preview" dialog, and select the actions in the "Action"
column, if necessary.
As soon as downloading becomes possible, the "Load" button is enabled.

WARNING
Execution during plant runtime
Performing the described actions during plant runtime may cause serious injury or
material damage in the event of malfunctions or program errors.
Make sure that no dangerous situations can arise before you start the actions.

7. Click on "Load".
The blocks are downloaded and the "Load results" dialog opens.
This dialog shows you the status and the actions after downloading.
8. If you want to start the modules again directly after downloading, select the "Start all"
check box.
9. To close the "Load results" dialog box, click "Finish".

Result
The compiled CFCs have been loaded to the device.
The result of the process is displayed in the Inspector window under "Info > General".
• If the changes affect additional blocks in the user program, these blocks are compiled and
also loaded to the device.
• Blocks that only exist in the device online are deleted.
Inconsistencies between the blocks in the user program are avoided by downloading all
blocks affected and deleting the unnecessary blocks in the device.

See also
Compiling CFC charts (Page 258)
Downloading modified CFC charts (Page 261)
Downloading CFC charts to a test CPU (Page 263)

Configuring CFC charts


260 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7.10.4 Downloading modified CFC charts


If you have modified and compiled individual CFC charts after the last download, you will
have to download them to the device.

WARNING
Execution during plant runtime
Performing the described actions during plant runtime may cause serious injury or
material damage in the event of malfunctions or program errors.
Make sure that no dangerous situations can arise before you start the actions.

Requirement
• The modified CFC charts have been compiled.
• All CFC charts of this device have been compiled and downloaded before.

Procedure
1. Select the "Charts" folder in the project tree.
2. Select the "Download to device > Software (changes only)" command from the shortcut
menu.
– If you have not already established an online connection, the "Extended download to
device" dialog opens.
– If you have already specified an online connection, the "Download preview" dialog
opens.
Continue then with step 6.
You can also open the "Extended download to device" dialog via the "Online" menu.
3. Select the type of interface for your programming device/PC from the "PG/PC interface type"
drop-down list in the "Extended download to device" dialog.
4. Select the interface of your programming device/PC from the "PG/PC interface" drop-down
list.
– If available, select a subnet from the "Connection to subnet" drop-down list that you
can use to link the devices to the PG/PC interface.
If the devices are connected directly to the PG/PC interface, select the "Local" setting.
– If the required devices are accessible via a gateway, select the gateway that connects
the two subnets involved in the "1st gateway" drop-down list.
5. Select your device in the "Accessible devices in target subnet" table and confirm your
selection with "Load".
If necessary, the project data is compiled.
The "Load preview" dialog opens. This dialog displays messages and recommends actions
necessary for loading.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 261
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

6. Check the messages and, where necessary, enable the actions in the "Action" column.
As soon as downloading becomes possible, the "Load" button is enabled.

WARNING
Execution during plant runtime
Performing the described actions during plant runtime may cause serious injury or
material damage in the event of malfunctions or program errors.
Make sure that no dangerous situations can arise before you start the actions.

7. Click on "Load".
The blocks are downloaded and the "Load results" dialog opens.
This dialog shows you the status and the actions after downloading.
8. You may have to restart the modules after loading.
To do this, select the "Start all" check box.
9. To close the "Load results" dialog box, click "Finish".

Result
The modified and compiled CFC charts have been downloaded to the device.
The result of the process is displayed in the Inspector window under "Info > General".
• If the changes affect additional blocks in the user program, these blocks are compiled and
also loaded to the device.
• Blocks that only exist in the device online are deleted.
Inconsistencies between the blocks in the user program are avoided by downloading all
blocks affected and deleting the unnecessary blocks in the device.

See also
Compiling CFC charts (Page 258)
Downloading all CFC charts (Page 259)
Downloading CFC charts to a test CPU (Page 263)

Configuring CFC charts


262 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7.10.5 Downloading CFC charts to a test CPU

Overview
If the CFC charts need to be tested but this is not permitted on a real system device for safety
reasons, you can download the data to a so-called test CPU.
This test CPU may be a different device of the real system, or the "S7-PLCSIM Advanced"
simulation software.
Once you performed the test with the "Download to test CPU" function, you only need to
compile and download the delta data to update the program in the device of the real system
because no loadable states are changed during testing on the test CPU.

Note
Adapting the interface after the test
Running this function using the "Download to test CPU" menu command reliably prevents
unintentional download of the software to the device in the real system.
You need to restore the interface to this device in the "Extended download to device" dialog
on completion of the test to enable a reload of the data to the device.

Procedure
1. Select the device folder in the project tree.
2. Select the "Download to device > Download to test CPU (HW + SW)" command from the
shortcut menu.
The "Extended download to device" dialog opens.
3. Select the type of interface for your programming device/PC from the "PG/PC interface type"
drop-down list in the "Extended download to device" dialog.
4. Select the interface of your programming device/PC from the "PG/PC interface" drop-down
list.
Select "PLCSIM Vx.x", for example, if you want to use "S7-PLCSIM" to simulate the test CPU.
– If available, select a subnet from the "Connection to subnet" drop-down list that you
can use to link the devices to the PG/PC interface.
If the devices are connected directly to the PG/PC interface, select the "Local" setting.
– If the required devices are accessible via a gateway, select the gateway that connects
the two subnets involved in the "1st gateway" drop-down list.
5. Select your test device from the "Accessible devices in target subnet" table.
6. Click the "Load" button.
If necessary, the project data is compiled.
The "Load preview" dialog opens.
This dialog displays messages and recommends actions necessary for loading.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 263
Working with CFC charts for S7
7.10 Compiling CFC charts and downloading them for the S7 target system

7. Click the "Load" button.


The complete software and hardware configuration are downloaded and the
"Load results" dialog opens.
This dialog shows you the status and the actions after downloading.
8. If you want to start the modules again directly after downloading, select the "Start all"
check box.
9. To close the "Load results" dialog box, click "Finish".

Result
The CFC charts, the complete software, and the hardware configuration have been
downloaded to the test CPU.
You need to restore the interface to this device in the "Extended download to device" dialog
on completion of the test to enable a reload of the data to the device.

See also
Compiling CFC charts (Page 258)
Downloading all CFC charts (Page 259)
Downloading modified CFC charts (Page 261)

Configuring CFC charts


264 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.11 Testing CFC charts in the S7 system

7.11 Testing CFC charts in the S7 system


After configuration of the instructions and blocks in the CFCs, you can test the function
of the CFCs.
Values from the device are displayed at the input and output parameters for this.
The following section explains the test procedure with an S7 system.

Basic procedure
You always need to perform the following steps to test CFCs:
1. Start by selecting the input and output parameters for the test.
2. Then you start the actual test in which values from the device are displayed at the input and
output parameters.

Note
Conditions
The following conditions apply to the test:
• The input and output parameters only receive the latest values for testing at the
following conditions:
– The parameters have been selected for the test.
– The parameters are available in the visible part of the CFC within the work area.
• Input parameters of instructions and, for example, of "FC" functions in S7 can only display
values from the device if they are interconnected.
Although they can be selected in the table of parameters for testing, no values are
displayed for existing online connections.
This does not apply to output parameters, function block parameters, and other blocks
created by users.
STRUCT data type
If you select a parameter of the STRUCT data type for testing, the value of the first structure
element of the configured structure is displayed.

"Testing" task card


In the "Testing" task card, you configure the test settings.
For the S7 target system, you can register/deregister individual input and output parameters
for testing and edit the update times, among other things, in the task card.
The current operating state of the CPU is displayed and can also be controlled in the "CPU
operator panel" tab.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 265
Working with CFC charts for S7
7.11 Testing CFC charts in the S7 system

Requirement
• The online connection to the device has been established once before.
• Rules for the device containing the CFCs to be tested:
– The corresponding software must be compiled and loaded.
– The CPU of this device must be in "RUN" operating mode.
• The required CFC is configured and open.
• "Data flow" is shown in the work area.

Procedure
1. Click in the CFC, or select an instruction, or a block.
2. Click "Go online" in the toolbar.
Once you are online, all input and output parameters selected for testing are provided
with the current values from the device and are highlighted in color.
3. Check the CPU operating mode if no online values are displayed.
To do this, switch to the "Testing" task card, "CPU operator panel".
The "RUN" state should be active. If not, change the operating mode to "RUN".
4. If necessary, you can register or deregister a selected input or output parameter in the
"Testing" task card for testing.
You do not have to open the Inspector window for this purpose.
You can also select additional parameters for testing at "Parameters" in the Inspector
window, or remove parameters already tested from the test.
Additional information: "Configuring and adapting CFCs > Test CFC > Selecting parameters
for testing (Page 176)"
5. If necessary, adapt the settings of the update times in the "Testing" task card:
– For updating the visible area of the CFC in which the values are updated.
– For the selected parameters or the interconnection
– For the dynamic display with the mouse pointer
See additional information below.

Configuring CFC charts


266 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.11 Testing CFC charts in the S7 system

Alternative procedure
You can also use the following options in the "Data flow" online mode to show values from
the device:
• Value as tooltip:
If you point to the input or output parameter with the mouse pointer, then the latest
value from the device is shown as tooltip.
Use the shortcut menu command "For test" to display the value.
• Value with data type STRUCT:
The structure with all structure elements appears as a tooltip when you move the mouse
pointer over a parameter of STRUCT data type.
• Display value permanently:
If you have not selected the input or output parameter for testing, then you can keep the
<Ctrl> key pressed and click on an input or output parameter or an interconnection with
the mouse pointer.
The parameter is permanently selected for the test and the latest value from the device is
displayed.
Repeat this step to revert this function and no longer display the value.

Result
All input and output parameters in the visible work area that have been selected for testing
are supplied with the latest values from the device.
This enables you to test the function of the instructions and blocks.

See also
Downloading CFC charts to a test CPU (Page 263)
Testing a CFC chart (Page 178)
Testing with the "Forcing" function (Page 183)
Overview: Compiling and downloading CFC charts (Page 256)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 267
Working with CFC charts for S7
7.12 Reading back parameter changes in CFC

7.12 Reading back parameter changes in CFC


During commissioning or when testing a CFC, you can make and test different parameter
changes on the device in online mode.
Once you have successfully tested these changes, you can read back the changed parameters
to the offline program.

Reading back conditions


Reading back is only possible if the offline configuration of the program corresponds to the
status of the online program in the device.
When you change a block type, for example, reading back is no longer possible.
Reading back of parameters is possible to the following extent:

Parameter Reading back


Input parameter ("Input", "InOut") Yes
Output parameter ("Output") No
Parameter with the attribute No
"Configurable = FALSE" The parameter must have the BOOL value "TRUE".
Parameters of basic instructions No
Parameters of "FC" blocks No
Chart I/Os No

Supported data types


The following data types can be read back:

Binary numbers BOOL, BYTE, WORD, DWORD, LWORD


Integers SINT, INT, DINT, LINT, USINT, UDINT, ULINT
Floating-point numbers REAL, LREAL
Times TIME, LTIME, S5TIME
Date and time DATE, TOD, LTOD, DT, LDT, DTL
Strings CHAR, WCHAR, STRING
Parameter types TIMER, COUNTER
Data structures STRUCT

Configuring CFC charts


268 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.12 Reading back parameter changes in CFC

Control reading back using attributes


Reading back is controlled using attributes at the block type and at the block instance.

Object Properties: Meaning


"General" tab
Block type Block "Attributes > User-defined attributes": Enabled:
header 1)
• "Enable tag readback" • Reading back is enabled when an instance is
inserted.
Disabled:
• Reading back is disabled when an instance is
inserted.
Parameter "Attributes > User-defined attributes": BOOL parameter = "TRUE":
"Input" /
"InOut" 2) • "CFC_EnableTagReadback" • The input parameter can be read back.

The runtime behavior depends on the setting in the


block header of the instance.
BOOL parameter = "FALSE"
• Parameter cannot be read back.
Block Block "S7 specific > Block": The block type setting is applied when an instance is
instance 3) header inserted.
• "Enable tag readback"
However, you can change the setting for specific
instances.
Enabled:
• Reading back is possible.

The runtime behavior depends on the


"CFC_EnableTagReadback" attribute at the block
type parameter.
Disabled:
• Parameter cannot be read back.
When you enable the "All parameters" option in the
"Readback" dialog, however, this setting is ignored.
Parameter "S7 specific": Indicates whether the parameter can be read back.
• "Enable tag readback" To read back a parameter during runtime, the following
settings must be made:
• Block type > Parameter:

Attribute "CFC_EnableTagReadback" = "TRUE"


• Block instance > Block header:

"Enable tag readback" = enabled

You can also enable the "All parameters" option


during readback.
1) To edit the type of a block header, select the "Properties" entry in the shortcut menu of the block in the navigation area.
2) To edit a parameter of a type, open the block and click on the respective parameter. The properties are displayed in the
Inspector window.
3) To edit the block instance, click on the block header or the input parameter in the CFC. The properties are displayed in
the Inspector window.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 269
Working with CFC charts for S7
7.12 Reading back parameter changes in CFC

Requirement
• Parameters were changed during runtime.
• Readback is enabled:
– Block type: at the parameter
– Block instance: at the block header

Procedure
1. Select the "Charts" folder in the project tree.
2. Select the "Readback" command from the shortcut menu.
The "Readback" dialog opens.
3. Select an option for reading back:
– "All parameters"
The "Enable tag readback" attribute at the block instance is ignored.
All changed parameters with the attribute "CFC_EnableTagReadback" = "TRUE" are read
back.
– "Only designated param./blocks"
The parameter is read back when reading back is enabled at the block header of the
instance and at the parameter.
4. Click "OK".
Readback starts.
5. The readback process is logged in the Inspector window in the "Info > General" tab.
All values changed in the offline program during the readback are logged.

Result
Changes to CPU parameters are read back into the offline program.

"No changes" message


During runtime, changes at the block input in CFC are written directly to the controller.
Readback is not necessary for these changes.
You will receive the message "No changes" in this case.

See also
Overview: Compiling and downloading CFC charts (Page 256)

Configuring CFC charts


270 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.13 Inter-project engineering in CFC

7.13 Inter-project engineering in CFC

Overview
The functionality of Inter Project Engineering also referred to as "IPE", is used to exchange the
controller data in a source project between different projects.
You can then transfer this data to other projects and use it there for further configuration.
Use the "Device Proxy Data" object to exchange controller data.
Additional information in the information system of the TIA Portal:
• "Using Team Engineering > Exchanging data with Inter Project Engineering (IPE)"

Cross-project data exchange


The following options are available for cross-project data exchange with Inter Project
Engineering:
• IPE file:
The controller data of the controller from the source project is exported to an IPE file.
The IPE file is imported into the target project.
• Project file:
The controller data from the source project is transferred to the controller in the target
project via a project file.

Basic procedure
An IPE file is used in this process.
Information on the exchange via a project file can be found in the information system of the
TIA Portal.
1. Compile the project to ensure consistency.
2. Open a "Device Proxy Data" object in the "Device Proxy Data" folder in the navigation area of
the controller.
3. Navigate to the following folder in the "Definition of the content" area:
– "Program blocks > CFC blocks"
4. Select the CFC blocks you want to exchange.
5. Click "Export Device Proxy Data".
Select the name and the storage path of the IPE file.

Result
The selected controller data has been exported as an IPE file.
To use the data in a different project, import the file into the target project.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 271
Working with CFC charts for S7
7.13 Inter-project engineering in CFC

See also
Multiuser Engineering in CFC (Page 273)

Configuring CFC charts


272 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.14 Multiuser Engineering in CFC

7.14 Multiuser Engineering in CFC

Multiuser Engineering
With Multiuser Engineering you edit server projects together and at the same time in multiple
local sessions.
You edit your projects offline and initially download them to the TIA project server.
The project server supports the convenient synchronization of projects and allows you to
conduct tests locally.
Use Multiuser Commissioning in synchronous mode when working with CFCs. The respective
Team Engineering functionalities support you when downloading the project versions to the
CPU.

More information
Information system of the TIA Portal:
• "Using Team Engineering > Using Multiuser Engineering":
– "Introduction to Multiuser Engineering"
– "Requirements for working with Multiuser Engineering"
– "Operator controls in Multiuser Engineering"
• "Using Team Engineering":
– "Using Multiuser Commissioning"

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 273
Working with CFC charts for S7
7.14 Multiuser Engineering in CFC

Basic procedure
1. Create the controller in the server project.
2. Update the local session.
3. Create and edit the CFCs in the local session.
4. Check whether objects that you are referencing in your local session were changed in the
server project.
Objects that do not match the latest version of the server project are labeled as outdated.
If necessary, update the local session, for example, to apply changed block types or tags.
5. Check and mark the changed objects in the local session.

Note
Unmarked objects: Changes are lost
Only the changes of marked objects are checked in.
When objects are not marked or when the marking was removed, the corresponding
changes are not applied during check-in.

6. Check in the marked objects on the project server.


To compile the changes during check-in, enable the "Compile" option in the "Check-in"
dialog.
7. Select synchronous commissioning as commissioning mode:
– Download the data to the controller in the server project.
The local session is automatically updated after the download.

Note
Avoid loss of delta download capability
To ensure online delta download capability, save the server project to the controller after
each download.
If an error occurs in Multiuser Commissioning or when you are working without Multiuser
Commissioning, the server project is not saved automatically.
When changes in the server project are not saved, the online delta download of the
project may no longer be possible.

Configuring CFC charts


274 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.14 Multiuser Engineering in CFC

CFCs in Multiuser Engineering


When using Multiuser Engineering, multiple editors are configuring CFCs in local sessions.
The configuration data of the local session is synchronized with the server project on the
project server.
Changed objects are marked with a color flag in the first column in the project tree.
During check-in, the changed data from the local session are transferred to the server project.

Refresh local session


You apply the changes from other editors to your local session during the refresh.
Make sure that you are always using the current block types in the local session.
CFCs are only checked in when the blocks in the local session match the blocks in the server
project.

Multiuser Commissioning
In Multiuser Commissioning the project is synchronized via the server project. The online
project in the CPU and the offline project in the project server are kept consistent.
A download to the controller is not possible in a local multiuser session. You always compile
and download the CFCs in the server project.
You define the settings in the administration tool.
Disable the following option:
• "Check for different data before download (recommended)"

Editing in online mode


Before you edit CFCs in online mode, the local session must match the version downloaded to
the PLC.
Parameter changes are written directly to the PLC in online mode.
To apply the changed values to the server project, check in the data of the local session
afterward.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 275
Working with CFC charts for S7
7.14 Multiuser Engineering in CFC

Supported objects for Multiuser Engineering


The following actions are possible for the supported objects:
• Supplement objects
• Edit properties of objects and interconnections
• Delete objects

Note
Editing unsupported objects in the local session
Objects that are not supported can be edited in a local session but cannot be marked.
Changes to unsupported objects are not applied to the server project during check-in.
Changes to such objects are lost after check-in and after an update in the local session,
because these objects are once again overwritten with the contents of the server project.
You can, however, edit such objects that are not supported in the usual way in the server
project view.

Supported objects

Object Check-in into the server project


CFCs and interconnections CFCs are checked in with the block instances and interconnections.
An error message is output in case of naming conflicts.
Hierarchical CFCs Hierarchical CFCs are treated as a single object.
The basic chart and all subcharts are always checked in together.
Interconnections across Interconnections between CFCs are always checked in with the target
charts chart.
If you only check in the CFC chart at which the output is
interconnected, the interconnection is ignored.
When you check in an interconnection without a source, the
interconnection in the server project is removed.
Run sequence CFCs in the server project are placed at the end of the run sequence in
the following cases:
• A new CFC chart is checked in but not the changed run sequence.
• CFCs that are available in the server project are missing in the
checked-in run sequence.
If the run sequence contains CFCs that are not available in the server
project, these items are deleted in the run sequence.
Trend displays and value If a referenced tag in the server project is not available, the associated
displays items are deleted in the displays during check-in.
If an attribute of a trend or value display is changed that is part of a
referenced tag, the higher-level CFC chart is marked as changed.

Configuring CFC charts


276 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.14 Multiuser Engineering in CFC

Object Check-in into the server project


Instructions and blocks Proceed as described below to avoid conflicts:
1. Check in edited block types.
2. Open the server project.
3. Update the block types in the server project.
4. Update the local session.
5. Use the block types in the CFCs.
You cannot update blocks in CFCs in the local session.
Block instances Check whether all block instances in the server project were updated
before you start working with a CFC chart.
Troubleshooting
When a block type was only changed in the server project, you cannot
check in a CFC chart with the associated block instances.
The corresponding block instances are listed in the Inspector window.
To check in a CFC chart despite block type conflicts, delete the listed
block instances. Correct the checked-in CFC chart in the server project
and update the local session.

See also
Inter-project engineering in CFC (Page 271)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 277
Working with CFC charts for S7
7.15 Connection to an HMI system

7.15 Connection to an HMI system

7.15.1 Connection of CFC charts to an HMI system


You can visualize alarms and values of CFC block instances in SIMATIC WinCC.
You can display and use the parameters from the CFC interfaces for operator control and
monitoring in an HMI system.

Requirement for the HMI connection


• The block type is configured for HMI access.

Default setting
When you create a block, the attributes for HMI access are already enabled:
• Accessible from HMI/OPC UA/Web API
• Writable from HMI/OPC UA/Web API
• Visible in HMI engineering

Basic procedure
1. Add a function block that is configured for HMI access in the CFC chart.
2. Configure the interconnections of the block instance.
3. If required, configure the alarms at the block instance.
4. Download the compiled CFC chart to the CPU.
The alarms of the block instance are included in the download.
You can also process alarms from multiuser projects.
5. In WinCC, you have access to the tags and alarms of the CFC instances.

Additional information
• "Tag connection in CFC (Page 279)"
• "Configuring alarms in CFC (Page 281)"

Configuring CFC charts


278 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.15 Connection to an HMI system

7.15.2 Tag connection in CFC


To visualize values of CFC block instances in SIMATIC WinCC link the block parameters to the
HMI tags.
The HMI connection must be configured for this.
Additional information: "Connection of CFC charts to an HMI system (Page 278)"

Tag connection
You have the following options to link an HMI tag with a block parameter:
• Dynamize an object in the process picture with a block parameter.
The associated HMI tag is created automatically.
• Create a tag under "HMI tags" and select a block parameter in the "PLC tag" field.

Tag selection
The CFC blocks are located in the navigation area of the tag selection at the following path:
• "Program blocks > CFC blocks"
In the data area, select the block parameter under the block instance.
The block parameter is created as an HMI tag.

Tag names
The tag names are formed from the following elements:
• CFC
• Block instance
• Parameters

Editor / Component Display format Example


Tag selection <Chart name>/<Block instance name> Navigation area / data area:
• CFC_2/MyFB_1
Parameters in the data area:
• InByte3
Process tag / HMI <Chart name>/<Block instance name>_<Parameter> CFC_2/MyFB_1_InByte3
tag *)
PLC tag "<Chart name>/<Block instance name>".Parameter "CFC_2/MyFB_1".InByte3

*) When you create an HMI tag while configuring a dynamization, this name structure is applied. However, you can also
assign a different name to an HMI tag.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 279
Working with CFC charts for S7
7.15 Connection to an HMI system

Changing the name


When you change parts of a name, the name of the PLC tag is changed as well.
The HMI tag retains the original name.
• Name change of the block instance or CFC:
The link of the HMI tag to the PLC tag is updated automatically.
• Name change of the parameter:
You must adapt the link of the HMI tag to the PLC tag in the "HMI tags" table.

Note
Adapting the configuration
Name changes can affect the tag connections.
If necessary, update the tag names in the configuration, for example, during addressing in
scripts.

Example

Block instance PLC tag HMI tag


Chart name: "CFC_2/MyFB_1".InByte3 CFC_2/MyFB_1_InByte3
• CFC_2
Instance name:
• MyFB_1
Parameter name
• InByte3
Changed chart name: "CFCNew/MyFB_1".InByte3 CFC_2/MyFB_1_InByte3
• CFCNew The change is applied to the "HMI tags" table.

Changed instance name: "CFCNew/New_FB".InByte3 CFC_2/MyFB_1_InByte3


• New_FB The change is applied to the "HMI tags" table.

Changed parameter name: "CFCNew/New_FB".InByteNew CFC_2/MyFB_1_InByte3


• InByteNew The PLC tag in the "HMI tags" table retains the original Update the connected PLC tag in
parameter name. the tag management.
The "PLC tag" field is highlighted in red.

See also
Configuring alarms in CFC (Page 281)

Configuring CFC charts


280 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.15 Connection to an HMI system

7.15.3 Configuring alarms in CFC

Alarm blocks in CFCs


You can configure the S7 message block "Program_Alarm" in an S7 block.
When you use a block with the lower-level alarm block in the CFC, you can edit the alarm
texts directly at the block instance.

Additional information
Information system of the TIA Portal:
• "Program PLC > Configuring alarms"

Display in the alarm system


The alarms of the blocks are integrated into the program alarms in the "PLC supervisions &
alarms" editor:
• Alarm types: Alarms of the block type
• Alarm instances: Alarms of the block instances
Whenever you copy a block instance in CFC, copies of the instance alarms are generated
as well.

Display alarms in runtime


To display the alarms, download the modified charts and create an online connection.
In the navigation window, select the menu command "Receive alarms" from the shortcut
menu of the device.
The alarms are displayed in the Inspector window, "Diagnostics" tab, "Alarm display" area.
Select the corresponding target system from the drop-down list.

Requirement
Check the settings of the PLC alarms using the menu command "Options > Settings":

Setting Status
Show lock icons Enabled
Set locks on creation of a new program alarm Disabled

You enable or disable the interlock of individual alarm texts and infotexts in the "PLC
supervisions & alarms" editor in the "Alarms > Program alarms" tab.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 281
Working with CFC charts for S7
7.15 Connection to an HMI system

Procedure
1. In the CFC, select the block at which you want to configure the alarms.
2. To display the properties of the alarms, click on the block header of the instance.
The "Alarms" tab is displayed with a list of the alarm instances in the Inspector window
under "Properties".
3. In the list, click the instance alarm that you want to configure.
4. You change the texts in the current configuration language in the "Alarm text" and "Infotext"
columns.
The alarm texts and infotexts can only be edited when they are not locked.

Result
The alarms are configured and can be displayed in runtime.

See also
Connection of CFC charts to an HMI system (Page 278)
Tag connection in CFC (Page 279)

Configuring CFC charts


282 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.16 OPC UA communication in CFC

7.16 OPC UA communication in CFC


You can also access the instances of blocks and instructions in CFC charts via OPC UA.

Additional information
Information system of the TIA Portal:
• "Editing devices and networks > Configuring devices and networks > Creating
configurations > Configuring automation systems > Using OPC UA communication"

Settings for OPC UA access


On compilation of a block instance a corresponding programming object is created.
These options are activated as the default setting:
• "Data block accessible via OPC UA"
• "Data block accessible via web server"

Note
Do not change options
On every full download of the block instances the default setting is restored again and
changes are overwritten.

See also
Tag connection in CFC (Page 279)
Connection of CFC charts to an HMI system (Page 278)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 283
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17 CFC charts: Reference

7.17.1 CFC tasks for S7

Overview
Instructions and blocks are always assigned to one or more tasks of the target system.
The tasks are also referred to as "OB types".
Additional information:
• "Runtime model (Page 166)"
• Information system of the TIA Portal:
"Editing devices and networks > Configuring devices and networks >
Creating configurations > Configuring automation systems >
Principle of operation of S7-1500 CPUs > Basics on program execution"

Configuring CFC charts


284 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Supported tasks
When you create tasks, they are only be displayed in English for technical reasons –
irrespective of the set user interface language.
CFC supports the following tasks:

Task Meaning
Program cycle Cycle, task for cyclic program execution
Cyclic interrupt_0 Cyclic interrupt, cycle time: 5000 ms *
Cyclic interrupt_1 Cyclic interrupt, cycle time: 2000 ms *
Cyclic interrupt_2 Cyclic interrupt, cycle time: 1000 ms *
Cyclic interrupt_3 Cyclic interrupt, cycle time: 500 ms *
Cyclic interrupt_4 Cyclic interrupt, cycle time: 200 ms *
Cyclic interrupt_5 Cyclic interrupt, cycle time: 100 ms *
Cyclic interrupt_6 Cyclic interrupt, cycle time: 50 ms *
Cyclic interrupt_7 Cyclic interrupt, cycle time: 20 ms *
Cyclic interrupt_8 Cyclic interrupt, cycle time: 10 ms *
Synchronous cycle Isochronous mode interrupt
Time error interrupt Time error
Diagnostic error interrupt Diagnostics interrupt
Pull or plug of modules Pull/plug
Rack or station failure Rack failure
Startup Startup
Programming error Programming error
IO access error I/O access error

*) Cyclic time:
To change the cyclic time, select the OB in the project tree under "Program blocks".
Open the block properties via the shortcut menu. You can change the cyclic time and the phase offset
in the "Cyclic interrupt" area

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 285
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17.2 CFC Instructions for S7

7.17.2.1 Overview of CFC instructions

Families of CFC instructions


The CFC instructions can be found in the "Instructions" task card in the following panes:

Basic instructions

Family Folder Function


TERMINAL General TERMINAL instruction for compilation of
(Page 289) interconnections
BIT_LGC Bit logic operations Logic instructions of the data type BOOL
(Page 291)
FLIPFLOP Bit logic operations Flipflop instructions
(Page 291)
COMPARE Comparator operations Instructions for comparing two input values of the
(Page 303) same type
MATH_FP Math functions Arithmetic instructions of the data type REAL
(Page 307)
MATH_INT Math functions Arithmetic instructions of the data type INT and DINT
(Page 307)
CONVERT Conversion operations Instructions for converting data types
(Page 324)
WRD_LGC Word logic operations Logic instructions of the data type WORD and DWORD
(Page 338)
MULTIPLX Word logic operations Multiplex instructions
(Page 338)
SHIFT (Page 356) Shift and rotate Shift instructions

Configuring CFC charts


286 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Extended instructions

Instruction group Folder Function


Date and time-of- Date and time-of-day Calculations with time formats
day (Page 365) Clock functions Read/change times and time zones
Synchronize slave clocks
Runtime meters
String + Char String + Char Processing character strings
(Page 366)
Process image Process image Update/synchronize process images
(Page 367)
Distributed I/O DP & PROFINET Read / write data records
(Page 368) Read/transfer process images
Receive interrupts
Enable/disable DP slaves
Configure IO system
Others Write data record
Others: iDevice / iSlave Receive/provide data record
Others: PROFIBUS Synchronize DP slaves
Diagnostics Diagnostics Reading out information about the system
(Page 369)

Communication

Instruction group Folder Function


S7 communication Others Send/receive data
(Page 370)
Open user Open user communication Establish connection
communication Send/receive data
(Page 371)
Read/change communication parameters
Others Establish/terminate communication connection
Send/receive data
Configure interface

See also
"CFC" Editor (Page 45)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 287
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17.2.2 EN and ENO parameters

Introduction
Since the function of the following parameters is always the same, this description applies to
all instructions that use these parameters.

EN
EN (enable): Enable input parameter

Note
The input parameter exists only in the graphical interface of CFC, however it is switched to
hidden.

The EN parameter can be used to switch the instruction on or off. It ensures that the
instruction is only called in the task code at PLC level if it has been enabled via EN = 1.

ENO
ENO (enable out): Enable output parameter

Note
The output parameter exists only in the graphical interface of CFC, however it is switched to
hidden.

ENO = 1 shows a valid result as appropriate to the function. When the operating system
and/or the troubleshooting routine detects an error in the instruction, ENO will be set to 0 to
indicate an invalid result. You can use this information in order to switch to other values
(e.g., safety values) and to output messages to the OS as required.
If EN = FALSE, then ENO = FALSE.

Configuring CFC charts


288 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17.2.3 CFC instructions: Basic instructions

General

TERMINAL: Summary of interconnections

Description
The "TERMINAL" instruction supports you in organizing interconnections in the CFC view.
The "TERMINAL" element does not process values and only summarizes the interconnections
of a chart.

Principle
TERMINAL is a passive structuring element without access to CPU resources or its own code.
Each input parameter IN corresponds to exactly one output parameter OUT.
These parameters are connected internally with the "TERMINAL" element. The behavior
corresponds to that of a terminal strip that connects through electrical interconnections.
Because TERMINAL does not process any values, it also does not affect system performance.

Interconnections
You can change the number of input parameters or output parameters.
Corresponding input and output parameters are collectively called "Signal". You change this
name in the properties of the block instance in the "Comment" column of the "Interfaces"
table.
When you create an interconnection, the input parameter and the associated output
parameter take on the data type of the interconnected parameter. When you change the
interconnection, the data type of the new interconnection is applied automatically.
Possible interconnections are, for example:
• Block parameters
• Parameters of chart interfaces
• Other "TERMINAL" elements
• Input parameter: External tag
The TERMINAL parameters cannot be set or read directly.
Interconnected structures cannot be expanded.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 289
Working with CFC charts for S7
7.17 CFC charts: Reference

Parameters

Parameters Declaration Data type Description Default


IN1 Input ANY Input value 1 0
IN... Input ANY Input value... 0
INn Input ANY Input value "n" 0
OUT1 Output ANY Output value 1 0
OUT... Output ANY Output value... 0
OUTn Output ANY Output value "n" 0

Application example
You interconnect several blocks of the chart "CFC_1" to blocks of a different CFC, e.g. "CFC_2".
The interconnected blocks are distributed widely in the chart "CFC_1". The interconnections
across charts in the sheet bar are not displayed together on one monitor.
You want to display the interconnections of the blocks "bl1" and "bl2" to the blocks of the
chart "CFC_2" bundled in the sheet bar.
To do so, you summarize the interconnections in a "TERMINAL" element:
1. Interconnect the TERMINAL input parameters with the blocks "bl1" and "bl2".
2. You interconnect the corresponding TERMINAL output parameters with the blocks of the
chart "CFC_2".
You can only create interconnections to parameters whose data type corresponds to the
input parameter interconnections that have already been created.

See also
Representation and properties of interconnections (Page 127)
Overview of CFC instructions (Page 286)

Configuring CFC charts


290 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Logic instructions (bit logic)

Overview of the instruction families "BIT_LGC" and "FLIPFLOP"

Overview of the instruction family "BIT_LGC"


In this family, logic instructions are combined with the data type BOOL.
With these instructions you implement logical operations.

AND (Page 293) AND logic operation


F_TRIG (Page 302) Detect negative signal edge
NAND (Page 294) NAND logic operation
NOR (Page 295) NOR logic operation
NOT (Page 296) NOT logic operation
OR (Page 297) OR logic operation
R_TRIG (Page 292) Detect positive signal edge
XOR (Page 298) Bit by bit antivalence logic operation

Overview of "FLIPFLOP" instruction family


This family contains flipflop instructions.

JK_FF (Page 299) JK Flipflop


RS_FF (Page 300) RS Flipflop, reset dominant
SR_FF (Page 301) SR Flipflop, set dominant

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 291
Working with CFC charts for S7
7.17 CFC charts: Reference

R_TRIG: Detect positive signal edge

Function
With the "Detect positive signal edge" instruction, you can detect a state change from "0" to
"1" at the CLK input.
The instruction compares the current value at the CLK input with the state of the previous
query (edge memory bit) that is saved in the specified instance.
If the instruction detects a state change at the CLK input from "0" to "1", a positive signal edge
is generated at the Q output, that is, the output has the value TRUE or "1" for exactly one
cycle.
In all other cases, the signal state at the output of the instruction is "0".

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Bit logic operations >
R_TRIG: Detect positive signal edge"

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


292 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

AND: AND logic operation

Description
This instruction generates logic AND operations at the input values. The output value is 1 if all
input values are 1. Otherwise, the output value is 0.
The number of IN input parameters can be modified.

Truth table (example of n = 2)

IN1 IN2 OUT


0 0 0
0 1 0
1 0 0
1 1 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input BOOL Input value 1 1
INn Input BOOL Input value "n" 1
OUT Output BOOL Output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 293
Working with CFC charts for S7
7.17 CFC charts: Reference

NAND: NAND logic operation

Description
This instruction generates and inverts logic AND operations at the input values. The output
value is 0 only if all input values are 1.
The number of IN input parameters can be modified.

Truth table (example of n = 2)

IN1 IN2 OUT


0 0 1
0 1 1
1 0 1
1 1 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input BOOL Input value 1 1
INn Input BOOL Input value "n" 1
OUT Output BOOL Output value 0

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


294 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

NOR: NOR logic operation

Description
This instruction generates and inverts logic OR operations at the input values. The output
value is 1 only if all input values are 0.
The number of IN input parameters can be modified.

Truth table (example of n = 2)

IN1 IN2 OUT


0 0 1
0 1 0
1 0 0
1 1 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input BOOL Input value 1 0
INn Input BOOL Input value "n" 0
OUT Output BOOL Output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 295
Working with CFC charts for S7
7.17 CFC charts: Reference

NOT: NOT logic operation

Description
This instruction inverts the input value.

Truth table

IN OUT
0 1
1 0

Parameters

Parameters Declaration Data type Description Default


IN Input BOOL Input value 0
OUT Output BOOL Output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


296 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

OR: OR logic operation

Description
This instruction generates logic OR operations at the input values. The output value is 1 if at
least one input value is 1. The output value is 0 if all input values are 0.
The number of IN input parameters can be modified.

Truth table (example of n = 2)

IN1 IN2 OUT


0 0 0
0 1 1
1 0 1
1 1 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input BOOL Input value 1 0
INn Input BOOL Input value "n" 0
OUT Output BOOL Output value 0

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 297
Working with CFC charts for S7
7.17 CFC charts: Reference

XOR: Bit by bit antivalence logic operation

Description
This instruction generates exclusive OR operations at the input values. The output value is 0 if
all input values have the same value. Otherwise, the output value is 1.
The number of IN input parameters can be modified.

Truth table (example of n = 2)

IN1 IN2 OUT


0 0 0
0 1 1
1 0 1
1 1 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input BOOL Input value 1 0
INn Input BOOL Input value "n" 0
OUT Output BOOL Output value 0

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


298 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

JK_FF: JK Flipflop

Description

Input parameters Input parameters Output parameters Output parameters


J K

0 0

0 1 0 1
1 0 1 0
1 1

*1)

*1) The pulse signal of the implemented tasks toggles the output parameters.

Parameters

Parameters Declaration Data type Description Default


J Input BOOL Set 0
K Input BOOL Reset 0
Output BOOL Output value 0

Output BOOL negated output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 299
Working with CFC charts for S7
7.17 CFC charts: Reference

RS_FF: RS Flipflop, reset dominant

Description

Input parameters Input parameters Output parameters Output parameters


R S

0 0

0 1 1 0
1 0 0 1
1 1 0 1

Parameters

Parameters Declaration Data type Description Default


R Input BOOL Reset 0
S Input BOOL Set 0
Output BOOL Output value 0

Output BOOL negated output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


300 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

SR_FF: SR Flipflop, set dominant

Description

Input parameters Input parameters Output parameters Output parameters


R S

0 0

0 1 1 0
1 0 0 1
1 1 1 0

Parameters

Parameters Declaration Data type Description Default


R Input BOOL Reset 0
S Input BOOL Set 0
Output BOOL Output value 0

Output BOOL negated output value 1

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 301
Working with CFC charts for S7
7.17 CFC charts: Reference

F_TRIG: Detect negative signal edge

Function
With the "Detect negative signal edge" instruction, you can detect a state change from "1" to
"0" at the CLK input.
The instruction compares the current value at the CLK input with the state of the previous
query (edge memory bit) that is saved in the specified instance.
If the instruction detects a state change at the CLK input from "1" to "0", a negative signal
edge is generated at the Q output, that is, the output has the value TRUE or "1" for exactly
one cycle.
In all other cases, the signal state at the output of the instruction is "0".

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Bit logic operations >
F_TRIG: Detect negative signal edge"

See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)

Configuring CFC charts


302 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Instructions for comparing two input values (comparator)

Overview of "COMPARE" instruction family

Overview
This family contains instructions for comparing two input variables of the same type:

CMP_DI (Page 305) Comparison of DINT values


CMP_I (Page 304) Comparison of INT values
CMP_T (Page 306) Comparison of TIME values

Comparator in CFC and FBD


• You can use the FBD comparator independent of the data types.
The CFC comparators, however, are data type specific.
• Each of the CFC instructions "CMP_DI", "CMP_I" and "CMP_T" covers the functions of
multiple FBD instructions.
The corresponding comparison values are output via the parameters of the "CMP_..."
instruction.

FBD: Instruction CFC: Parameter


CMP == EQ, value=0
CMP <> EQ, value=1
CMP >= GE
CMP <= LE
CMP > GT
CMP < LT

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 303
Working with CFC charts for S7
7.17 CFC charts: Reference

CMP_I: Comparison of INT values

Description
This instruction compares two input values and sets the output values as follows:
• GT = 1 if IN1 > IN2
• GE = 1 if IN1 ≥ IN2
• EQ = 1 if IN1 = IN2
• LE = 1, if IN1 ≤ IN2
• LT = 1 if IN1 < IN2

Parameters

Parameters Declaration Data type Description Default


IN1 Input INT Input value 1 0
IN2 Input INT Input value 2 0
GT Output BOOL GT = 1: IN1 > IN2 0
GE Output BOOL GE = 1: IN1 ≥ IN2 0
EQ Output BOOL EQ = 1: IN1 = IN2 0
LE Output BOOL LE = 1: IN1 ≤ IN2 0
LT Output BOOL LT = 1: IN1 < IN2 0

See also
Overview of "COMPARE" instruction family (Page 303)

Configuring CFC charts


304 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

CMP_DI: Comparison of DINT values

Description
This instruction compares two input values and sets the output values as follows:
• GT = 1 if IN1 > IN2
• GE = 1 if IN1 ≥ IN2
• EQ = 1 if IN1 = IN2
• LE = 1, if IN1 ≤ IN2
• LT = 1 if IN1 < IN2

Parameters

Parameters Declaration Data type Description Default


IN1 Input DINT Input value 1 0
IN2 Input DINT Input value 2 0
GT Output BOOL GT = 1: IN1 > IN2 0
GE Output BOOL GE = 1: IN1 ≥ IN2 0
EQ Output BOOL EQ = 1: IN1 = IN2 0
LE Output BOOL LE = 1: IN1 ≤ IN2 0
LT Output BOOL LT = 1: IN1 < IN2 0

See also
Overview of "COMPARE" instruction family (Page 303)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 305
Working with CFC charts for S7
7.17 CFC charts: Reference

CMP_T: Comparison of TIME values

Description
This instruction compares two input values and sets the output values as follows:
• GT = 1 if IN1 > IN2
• GE = 1 if IN1 ≥ IN2
• EQ = 1 if IN1 = IN2
• LE = 1, if IN1 ≤ IN2
• LT = 1 if IN1 < IN2

Parameters

Parameters Declaration Data type Description Default


IN1 Input TIME Input value 1 0
IN2 Input TIME Input value 2 0
GT Output BOOL GT = 1: IN1 > IN2 0
GE Output BOOL GE = 1: IN1 ≥ IN2 0
EQ Output BOOL EQ = 1: IN1 = IN2 0
LE Output BOOL LE = 1: IN1 ≤ IN2 0
LT Output BOOL LT = 1: IN1 < IN2 0

See also
Overview of "COMPARE" instruction family (Page 303)

Configuring CFC charts


306 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Arithmetic instructions (Math functions)

Overview of the instruction families "MATH_FP" and "MATH_INT"

Overview of "MATH_FP" instruction family


This family contains arithmetic instructions for the data type REAL.
With these instructions you implement arithmetic operations with data of the type REAL.

Note
Value range
The value range of real numbers:
• -3,40282e^+38 ... -1,755e^-38 ... 0 ... 1,755e^-38 ... 3,40282e^+38

ABS_R (Page 311) Absolute value of REAL values


NEG_R (Page 311) Inverter for REAL values

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 307
Working with CFC charts for S7
7.17 CFC charts: Reference

Overview of "MATH_INT" instruction family


This family contains arithmetic instructions for the data types INT and DINT.
With these instructions you implement arithmetic operations with data of the type INT and
DINT.

Note
Value range
The value range of data types INT and DINT:
• INT: -32 768 ... 32 767
• DINT: -2 147 483 648 ... 2 147 483 647

ABS_DI (Page 312) Absolute value of DINT values


ABS_I (Page 312) Absolute value of INT values
DIV_DI (Page 313) Division of DINT values
DIV_I (Page 314) Division of INT values
EPS_DI (Page 315) Accuracy approximation of DINT values
EPS_I (Page 316) Accuracy approximation of INT values
LIM_DI (Page 317) Limiter for DINT values
LIM_I (Page 318) Limiter for INT values
LIMIT (Page 310) Set limit value
MAX (Page 309) Get maximum
MAX_DI (Page 319) Maximum of DINT values
MAX_I (Page 319) Maximum of INT values
MIN (Page 309) Get minimum
MIN_DI (Page 320) Minimum of DINT values
MIN_I (Page 320) Minimum of INT values
MOD_DI (Page 321) Modulo function of DINT values
MOD_I (Page 322) Modulo function of INT values
NEG_DI (Page 323) Inverter for DINT values
NEG_I (Page 323) Inverter for INT values

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


308 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

MIN: Get minimum

Description
The "Get minimum" instruction compares the values of the available inputs and writes the
lowest value to the OUT output.
The number of inputs can be expanded at the instruction box by additional inputs. The inputs
are numbered in ascending order in the box.

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Math functions >
MIN: Get minimum"

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

MAX: Get maximum

Description
The "Get maximum" instruction compares the values of the available inputs and writes the
highest value to the OUT output.
The number of inputs can be expanded at the instruction box by additional inputs. The inputs
are numbered in ascending order in the box.

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Math functions >
MAX: Get maximum"

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 309
Working with CFC charts for S7
7.17 CFC charts: Reference

LIMIT: Set limit value

Description
The "Set limit value" instruction limits the value at the IN input to the values at the MN and
MX inputs.
• When the value at input IN satisfies the condition MN <= IN <= MX, it is copied to output
OUT.
• When the condition is not fulfilled and the input value IN is below the low limit MN,
output OUT is set to the value of the input MN.
• When the high limit MX is exceeded, output OUT is set to the value of the MX input.
When the value at the MN input is greater than at the MX input, the result is the value
specified at the IN parameter and the enable output ENO is "0".

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Math functions >
LIMIT: Set limit value"

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


310 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

ABS_R: Absolute value of REAL values

Description
This instruction outputs the absolute value of the input value at the output parameter OUT.
OUT = | IN |

Parameters

Parameters Declaration Data type Description Default


IN Input REAL Input value 0.0
OUT Output REAL Absolute value 0.0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

NEG_R: Inverter for REAL values

Description
This instruction outputs the input value with changed sign at the output parameter OUT.

Parameters

Parameters Declaration Data type Description Default


IN Input REAL Input value 0.0
OUT Output REAL Output value 0.0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 311
Working with CFC charts for S7
7.17 CFC charts: Reference

ABS_DI: Absolute value of DINT values

Description
This instruction outputs the absolute value of the input value at the output parameter OUT.
OUT = | IN |

Error handling
ENO = 0 if IN = -2 147 483 648 (smallest negative number)

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
OUT Output DINT Absolute value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

ABS_I Absolute value of INT values

Description
This instruction outputs the absolute value of the input value at the output parameter OUT.
OUT = | IN |

Troubleshooting
ENO = 0 if IN = -32,768

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
OUT Output INT Absolute value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


312 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

DIV_DI: Division of DINT values

Description
This instruction divides the IN1 input value by the IN2 input value and outputs the quotient at
the output parameter OUT.
OUT = IN1 / IN2

Error handling
ENO = 0 at division by 0 or division of –2147483648 by –1.

Parameters

Parameters Declaration Data type Description Default


IN1 Input DINT Dividend 0
IN2 Input DINT Divisor 1
OUT Output DINT Quotient 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 313
Working with CFC charts for S7
7.17 CFC charts: Reference

DIV_I: Division of INT values

Description
This instruction divides the IN1 input value by the IN2 input value and outputs the quotient at
the output parameter OUT.
OUT = IN1 / IN2

Error handling
ENO = 0 at division by 0 or division of –32768 by –1.

Parameters

Parameters Declaration Data type Description Default


IN1 Input INT Dividend 0
IN2 Input INT Divisor 1
OUT Output INT Quotient 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


314 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

EPS_DI: Accuracy approximation of DINT values

Description
This instruction compares the absolute value of IN with the input value INTERVAL. If the
absolute value of IN < than the INTERVAL limit, QA output parameter will be set to 1 and QN
to 0. In this case the IN input value is contained in the interval. Otherwise, the QA output
parameter is set to 0 and QN to 1. The IN input value is then outside the interval.
INTERVAL must have a positive value.
If INTERVAL is ≤ 0 , then QA = 0.

Troubleshooting
ENO = 0 if IN = -2,147,483,648

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
INTERVAL Input DINT Interval limit 0
QA Output BOOL Validation bit memory 0
QN Output BOOL Inverted validation bit 0
memory

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 315
Working with CFC charts for S7
7.17 CFC charts: Reference

EPS_I: Accuracy approximation of INT values

Description
This instruction compares the absolute value of IN with the input value INTERVAL.
If the absolute value of IN < than the INTERVAL limit, QA output parameter will be set to 1
and QN to 0. In this case, the IN input value is contained in the interval.
Otherwise, the QA output parameter is set to 0 and QN to 1. The IN input value is then
outside the interval.
INTERVAL must have a positive value.
If INTERVAL ≤ 0, then QA = 0.

Troubleshooting
ENO = 0 if IN = -32,768

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
INTERVAL Input INT Interval limit 0
QA Output BOOL Validation bit memory 0
QN Output BOOL Inverted validation bit 0
memory

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


316 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

LIM_DI: Limiter for DINT values

Description
This instruction compares the input values IN, MAX and MIN. It checks whether IN is within or
outside the interval limited by MIN and MAX.
If the low limit MIN of the interval is greater than the high limit MAX, the output value OUT =
MAX and the output parameters OUTU and OUTL are set to 1.
IN ≥ MAX represents a violation of the high limit, OUT = MAX, OUTU = 1 and OUTL = 0.
IN ≤ MIN represents a violation of the low limit, OUT = MIN, OUTU = 0, OUTL = 1. If IN is
between MIN and MAX, OUT = IN, OUTU = 0, OUTL = 0 are set.

Troubleshooting
ENO = 0 with MIN > MAX --> OUT = MAX; OUTU = OUTL = 1

Parameters

Parameters Declaration Data type Description Default


MAX Input DINT High limit 0
IN Input DINT Input value 0
MIN Input DINT Low limit 0
OUTU Output BOOL High limit violated 0
OUTL Output BOOL Low limit violated 0
OUT Output DINT Output value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 317
Working with CFC charts for S7
7.17 CFC charts: Reference

LIM_I: Limiter for INT values

Description
This instruction compares the input values IN, MAX and MIN. It checks whether IN is within or
outside the interval limited by MIN and MAX.
If the low limit MIN of the interval is greater than the high limit MAX, the output value OUT =
MAX and the output parameters OUTU and OUTL are set to 1.
IN ≥ MAX represents a violation of the high limit, OUT = MAX, OUTU = 1 and OUTL = 0. IN ≤
MIN represents a violation of the low limit, OUT = MIN, OUTU = 0, OUTL = 1. If IN is between
MIN and MAX, OUT = IN, OUTU = 0, OUTL = 0 are set.

Troubleshooting
ENO = 0 with MIN > MAX --> OUT = MAX; OUTU = OUTL = 1

Parameters

Parameters Declaration Data type Description Default


MAX Input INT High limit 0
IN Input INT Input value 0
MIN Input INT Low limit 0
OUTU Output BOOL High limit violated 0
OUTL Output BOOL Low limit violated 0
OUT Output INT Output value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


318 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

MAX_DI: Maximum of DINT values

Description
This instruction compares the input values and outputs their maximum value at output
parameter OUT.
OUT = MAX {IN1, ... , INn}
The number of IN input parameters can be modified.

Parameters

Parameters Declaration Data type Description Default


IN1 Input DINT Input value 1 0
INn Input DINT Input value "n" 0
OUT Output DINT Maximum value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

MAX_I: Maximum of INT values

Description
This instruction compares the input values and outputs their maximum value at output
parameter OUT.
OUT = MAX {IN1, ... , INn}
The number of IN input parameters can be modified.

Parameters

Parameters Declaration Data type Description Default


IN1 Input INT Input value 1 0
INn Input INT Input value "n" 0
OUT Output INT Maximum value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 319
Working with CFC charts for S7
7.17 CFC charts: Reference

MIN_DI: Minimum of DINT values

Description
This instruction compares the input values and outputs their minimum value at output
parameter OUT.
OUT = MIN {IN1, ... , INn}
The number of IN input parameters can be modified.

Parameters

Parameters Declaration Data type Description Default


IN1 Input DINT Input value 1 0
INn Input DINT Input value "n" 0
OUT Output DINT Minimum value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

MIN_I: Minimum of INT values

Description
This instruction compares the input values and outputs their minimum value at output
parameter OUT.
OUT = MIN {IN1, ... , INn}
The number of IN input parameters can be modified.

Parameters

Parameters Declaration Data type Description Default


IN1 Input INT Input value 1 0
INn Input INT Input value "n" 0
OUT Output INT Minimum value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


320 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

MOD_DI: Modulo function of DINT values

Description
This instruction outputs the remainder of the division of the input value IN1 by the input
value IN2 at the output parameter OUT.
The instruction DIV_DI (Page 313) is used for the integer division of the data type DINT.

Troubleshooting
ENO = 0 in the case of division by 0.

Parameters

Parameters Declaration Data type Description Default


IN1 Input DINT Dividend 0
IN2 Input DINT Divisor 1
OUT Output DINT Remainder 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 321
Working with CFC charts for S7
7.17 CFC charts: Reference

MOD_I: Modulo function of INT values

Description
This instruction outputs the remainder of the division of the input value IN1 by the input
value IN2 at the output parameter OUT.
The instruction DIV_I (Page 314) is used for the integer division of the data type INT.

Troubleshooting
ENO = 0 in the case of division by 0.

Parameters

Parameters Declaration Data type Description Default


IN1 Input INT Dividend 0
IN2 Input INT Divisor 1
OUT Output INT Remainder 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


322 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

NEG_DI: Inverter for DINT values

Description
This instruction outputs the input value with changed sign at the output parameter OUT.

Troubleshooting
ENO = 0 if IN = -2,147,483,648

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
OUT Output DINT Output value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

NEG_I: Inverter for INT values

Description
This instruction outputs the input value with changed sign at the output parameter OUT.

Troubleshooting
ENO = 0 if IN = -32,768

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
OUT Output INT Output value 0

See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 323
Working with CFC charts for S7
7.17 CFC charts: Reference

Instructions for converting data types (conversion operations)

Overview of "CONVERT" instruction family

Conversion operations
The CONVERT instruction family contains instructions that convert "n" values of a data type
into "m" values of another data type.
"m" and "n" may also have the same value.

Principle: Data conversion


In the CFC chart you can only interconnect outputs (source type) to inputs (target type) when
both data types are identical, for example, REAL output value with REAL input value.
You must use conversion instructions to interconnect different data types.
These instructions have input and output parameters of a different type, and therefore
convert the input data type according to the data type set at the output parameter.

Conversion rules
The abbreviated name of the source and target data type, connected by means of an
underscore "_", form the type name of the conversion instruction.
The conversion rules for specific instructions are briefly described.
If the IN input value is not within the allowed range, the OUT output value becomes invalid
and the test output parameter ENO = 0 is displayed.
You can evaluate ENO, for example, to provide a substitute/safety value for further
processing.

Configuring CFC charts


324 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

Convert data type value into another data type


The following instructions convert one value of a data type into one value of another
data type:

Instruction Conversion
BY_DW (Page 329) BYTE to DWORD
BY_W (Page 330) BYTE to WORD
DI_DW (Page 330) DINT to DWORD
DI_I (Page 331) DINT to INT
DI_R (Page 331) DINT to REAL
DW_DI (Page 332) DWORD to DINT
DW_R (Page 333) DWORD to REAL
DW_W (Page 333) DWORD to WORD
I_DI (Page 334) INT to DINT
I_DW (Page 334) INT to DWORD
I_R (Page 335) INT to REAL
I_W (Page 335) INT to WORD
W_BY (Page 336) WORD to BYTE
W_DW (Page 337) WORD to DWORD
W_I (Page 337) WORD to INT

Converting several BOOL values


The following instructions convert several BOOL type values into one BYTE, WORD or DWORD
type value:

Instruction Conversion
BO_BY (Page 326) BOOL to BYTE, 8 inputs
BO_DW (Page 327) BOOL to DWORD, 32 inputs
BO_W (Page 328) BOOL to WORD, 16 inputs

Conversion into several BOOL values


The following instructions convert one BYTE, WORD or DWORD type value into several
BOOL type values:

Instruction Conversion
BY_BO (Page 329) BYTE to BOOL, 8 outputs
DW_BO (Page 332) DWORD to BOOL, 32 outputs
W_BO (Page 336) WORD to BOOL, 16 outputs

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 325
Working with CFC charts for S7
7.17 CFC charts: Reference

BO_BY: BOOL to BYTE conversion

Description
This instruction converts the eight BOOL type input values to a BYTE type value and applies it
to the output value.
The conversion is performed as follows:
The "n" output value bit is set to 0 or 1 if the corresponding input value "INn" has the value 0
or 1.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


INn Input BOOL Input value "n" 0
0≤n≤7
OUT Output BYTE Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


326 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

BO_DW: BOOL to DWORD conversion

Description
This instruction converts the 32 BOOL type input values to a DWORD type value and applies it
to the output value.
The conversion is performed as follows:
The "n" output value bit is set to 0 or 1 if the corresponding input value "INn" has the value 0
or 1.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


INn Input BOOL Input value "n" 0
0 ≤ n ≤ 31
OUT Output DWORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 327
Working with CFC charts for S7
7.17 CFC charts: Reference

BO_W: BOOL to WORD conversion

Description
This instruction converts the 16 BOOL type input values to a WORD type value and applies it
to the output value.
The conversion is performed as follows:
The "n" output value bit is set to 0 or 1 if the corresponding input value "INn" has the value 0
or 1.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


INn Input BOOL Input value "n" 0
0 ≤ n ≤ 15
OUT Output WORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


328 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

BY_BO: BYTE to BOOL conversion

Description
This instruction converts the input value of data type BYTE to 8 values of data type BOOL and
applies them to the 8 output values. The "n" bit in the input value is converted to the output
value OUTn.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input BYTE Input value 0
OUTn Output BOOL "n" output value 0
0≤n≤7

See also
Overview of "CONVERT" instruction family (Page 324)

BY_DW: BYTE to DWORD conversion

Description
Copies the byte of IN to the low-byte of OUT and sets the high-bytes to 0.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input BYTE Input value 0
OUT Output DWORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 329
Working with CFC charts for S7
7.17 CFC charts: Reference

BY_W: BYTE to WORD conversion

Description
Copies the byte of IN to the low-byte of OUT and sets the high-byte to 0.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input BYTE Input value 0
OUT Output WORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

DI_DW: DINT to DWORD conversion

Description
Copies the bit string of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
OUT Output DWORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


330 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

DI_I: DINT to INT conversion

Description
Converts the IN bit string to INT and copies the result to OUT.

Troubleshooting
If the values of IN lie outside the value range of -32 768 to 32 767, ENO = 0 and OUT is an
invalid value.

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
OUT Output INT Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

DI_R: DINT to REAL conversion

Description
Converts the value of IN to a REAL number and copies the result to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input DINT Input value 0
OUT Output REAL Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 331
Working with CFC charts for S7
7.17 CFC charts: Reference

DW_BO: DWORD to BOOL conversion

Description
This instruction converts the input value of the DWORD data type to 32 values of the BOOL
data type, which are applied at the 32 output values. The "n" bit in the input value is
converted to the output value OUTn.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default setting


IN Input DWORD Input value 0
OUTn Output BOOL "n" output value 0
0 ≤ n ≤ 31

See also
Overview of "CONVERT" instruction family (Page 324)

DW_DI: DWORD to DINT conversion

Description
Copies the bit string of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
OUT Output DINT Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


332 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

DW_R: DWORD to REAL conversion

Description
This instruction copies the bit string from IN to OUT. The instruction does not perform a value
change.
To achieve a value change to REAL, the combination of DW_DI instruction and subsequent
DI_R instruction must be used.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
OUT Output REAL Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

DW_W: DWORD to WORD conversion

Description
Copies the low-word of IN to the word of OUT.

Troubleshooting
ENO = 0 if the IN high-word > 0

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
OUT Output WORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 333
Working with CFC charts for S7
7.17 CFC charts: Reference

I_DI: INT to DINT conversion

Description
Copies the value of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default setting


IN Input INT Input value 0
OUT Output DINT Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

I_DW: INT to DWORD conversion

Description
Copies the bit string of IN to the low-word of OUT and sets the high-word to 0.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
OUT Output DWORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


334 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

I_R: INT to REAL conversion

Description
Converts the integer value of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
OUT Output REAL Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

I_W: INT to WORD conversion

Description
Copies the bit string of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input INT Input value 0
OUT Output WORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 335
Working with CFC charts for S7
7.17 CFC charts: Reference

W_BO: WORD to BOOL conversion

Description
This instruction converts the input value of the WORD data type to 16 values of the BOOL
data type, which are applied at the 16 output values. The "n" bit in the input value is
converted to the output value OUTn.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
OUTn Output BOOL "n" output value 0
0 ≤ n ≤ 15

See also
Overview of "CONVERT" instruction family (Page 324)

W_BY: WORD to BYTE conversion

Description
Copies the low-byte of IN to OUT.

Troubleshooting
If the high-byte > 0, then ENO = 0.

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
OUT Output BYTE Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


336 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

W_DW: WORD to DWORD conversion

Description
Copies the word of IN to the low-word of OUT.

Error handling
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
OUT Output DWORD Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

W_I: WORD to INT conversion

Description
Copies the bit string of IN to OUT.

Troubleshooting
N/A

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
OUT Output INT Output value 0

See also
Overview of "CONVERT" instruction family (Page 324)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 337
Working with CFC charts for S7
7.17 CFC charts: Reference

Logic instructions (word logic operations)

Overview of the instruction families "WRD_LGC" and "MULTIPLX"

Overview of "MULTIPLX" instruction family


This family contains Multiplex instructions.
Depending on the input value K, one of the other input values IN is output at the output
value OUT.

MUX_BO (Page 341) Multiplexer 1 of n for BOOL values


MUX_DI (Page 342) Multiplexer 1 of n for DINT values
MUX_I (Page 343) Multiplexer 1 of n for INT values
SEL_BO (Page 344) Multiplexer 1 of 2 for BOOL values
Is replaced by SEL.
SEL_R (Page 344) Multiplexer 1 of 2 for REAL values
Is replaced by SEL.

Overview of "WRD_LGC" instruction family


This family contains logic instructions of the data type WORD and DWORD.
With these instructions you implement logical operations of the data types WORD and
DWORD.

DECO (Page 339) Decode


ENCO (Page 339) Encode
SEL (Page 340) Select
WAND_DW (Page 345) Double word AND operation
WAND_W (Page 346) Word AND operation
WNAND_DW (Page 347) Double word NAND operation
WNAND_W (Page 348) Word NAND operation
WNOR_DW (Page 349) Double word NOR operation
WNOR_W (Page 350) Word NOR operation
WNOT_DW (Page 351) Double word NOT operation
WNOT_W (Page 351) Word NOT operation
WOR_DW (Page 352) Double word OR operation
WOR_W (Page 353) Word OR operation
WXOR_DW (Page 354) Double word exclusive-OR operation
WXOR_W (Page 355) Word exclusive-OR operation

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


338 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

DECO: Decode

Description
You can use the "Decode" instruction to set a bit in the output value specified by the input
value.
The "Decode" instruction reads the value at the IN input and sets the bit in the output value
whose bit position corresponds to the read value. The other bits in the output value are filled
with zeroes.
When the value at input IN is greater than 31, a modulo 32 instruction is executed.

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Word logic operations >
DECO: Decode"

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

ENCO: Encode

Description
The instruction "Encode" is used to read the bit number of the least significant bit in the input
value and output it to the output OUT.
The instruction "Encode" selects the least significant bit of the value at the IN input and writes
its bit number to the tag in the output OUT.

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Word logic operations >
ENCO: Encode"

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 339
Working with CFC charts for S7
7.17 CFC charts: Reference

SEL: Select

Description
Depending on the signal state at switch (input G), the "Select" instruction selects one of the
inputs IN0 or IN1 and moves its content to the output OUT.
• If the input G has signal state "0", the value at the IN0 input is moved.
• If the input G has signal state "1", the value at the IN1 input is moved to the output OUT.
The instruction can only be executed if the enable input EN has the signal state "1" and the
tags of all parameters are of the same data type.

Note
"SEL": Replaces "SEL_BO", "SEL_R"
The instruction "SEL" replaces the CFC instructions "SEL_BO" and "SEL_R".
These data type specific instructions are only available for reasons of compatibility in CFC.

TIA Portal Information System


Additional information in the information system of the TIA Portal:
• "PLC programming > Instructions > Basic instructions > FBD > Word logic operations > SEL:
Select"

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
SEL_BO: Multiplexer 1 of 2 for BOOL values (Page 344)
SEL_R: Multiplexer 1 of 2 for REAL values (Page 344)

Configuring CFC charts


340 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

MUX_BO: Multiplexer 1 of n for BOOL values

Description
This instruction is a multiplexer with the function "1 of n" for input values of data type BOOL.
The number of IN input parameters can be modified.
Depending on the input value K, one of the input parameters IN0 to INp is output at the
output parameter OUT.

Example:
With K = 2, the input value IN2 is output at the output parameter OUT.

Troubleshooting
ENO = 0 and OUT = 0, if K > (n - 1) or K < 0.

Parameters

Parameters Declaration Data type Description Default


K Input INT Selection value 0
INp Input BOOL Input value "p" 0
0 ≤ p ≤ (n - 1)
OUT Output BOOL Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 341
Working with CFC charts for S7
7.17 CFC charts: Reference

MUX_DI: Multiplexer 1 of n for DINT values

Description
This instruction is a multiplexer with the function "1 of n" for input values of the DINT data
type.
The number of IN input parameters can be modified.
Depending on the input value K, one of the input parameters IN0 to INp is output at the
output parameter OUT.

Example:
With K = 2, the input value IN2 is output at the output parameter OUT.

Troubleshooting
ENO = 0 and OUT = 0, if K > (n - 1) or K < 0.

Parameters

Parameters Declaration Data type Description Default


K Input INT Selection value 0
INp Input DINT Input value "p" 0
0 ≤ p ≤ (n - 1)
OUT Output DINT Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


342 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

MUX_I: Multiplexer 1 of n for INT values

Description
This instruction is a multiplexer with the function "1 of n" for input values of data type INT.
The number of IN input parameters can be modified.
Depending on the input value K, one of the input parameters IN0 to INp is output at the
output parameter OUT.

Example:
With K = 2, the input value IN2 is output at the output parameter OUT.

Troubleshooting
ENO = 0 and OUT = 0, if K > (n - 1) or K < 0.

Parameters

Parameters Declaration Data type Description Default


K Input INT Selection value 0
INp Input INT Input value "p" 0
0 ≤ p ≤ (n - 1)
OUT Output INT Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 343
Working with CFC charts for S7
7.17 CFC charts: Reference

SEL_BO: Multiplexer 1 of 2 for BOOL values


Use the instruction "SEL (Page 340)".
The instruction "SEL_BO" is only available for reasons of compatibility in CFC. You can only
use the instruction for "BOOL" data types.

Description
Depending on the input value K, this instruction switches the value of the input parameter
IN0 (K = 0) or IN1 (K = 1) to the output parameter OUT.

Parameters

Parameters Declaration Data type Description Default setting


K Input BOOL Selection input 0
IN0 Input BOOL Input value 1 0
IN1 Input BOOL Input value 2 0
OUT Output BOOL Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

SEL_R: Multiplexer 1 of 2 for REAL values


Use the instruction "SEL (Page 340)".
The instruction "SEL_R" is only available for reasons of compatibility in CFC. You can only use
the instruction for "REAL" data types.

Description
Depending on the input value K, this instruction switches the value of the input parameter
IN0 (K = 0) or IN1 (K = 1) to the output parameter OUT.

Parameters

Parameters Declaration Data type Description Default


K Input BOOL Selection input 0
IN0 Input REAL Input value 1 0.0
IN1 Input REAL Input value 2 0.0
OUT Output REAL Output value 0.0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


344 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WAND_DW: Double word AND operation

Description
This instruction generates double word logic AND operations at the input values. All input
value bits of the same significance are logically linked by AND; the result is written to the
corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 0 0_0 0 0 0
OUT 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 0 1_0 0 0 0_0 0 0 0_0 0 0 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input DWORD Input value 1 16#FFFFFFFF
INn Input DWORD Input value "n" 16#FFFFFFFF
OUT Output DWORD Output value 16#FFFFFFFF

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 345
Working with CFC charts for S7
7.17 CFC charts: Reference

WAND_W: Word AND operation

Description
This instruction generates word logic AND operations at the input values. All input value bits
of the same significance are logically linked by AND; the result is written to the corresponding
output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1
OUT 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input WORD Input value 1 16#FFFF
INn Input WORD Input value "n" 16#FFFF
OUT Output WORD Output value 16#FFFF

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


346 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WNAND_DW: Double word NAND operation

Description
This instruction generates double word logic NOT AND operations at the input values. All
input value bits of the same significance are logically linked by AND, then inverted and
written to the corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 0 0_0 0 0 0
OUT 2# 0 0 0 0_1 1 1 1_1 1 0 0_1 1 1 1_1 1 1 0_1 1 1 1_1 1 1 1_1 1 1 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input DWORD Input value 1 16#FFFFFFFF
INn Input DWORD Input value "n" 16#FFFFFFFF
OUT Output DWORD Output value 16#00000000

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 347
Working with CFC charts for S7
7.17 CFC charts: Reference

WNAND_W: Word NAND operation

Description
This instruction generates word logic NOT AND operations at the input values. All input value
bits of the same significance are logically linked by AND, then inverted and written to the
corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1
OUT 2# 0 0 0 0_1 1 1 1_1 1 0 0_1 1 1 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input WORD Input value 1 16#FFFF
INn Input WORD Input value "n" 16#FFFF
OUT Output WORD Output value 16#0000

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


348 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WNOR_DW: Double word NOR operation

Description
This instruction generates double word logic NOT OR operations at the input values. All input
value bits of the same significance are logically linked by OR. The result is then inverted and
written to the corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 0 0_0 0 0 0
OUT 2# 0 0 0 0_1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 1 1_1 1 1 1_1 1 1 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input DWORD Input value 1 0
INn Input DWORD Input value "n" 0
OUT Output DWORD Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 349
Working with CFC charts for S7
7.17 CFC charts: Reference

WNOR_W: Word NOR operation

Description
This instruction generates word logic NOT OR operations at the input values. All input value
bits of the same significance are logically linked by OR. The result is then inverted and written
to the corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1
OUT 2# 0 0 0 0_1 1 1 1_0 0 0 0_0 0 0 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input WORD Input value 1 0
INn Input WORD Input value "n" 0
OUT Output WORD Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


350 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WNOT_DW: Double word NOT operation

Description
This instruction inverts the input value word. Each bit of the input value is inverted and
written to the output value bit of the corresponding significance.

Example

IN 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0


OUT 2# 0 0 0 0_1 1 1 1_0 0 0 0_1 1 1 1_0 0 1 0_1 1 1 1_1 1 1 1_1 1 1 1

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
OUT Output DWORD Output value 1

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

WNOT_W: Word NOT operation

Description
This instruction inverts the input word. Each bit of the input value is inverted and written to
the output value bit of the corresponding significance.

Example

IN 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


OUT 2# 0 0 0 0_1 1 1 1_0 0 0 0_0 0 1 0

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
OUT Output WORD Output value 1

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 351
Working with CFC charts for S7
7.17 CFC charts: Reference

WOR_DW: Double word OR operation

Description
This instruction generates double word logic OR operations at the input values. All input
value bits of the same significance are logically linked by OR; the result is written to the
corresponding output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 1 1_0 0 0 0_0 0 0 0_0 0 0 0
OUT 2# 1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_1 1 1 1_0 0 0 0_0 0 0 0_0 0 0 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input DWORD Input value 1 0
INn Input DWORD Input value "n" 0
OUT Output DWORD Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


352 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WOR_W: Word OR operation

Description
This instruction generates word logic OR operations at the input values. All input value bits of
the same significance are logically linked by OR; the result is written to the corresponding
output value bit.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1
OUT 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 1 1

Parameters

Parameters Declaration Data type Description Default


IN1 Input WORD Input value 1 0
INn Input WORD Input value "n" 0
OUT Output WORD Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 353
Working with CFC charts for S7
7.17 CFC charts: Reference

WXOR_DW: Double word exclusive-OR operation

Description
This instruction generates double word logic exclusive-OR operations at the input values. All
input value bits of the same significance are logically linked by exclusive-OR; the result is
written to the corresponding output value bit. The bit is 0 if all input bits of the same
significance have the same value. Otherwise, the bit is 1.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1_0 0 0 0_0 0 0 0_0 0 0 0_0 0 0 0


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1_0 0 0 0_0 0 0 0_0 0 0 0_0 0 0 0
OUT 2# 0 0 0 0_0 0 0 0_1 1 0 0_1 1 1 0_0 0 0 0_0 0 0 0_0 0 0 0_0 0 0 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input DWORD Input value 1 16#0
INn Input DWORD Input value "n" 16#0
OUT Output DWORD Output value 16#00000000

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


354 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

WXOR_W: Word exclusive-OR operation

Description
This instruction generates word logic exclusive-OR operations at the input values. All input
value bits of the same significance are logically linked by exclusive-OR; the result is written to
the corresponding output value bit. The bit is 0 if all input value bits of the same significance
have the same value. Otherwise, the bit is 1.
The number of IN input parameters can be modified.

Example (two inputs)

IN1 2# 1 1 1 1_0 0 0 0_1 1 1 1_1 1 0 1


IN2 2# 1 1 1 1_0 0 0 0_0 0 1 1_0 0 1 1
OUT 2# 0 0 0 0_0 0 0 0_1 1 0 0_1 1 1 0

Parameters

Parameters Declaration Data type Description Default


IN1 Input WORD Input value 1 0
INn Input WORD Input value "n" 0
OUT Output WORD Output value 0

See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 355
Working with CFC charts for S7
7.17 CFC charts: Reference

Instructions for shifting and rotating

Overview of "SHIFT" instruction family

Overview
In this family, instructions for shifting and rotating are grouped together.
You use the instructions to shift or rotate input-value bits and have the result output at the
output value.

ROL_DW (Page 357) DWORD rotate left


ROL_W (Page 358) WORD rotate left
ROR_DW (Page 359) DWORD rotate right
ROR_W (Page 360) WORD rotate right
SHL_DW (Page 361) DWORD shift left
SHL_W (Page 362) WORD shift left
SHR_DW (Page 363) DWORD shift right
SHR_W (Page 364) WORD shift right

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


356 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

ROL_DW: Rotate DWORD to left

Description
The bits of input value IN are rotated left by the number of steps specified in input value N.
The bit positions freed by rotating are filled with the bit positions that are pushed out. The
status of the bits remains intact.
The result is stored at output parameter OUT.

Example of N = 3 and the DWORD data type:

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is rotated.
OUT Output DWORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 357
Working with CFC charts for S7
7.17 CFC charts: Reference

ROL_W: Rotate WORD to left

Description
The bits of input value IN are rotated left by the number of steps specified in input value N.
The bit positions freed by rotating are filled with the bit positions that are pushed out. The
status of the bits remains intact.
The result is stored at output parameter OUT.

Example of N = 3:

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is rotated.
OUT Output WORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


358 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

ROR_DW: Rotate DWORD to right

Description
The bits of input value IN are rotated right by the number of steps specified in input value N.
The bit positions freed by rotating are filled with the bit positions that are pushed out. The
status of the bits remains intact.
The result is stored at output parameter OUT.

Example of N = 3 and the DWORD data type:

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is rotated.
OUT Output DWORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 359
Working with CFC charts for S7
7.17 CFC charts: Reference

ROR_W: Rotate WORD to right

Description
The bits of input value IN are rotated right by the number of steps specified in input value N.
The bit positions freed by rotating are filled with the bit positions that are pushed out. The
status of the bits remains intact.
The result is stored at output parameter OUT.

Example of N = 3:

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is rotated.
OUT Output WORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


360 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

SHL_DW: Move DWORD to left

Description
The bits of input value IN are shifted left by the number of steps specified in input value N.
The low-order bit positions freed by rotating are assigned the value "0". The high-order bit
positions that are pushed out are lost.
The result is stored at output parameter OUT.

Example of N = 3 and the DWORD data type:

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is shifted.
OUT Output DWORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 361
Working with CFC charts for S7
7.17 CFC charts: Reference

SHL_W: Move WORD to left

Description
The bits of input value IN are shifted left by the number of steps specified in input value N.
The low-order bit positions freed by rotating are assigned the value "0". The high-order bit
positions that are pushed out are lost.
The result is stored at output parameter OUT.

Example of N = 3:

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is shifted.
OUT Output WORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


362 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

SHR_DW: Move DWORD to right

Description
The bits of input value IN are shifted right by the number of steps specified in input value N.
The high-order bit positions freed by shifting are assigned the value "0". The low-order bit
positions that are pushed out are lost.
The result is stored at output parameter OUT.

Example of N = 3 and the DWORD data type:

Parameters

Parameters Declaration Data type Description Default


IN Input DWORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is shifted.
OUT Output DWORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 363
Working with CFC charts for S7
7.17 CFC charts: Reference

SHR_W: Move WORD to right

Description
The bits of input value IN are shifted right by the number of steps specified in input value N.
The high-order bit positions freed by shifting are assigned the value "0". The low-order bit
positions that are pushed out are lost.
The result is stored at output parameter OUT.

Example of N = 3:

Parameters

Parameters Declaration Data type Description Default


IN Input WORD Input value 0
N Input WORD Number of bit positions by which 0
the value IN is shifted.
OUT Output WORD Output value 0

See also
Overview of "SHIFT" instruction family (Page 356)

Configuring CFC charts


364 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17.2.4 CFC instructions: Extended instructions

CFC instructions - Extended instructions: Date and time-of-day

CFC instructions: Date and time-of-day


The CFC instructions can be found in the "Instructions" task card in the "Extended
instructions" pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Extended instructions > Date and time-of-day"

Instruction Folder Function


T_ADD Date and time-of-day Add times
T_COMBINE Date and time-of-day Combine times
T_COMP Date and time-of-day Compare time tags
T_CONV Date and time-of-day Convert times and extract
T_DIFF Date and time-of-day Time difference
T_SUB Date and time-of-day Subtract times
RD_LOC_T Clock functions Read local time
RD_SYS_T Clock functions Read time-of-day
RTM Clock functions Runtime meters
SET_TIMEZONE Clock functions Set time zone
SNC_RTCB Clock functions Synchronize slave clocks
TIME_TCK Clock functions Read system time
WR_LOC_T Clock functions Write local time
WR_SYS_T Clock functions Set time-of-day

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 365
Working with CFC charts for S7
7.17 CFC charts: Reference

CFC instructions - Extended instructions: String + Char

CFC instructions: String + Char


The CFC instructions can be found in the "Instructions" task card in the "Extended
instructions" pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Extended instructions > String + Char"

Instruction Folder Function


CONCAT String + Char Combine character strings
DELETE String + Char Delete characters in a character string
FIND String + Char Find characters in a character string
INSERT String + Char Insert characters in a character string
LEFT String + Char Read the left characters of a character string
LEN String + Char Determine the length of a character string
MID String + Char Read the middle characters of a character string
REPLACE String + Char Replace characters in a character string
RIGHT String + Char Read the right characters of a character string
S_COMP String + Char Compare character strings
S_MOVE String + Char Move character string
STRG_VAL String + Char Convert character string to numerical value
VAL_STRG String + Char Convert numerical value to character string

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


366 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

CFC instructions - Extended instructions: Process image

CFC instructions: Process image


The CFC instructions can be found in the "Instructions" task card in the "Extended
instructions" pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Extended instructions > Process image"

Instruction Folder Function


SYNC_PI Process image Synchronize the process image inputs
SYNC_PO Process image Synchronize the process image outputs
UPDAT_PI Process image Update the process image inputs
UPDAT_PO Process image Update the process image outputs

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 367
Working with CFC charts for S7
7.17 CFC charts: Reference

CFC instructions - Extended instructions: Distributed I/O

CFC instructions: Distributed I/O


The CFC instructions can be found in the "Instructions" task card in the "Extended
instructions" pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Extended instructions > Distributed I/O"

Instruction Folder Function


Distributed I/O
D_ACT_DP DP & PROFINET Enable/disable DP slaves
GETIO DP & PROFINET Read process image
GETIO_PART DP & PROFINET Read process image area
RALRM DP & PROFINET Receive interrupt
RDREC DP & PROFINET Read data record
ReconfigIOSystem DP & PROFINET Reconfigure IO system
SETIO DP & PROFINET Transfer process image
SETIO_PART DP & PROFINET Transfer process image area
WRREC DP & PROFINET Write data record
Others
WR_REC Others Write data record to I/O
PRVREC iDevice / iSlave Make data record available
RCVREC iDevice / iSlave Receive data record
DPSYC_FR PROFIBUS Synchronize DP slaves/Freeze inputs

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


368 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

CFC instructions - Extended instructions: Diagnostics

CFC instructions: Diagnostics


The CFC instructions can be found in the "Instructions" task card in the "Extended
instructions" pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Extended instructions > Diagnostics"

Instruction Folder Function


RT_INFO Diagnostics Read runtime statistics
Get_IM_Data Diagnostics Reading identification and maintenance data
Get_Name Diagnostics Reading the name of a module
GetStationInfo Diagnostics Read information of an IO device

See also
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 369
Working with CFC charts for S7
7.17 CFC charts: Reference

7.17.2.5 CFC instructions: Communication

CFC instructions - Communication: S7 communication

CFC instructions: S7 communication


The CFC instructions can be found in the "Instructions" task card in the "Communication"
pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Communication > S7 communication"

Instruction Folder Function


BRCV Others Receive data in segments
BSEND Others Send data in segments
URCV Others Receive data uncoordinated
USEND Others Send data uncoordinated

See also
CFC instructions - Communication: Open User Communication (Page 371)
Overview of CFC instructions (Page 286)

Configuring CFC charts


370 System Manual, 11/2023, A5E53466205-AA
Working with CFC charts for S7
7.17 CFC charts: Reference

CFC instructions - Communication: Open User Communication

CFC instructions: Open User Communication


The CFC instructions can be found in the "Instructions" task card in the "Communication"
pane.
You can find descriptions of the individual instructions in the TIA Portal Information System:
• "PLC programming > Instructions > Communication > Open User Communication"

Instruction Folder Function


TRCV_C Open User Communication *) Establishing a connection and receiving data
TSEND_C Open User Communication *) Establishing a connection and sending data
T_CONFIG Others Configure interface
T_DIAG Others Checking the connection
T_RESET Others Resetting the connection
TCON Others Establish communication connection
TDISCON Others Terminate communication connection
TRCV Others Receive data via communication connection
TSEND Others Send data via communication connection

*) Version selection
You can select different versions of the "Open User Communication" group.
After the first import of the instructions into a CFC chart you can no longer change the
version.
The same version is always used for each future import.

See also
CFC instructions - Communication: S7 communication (Page 370)
Overview of CFC instructions (Page 286)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 371
Working with CFC charts for S7
7.17 CFC charts: Reference

Configuring CFC charts


372 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import) 8
8.1 Export/Import of CFC charts
The TIA Portal Openness API supports the export and import of charts that are created with
STEP 7 CFC ("Continuous Function Chart").
You can export and import all charts as XML files, or export only selected charts.
You call these functions for defined tasks outside the TIA Portal by means of the Public API.

Note
Recommended PC hardware
If you are working with large projects, check that the computer meets the TIA Portal
hardware requirements:
• RAM:
32 GB for large projects

Functions
The following functions are available for CFC charts:
• Exporting CFC charts (Page 377)
• Exporting only selected CFC charts (Page 379)
• Importing CFC charts (Page 381)
• Configuring chart passwords:
– Setting a password for CFC charts (Page 383)
– Reading the password from CFC charts (Page 385)
– Changing a password for CFC charts (Page 387)
– Removing a password from CFC charts (Page 389)
The function descriptions contain code samples that you can adapt to your
openness program.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 373
CFC Charts (Export/Import)
8.1 Export/Import of CFC charts

Security measures for TIA Portal Openness applications


It is recommended
• to install a TIA Portal Openness application with admin rights to the programs folder.
• to avoid the dynamical loading of program parts like assemblies or dlls from the
users area.
• to run the TIA Portal Openness application with user rights.

Note
Siemens is not liable for and does not guarantee the compatibility of the data and
information transported via these interfaces with third-party software.
We expressly point out that improper use of the interfaces can result in data loss or
production downtimes.

Note
There are no obligations or guarantees of any kind associated with using this description to
manually modify and evaluate the source file.
Siemens therefore accepts no liability arising from the use of all or part of this description.
If you import externally created configuration data that contains code errors, a wrong
structure or unwanted manipulations, this can cause unexpected errors and security risks.

WARNING
The API user is responsible for ensuring the security measures of handling passwords
through code.

More information in the TIA Portal Openness documentation:


• "Readme TIA Portal Openness"
• "Basics > Openness tasks > Introduction"
• "TIA Portal Openness API > General functions > TIA Portal Openness firewall"
• "TIA Portal Openness API > Functions for accessing the data of a PLC device >
Functions for downloading data to PLC device > Downloading to PLC devices"
• "Export/import > Overview > Basic principles of importing/exporting"

See also
TIA Portal project view: Exporting and importing CFC charts (Page 375)

Configuring CFC charts


374 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.2 TIA Portal project view: Exporting and importing CFC charts

8.2 TIA Portal project view: Exporting and importing CFC charts
You can export and import CFC charts in the TIA Portal project via the "Export / Import CFC"
dialog.
The dialog uses the Openness functions for exporting and importing CFC charts.
The same constraints apply as when using the Openness functions directly.
Follow the instructions under "Export/Import of CFC charts (Page 373)",
section "Security measures for TIA Portal Openness applications".

Data transfer dialog


For the import, you use the "Data transfer - Generate/import" dialog.
More information on this dialog:
• Industry Online Support: "SIMATIC Process Control System PCS 7 Help on data transfer
dialog" (https://support.industry.siemens.com/cs/ww/en/view/109812471)

Requirements
• "TIA Openness" is installed.
• The PLC is not online.
• The CFC charts to be exported are not password-protected.
CFC charts with configured passwords are ignored during the export.
• Import: The imported block types have been created and compiled under the PLC
in the TIA Portal.
If the imported XML file contains blocks that have not yet been created, the import
is canceled.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 375
CFC Charts (Export/Import)
8.2 TIA Portal project view: Exporting and importing CFC charts

Procedure
1. Select the "Charts" entry or a CFC chart in the project tree.
2. Select the "Tools > Import / Export CFC" entry in the menu bar.
The "Export / Import CFC" dialog opens.
3. Select the action you want:
– Export all CFC charts of the PLC
The block types and the settings for tasks and run sequence are also exported along
with the CFC charts.
– Export individual CFC charts
The CFC charts are exported without block types, task settings, and run sequence.
Click "Next" and select the desired charts.
– Import CFC charts
You can select the scope of the import in the next "Data transfer - Generate/import"
dialog.
4. Click "Next".
5. Select the storage path of the XML file and click "Finish".
The export or import is started.
6. If you are exporting CFC charts, confirm the message that the XML file has been written.
The XML file with the exported data is located in the selected storage path.
7. If you are importing CFC charts, the "Data transfer - Generate/import" dialog opens.
Select the objects to be imported, and click the "Import objects from B to A" button in the
"Generate/import" area:
The desired data is imported into the TIA Portal project under the PLC.
The Inspector window contains information on the import where appropriate.

See also
Exporting CFC charts (Page 377)
Exporting only selected CFC charts (Page 379)
Importing CFC charts (Page 381)

Configuring CFC charts


376 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.3 Exporting CFC charts

8.3 Exporting CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.
• The CFC charts to be exported are not password-protected.
CFC charts with a configured password are ignored during export.

Application
The TIA Portal Openness API supports the export of CFC charts to an XML file with the
function "CompleteExport".
The function writes the CFC project data from the chart folder into an XML file:
• All CFC charts created under the selected PLC
• Block types used in the exported charts
• Task assignment for the exported charts
• Run sequence of each exported chart
You find more information on the supported objects in the CFC documentation:
"Instructions and blocks (Page 27)".
If you want to start a selective XML export of CFC charts, use the function
"SelectiveExport (Page 379)".
Parameters

Parameter Data type Description


xmlFilePath String Folder path and name of the import file
modelVersion String S7TIA exchange model version to be used
filter Int64 Filter options for the automation interface
unattended Boolean Toggle for silent mode

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 377
CFC Charts (Export/Import)
8.3 Exporting CFC charts

Program code
Modify the following program code to export all CFC charts from a PLC with their objects
to an XML file.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Export CFC charts:


// XML file information for export
chartProvider.CompleteExport(@"D:\Users\username1\Documents\Automation\OpennessExample
.xml", "V2.0", 0, true);
More information in the TIA Portal Openness documentation:
• "Export/import > Overview > Exporting configuration data"

See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)

Configuring CFC charts


378 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.4 Exporting only selected CFC charts

8.4 Exporting only selected CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.
• The CFC charts to be exported are not password-protected.
CFC charts with a configured password are ignored during export.

Application
The TIA Portal Openness API supports the export of specific CFC charts to an XML file with the
function "SelectiveExport".
The function writes the project data for only the selected charts into an XML file:
• Specific CFC charts from the selected PLC
• Block types used in the exported charts
• Task assignment for the exported charts
• Run sequence of each exported chart
You find more information on the supported objects in the CFC documentation:
"Instructions and blocks (Page 27)".
If you want to start a complete XML export of all CFC charts, use the function
"CompleteExport (Page 377)".
Parameters

Parameter Data type Description


xmlFilePath String Folder path and name of the import file
selectedObjects String[] Names of the charts that you want to export
modelVersion String S7TIA exchange model version to be used
filter Int64 Filter options for the automation interface
unattended Boolean Toggle for silent mode

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 379
CFC Charts (Export/Import)
8.4 Exporting only selected CFC charts

Program code
Modify the following program code to export only selected CFC charts with their objects
to an XML file.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Export selected CFC charts


// XML file information for export of CFC charts "CFC_1" and "CFC_3"
chartProvider.SelectiveExport(@"D:\Users\username1\Documents\Automation\OpennessExampl
e.xml", new string[] { "CFC_1", "CFC_3" }, "V2.0", 0, true);
More information in the TIA Portal Openness documentation:
• "Export/import > Overview > Exporting configuration data"

See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)

Configuring CFC charts


380 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.5 Importing CFC charts

8.5 Importing CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.

Application
The TIA Portal Openness API supports the import of CFC charts from an XML file with the
function "Import".
The XML file is created by a complete XML export or by a selective XML export of specific
CFC charts.
Parameters

Parameter Data type Description


xmlFilePath String Folder path and name of the import file
modelVersion String S7TIA exchange model version to be used
filter Int64 Filter options for the automation interface
In the current CFC version, the parameter is not evaluated during
export and import and has no function.
unattended Boolean Toggle for silent mode
deleteAtTarget Boolean Toggle for deleting objects in the TIA project that were
not included in the original export file

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 381
CFC Charts (Export/Import)
8.5 Importing CFC charts

Program code
Modify the following program code to import CFC charts from an XML file.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Import CFC charts


// XML file information for import
chartProvider.Import(@"D:\Users\username1\Documents\Automation\OpennessExample.xml",
"V2.0", 0, true, false);

More information in the TIA Portal Openness documentation:


• "Export/import > Overview > Importing configuration data"

See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)

Configuring CFC charts


382 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.6 Setting a password for CFC charts

8.6 Setting a password for CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.

Application
To protect a CFC chart or hierarchical CFC chart from unintentional editing, you can protect
the chart with a password.
• To configure a password, use the function "AddChartProtection".
• To change an existing password, use the function "ChangeChartProtection (Page 387)".
• To read the password from a chart as a hash value, use the function "GetChartProtection
(Page 385)".
• To delete the configured password, use the function "RemoveChartProtection (Page 389)".

NOTICE
Password: No authorization, no know-how protection of the charts
The password merely protects the CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Parameters

Parameter Data type Description


chartName System.String Name of the chart which is protected with a password.
newHashedPassword System.String Password
The password is displayed as a hash value.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 383
CFC Charts (Export/Import)
8.6 Setting a password for CFC charts

Return value
The function "AddChartProtection" returns a System.Boolean:

TRUE The password was set successfully.


FALSE The password could not be set.

Program code
Modify the following program code to set a password for a CFC chart.
In this example, the hash value of the new password is included as an abbreviated
example value.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Configure CFC chart password


bool added = chartProvider.AddChartProtection("CFC_1", "AgGUWq...92M=");

See also
Export/Import of CFC charts (Page 373)

Configuring CFC charts


384 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.7 Reading the password from CFC charts

8.7 Reading the password from CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.

Application
To read the password from a CFC chart, use the function "GetChartProtection".
You can change or delete that password with the functions "ChangeChartProtection
(Page 387)" and "RemoveChartProtection (Page 389)".

NOTICE
Password: No authorization, no know-how protection of the charts
The password merely protects the CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Parameters

Parameter Data type Description


chartName System.String Name of the chart which is protected with a password.

Return value
The function "GetChartProtection" returns a System.Boolean:

TRUE The password was read successfully.


FALSE The password could not be read.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 385
CFC Charts (Export/Import)
8.7 Reading the password from CFC charts

Program code
Modify the following program code to read a password from a CFC chart.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Read CFC chart password


string passwordHash = chartProvider.GetChartProtection("CFC_1");

See also
Setting a password for CFC charts (Page 383)
Export/Import of CFC charts (Page 373)

Configuring CFC charts


386 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.8 Changing a password for CFC charts

8.8 Changing a password for CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.

Application
To change the password that is used to protect a CFC chart or hierarchical CFC chart from
unintentional editing, use the function "ChangeChartProtection".
You can read or delete a password with the functions "GetChartProtection (Page 385)" and
"RemoveChartProtection (Page 389)".

NOTICE
Password: No authorization, no know-how protection of the charts
The password merely protects the CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Parameters

Parameter Data type Description


chartName System.String Name of the chart which is protected
with a password.
currentPassword System.Security.SecureString Currently used password for the CFC chart.
newHashedPassword System.String New Password
The password is displayed as a hash value.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 387
CFC Charts (Export/Import)
8.8 Changing a password for CFC charts

Return value
The function "ChangeChartProtection" returns a System.Boolean:

TRUE The password was changed successfully.


FALSE The password could not be changed.

Program code
Modify the following program code to change a password for a CFC chart.
In this example, the password "test" is changed to a new password. The hash value of the
new password is included as an abbreviated example value.

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Change CFC chart password


char[] password1 = new char[] {'t', 'e', 's', 't'};

SecureString securePassword1 = new SecureString();


foreach (char ch in password1)
securePassword1.AppendChar(ch);

bool changed = chartProvider.ChangeChartProtection("CFC_1", securePassword1,


"AgGUWq...92M=");

See also
Setting a password for CFC charts (Page 383)
Export/Import of CFC charts (Page 373)

Configuring CFC charts


388 System Manual, 11/2023, A5E53466205-AA
CFC Charts (Export/Import)
8.9 Removing a password from CFC charts

8.9 Removing a password from CFC charts

Requirements

• The TIA Portal Openness application is connected to the TIA Portal.


See "Connecting to the TIA Portal"
• A project is open.
See "Opening a project"
• PLC is not online.

Application
To delete a configured password for a CFC chart, use the function "RemoveChartProtection".
The CFC chart can then be opened and edited again without entering a password.
To set the password again, use the function "AddChartProtection (Page 383)".

NOTICE
Password: No authorization, no know-how protection of the charts
The password merely protects the CFC chart from unintentional editing.
This type of access protection is not intended to increase the access security.
The password does not offer:
• Protection against unauthorized access to know-how in CFC charts
• Security-relevant authorization for access to CFC charts

Parameters

Parameter Data type Description


chartName System.String Name of the chart which is protected
with a password.
currentPassword System.Security.SecureString Currently used password for the CFC chart.

Return value
The function "RemoveChartProtection" returns a System.Boolean:

TRUE The password was deleted successfully.


FALSE The password could not be deleted.

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 389
CFC Charts (Export/Import)
8.9 Removing a password from CFC charts

Program code
Modify the following program code to remove a password for a CFC chart.
In this example, the password "test" was configured for the chart "CFC_1".

plcSoftware = (PlcSoftware) swContainer.Software;

chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;

// Remove CFC chart password


char[] password1 = new char[] {'t', 'e', 's', 't'};

SecureString securePassword1 = new SecureString();


foreach (char ch in password1)
securePassword1.AppendChar(ch);

bool removed = chartProvider.RemoveChartProtection("CFC_1", securePassword1);

See also
Changing a password for CFC charts (Page 387)
Reading the password from CFC charts (Page 385)
Export/Import of CFC charts (Page 373)

Configuring CFC charts


390 System Manual, 11/2023, A5E53466205-AA
Index
Parameter, 123, 133, 135, 146
Text field, 111
A CFC
Testing, 176, 181, 187, 189, 265
ABS_DI, 312
CFC
ABS_I, 312
Testing
ABS_R, 311
CFC
Absolute value
Testing
DINT, 312
CFC
INT, 312
Testing
REAL, 311
CFC
Access protection
Data types, (see: CFC data type)
CFC chart, 37, 82, 83, 85
CFC
Alarm
Chart sequence & extras, 242
CFC, 281
CFC
AND, 293
Block instance
AND operation, 293
CFC
generic, DWORD, 345
Icons, 255
WORD, 346
CFC
Arithmetic instructions, 308
Online/Offline, 255
Attribute, (see: Parameters)
CFC
Compiling, 258
CFC
B
Download, 259
Basic chart, (see: CFC chart) CFC
BIT logic instructions, 291 Testing
BIT_LGC, 291 CFC
Block IPE Inter-Project Engineering, 271
CFC chart, 29, 94 CFC
Importing in the CFC, 250 Alarm, 281
BO_DW, 327 CFC chart, 13, 25, 26, 38, 41, 43, 63, 66, 70, 72, 74, 87
BO_W, 328 Access protection, 37, 82, 83, 85
BY_BO, 329 Alarm, 278
BY_DW, 329 Block, 27, 94, 105, 109, 114, 236, 244
BY_W, 330 Block icon, 102
Block instance, 29, 102, 116, 120
Block type, 29, 116
C Chart sequence and extras, 49, 248
Compiling, 256
CFC, (see: CFC chart), 77, 108
Control flow, 26
Textual interconnection, 161
Data flow, 26
CFC
Download, 261
Attributes, 125
Downloading, 256
Block, 107
Dynamic display, 193, 206, 208
Block instance, 112, 253
Editor, 43, 45, 49, 65
Block type, 122
Hierarchy, 31
Data flow, 113
HMI connection, 278
Hierarchy, 88, 90, 91
Importing block, 250
Interconnection, 133, 135, 146, 155, 156, 157

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 391
Index

Instruction, 27, (see also: S5TIME, 218


Block), 109, 286, 365, 366, 367, 368, 369, 370, 371 SINT, 212
Interconnection, 127, 136, 142, 144, 158 STRING, 226
Interconnection STRUCT, 225
Interface, 92 System data, 233
Multiuser Engineering, 273 TIME, 217
OB type, 284 TIME_OF_DAY, 219
Objects, 40 TIMER, 223
Parameter, 144, 148, 150, 151 TOD, 219
Password, 37, 82 UDINT, 215
Printing, 79 UDT, 229
Reading back, 268 UINT, 214
Run sequence, 166 ULINT, 215
S7 target system, 13, 236 User-defined data types, 229, 229
Sheet bar, 66 USINT, 214
Signal tracing, 34, 100 VARIANT, 230
Signal tracking, 131 WCHAR, 222
Supported systems, 13 WORD, 210
Target system S7, 13, 236 CFC Instruction
Task, 167, 284 BIT_LGC family, 291
Testing, 178, 183, 263 COMPARE family, 303
Textual interconnection, 158, 164 CONVERT family, 324
Trend display, 193, 202, 204 FLIPFLOP family, 291
WinCC connection, 278 MATH_FP family, 307
CFC charts MATH_INT family, 308
Exporting, 377, 379, 383, 385, 387, 389 MULTIPLX family, 338
Importing, 381 SHIFT family, 356
CFC data type, 209 WRD_LGC family, 338
ANY, 232 Chart in chart, (see: CFC chart)
ARRAY, 227 Chart sequence & extras, 242, 248
BOOL, 209 Chart sequence and extras", 250
BYTE, 210 CMP_DI, 305
CHAR, 222 CMP_I, 304
COUNTER, 224 CMP_T, 306
DATE, 219 Comparator operations
DATE_AND_TIME, 220 DINT, 305
DINT, 213 INT, 304
DT, 220 TIME, 306
DTL, 221 COMPARE, 303
DWORD, 211 Compile
Hardware data types, 233 CFC, 258
INT, 212 Conversion
LDATE_AND_TIME, 221 BOOL -> BYTE, 326
LDT, 221 BOOL -> DWORD, 327
LINT, 213 BOOL -> WORD, 328
LREAL, 216 BYTE -> BOOL, 329
LTIME, 217 BYTE -> DWORD, 329
LTIME_OF_DAY, 220 BYTE -> WORD, 330
LTOD, 220 DINT -> DWORD, 330
LWORD, 211 DINT -> INT, 331
POINTER, 231 DINT -> REAL, 331
REAL, 216 DWORD -> DINT, 332

Configuring CFC charts


392 System Manual, 11/2023, A5E53466205-AA
Index

DWORD -> REAL, 333 Exclusive-OR operation, 298


DWORD -> WORD, 333 generic, DWORD, 354
INT -> DINT, 334 WORD, 355
INT -> DWORD, 334 Exporting
INT -> REAL, 335 CFC charts, 377, 379, 383, 385, 387, 389
INT -> WORD, 335
Overview of instructions, 324
WORD -> 16 BOOL, 336 F
WORD -> BYTE, 336
F_TRIG, 302
WORD -> DWORD, 337
Falling edge, 302
WORD -> INT, 337
Flipflop, 291
Cross reference, 153
Flip-flop
Cross-reference list, 153
JK, 299
Flip-flop
reset dominant, 300
D
Flip-flop
Data type set dominant, 301
CFC, (see: CFC data type) Forcing
DECO, 339 Testing the CFC, 183, 187, 189
DI_DW, 330
DI_I, 331
DI_R, 331 H
DIV_DI, 313
Hardware data types (CFC), 233
DIV_I, 314
Divider
DINT, 313
I
INT, 314
Double word logic, 338 I_DI, 334
Downloading I_DW, 334
CFC, 259 I_R, 335
Downloading changes I_W, 335
CFC chart, 261 Import/Export
DW_BO, 332 CFC charts, 377, 379, 381, 383, 385, 387, 389
DW_DI, 332 Importing
DW_R, 333 CFC charts, 381
DW_W, 333 Instruction
Dynamic display CFC chart, 286, 365, 366, 367, 368, 369, 370, 371
CFC chart, 193 Terminal, 289
Interconnection
CFC, 133
E CFC chart, 127, 144
Interface
Editor
CFC chart, 92
CFC chart, 45
Inter-Project Engineering
Task card, 47
CFC, 271
EN, 288
Interval
ENCO, 339
INT, 316
ENO, 288
symmetrical, DINT, 315
EPS_DI, 315
Inverter
EPS_I, 316
BOOL, 296
DINT, 323
DWORD, 351

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 393
Index

INT, 323 N
REAL, 311
NAND, 294
WORD, 351
NAND operation, 294
generic, DWORD, 347
WORD, 348
J
Navigation area
JK flip-flop, 299 CFCs, 255
JK_FF, 299 NEG_DI, 323
NEG_I, 323
NEG_R, 311
L NOR, 295
NOR operation, 295
LIM_DI, 317
generic, DWORD, 349
LIM_I, 310, 318
WORD, 350
Limit
NOT, 296
asymmetrical, DINT, 317
asymmetrical, INT, 310, 318
O
M OB type
CFC chart, 284
MATH_FP, 307
OPC UA
MATH_INT, 308
CFC block instance, 283
MAX_DI, 319
OR, 297
MAX_I, 309, 319
OR operation, 297
Maximum
generic, DWORD, 352
DINT, 319
WORD, 353
INT, 309, 319
MIN_DI, 320
MIN_I, 309, 320
P
Minimum
DINT, 320 Parameter
INT, 309, 320 CFC, 123
MOD_DI, 321 Parameters
MOD_I, 322 CFC, 125, 133
Modulo CFC chart, 127
DINT, 321 EN, 288
INT, 322 ENO, 288
Multiplexer Password
1 of 2 CFC chart, 37
BOOL, 341
DINT, 342
INT, 343 R
1 of 2
R_TRIG, 292
MULTIPLX, 338
Reading back
Multiuser Engineering
CFC chart, 268
CFC chart, 273
Rising edge, 292
MUX_I, 343
ROL_DW, 357
MUXn_BO, 341
ROL_W, 358
ROR_DW, 359
ROR_W, 360

Configuring CFC charts


394 System Manual, 11/2023, A5E53466205-AA
Index

Rotate, 356 U
left, DWORD, 357
User-defined data types, 229
left, WORD, 358
User-defined data types (CFC), 229
right, DWORD, 359
right, WORD, 360
RS_FF, 300
W
Run sequence, 166, 168, 171, 173, 174
Runtime model, (see: Run sequence) W_BO, 336
W_BY, 336
W_DW, 337
S W_I, 337
WAND_DW, 345
SEL, 340
WAND_W, 346
SEL_BO, 344
WNAND_DW, 347
SEL_R, 344
WNAND_W, 348
Shift, 356
WNOR_DW, 349
left, DWORD, 361
WNOR_W, 350
left, WORD, 362
WNOT_DW, 351
right, DWORD, 363
WNOT_W, 351
right, WORD, 364
WOR_DW, 352
SHIFT, 356
WOR_W, 353
SHL_DW, 361
Word logic, 338
SHL_W, 362
Word logic operation
SHR_DW, 363
DECO, 339
SHR_W, 364
ENCO, 339
SR_FF, 301
SEL, 340
Subchart, (see: CFC chart)
WRD_LGC, 338
System data types (CFC), 233
WXOR_DW, 354
WXOR_W, 355
T
Task X
CFC chart, 284
XOR, 298
Team Engineering
CFC, 271
CFC chart, 273
Terminal, 289
Test mode
CFC, 181
Text field
CFC, 111
Textual interconnection, 158, 161, 164
Textual interconnection
Textual interconnection
Trend display
CFC chart, 193
Mouse actions, 201
Toolbar, 197
Trend view, 196
Trend window operating options, 198
Trend view, (see: Trend display)

Configuring CFC charts


System Manual, 11/2023, A5E53466205-AA 395

You might also like