STEP 7 CFC V19 enUS en-US
STEP 7 CFC V19 enUS en-US
STEP 7 CFC V19 enUS en-US
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.
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)
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.
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)
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.
More information
See also
CFC charts for S7 target systems (Page 235)
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.
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.
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
Data types
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.
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)
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)
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)
See also
Basics of CFC (Page 25)
"CFC" Editor (Page 45)
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.
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.
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.
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)
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
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.
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)"
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.
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)
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.
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)
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.
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"
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".
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)
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
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
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
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)
① 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
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
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.
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)
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.
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.
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)
See also
"CFC" Editor (Page 45)
"Chart sequence & extras" Editor (Page 49)
Icon Meaning
Navigation area for managing CFC charts
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.
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 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.
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
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.
Icon Meaning
List of created chart partitions in the open CFC chart
Clicking on an entry changes the view to the selected chart partition.
Show / hide position number in the run sequence above the block header.
Icon Meaning
Optimize run sequence in a CFC chart according to the signal flow
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
Icon Meaning
Identifies the instance of a function block (FB) 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.
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.
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.
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".
General
Icon Meaning
Expand display and show only the top elements
Icon Meaning
Optimize run sequence of CFC charts
Icon Meaning
Select all displayed textual interconnections
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.
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
See also
Basics of CFC (Page 25)
"CFC" Editor (Page 45)
"Chart sequence & extras" Editor (Page 49)
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)"
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)
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.
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"
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)"
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)
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)"
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".
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)
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.
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)
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)"
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.
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.
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)
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.
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)
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.
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.
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)
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)
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)"
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)
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)"
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)
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)
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)
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.
See also
Hierarchical CFC charts (Page 31)
Creating a subchart for a hierarchical CFC chart (Page 88)
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)
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.
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)
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".
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.
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
Icon Meaning
A non-interconnected parameter is hidden.
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.
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.
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.
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.
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)
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
"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.
"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)
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)
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.
Copying CFCs
If you copy a chart, an instruction or a block across devices or projects, then the following
conditions will apply:
See also
Copying objects (Page 40)
Interconnecting the input and output parameters with an external tag (Page 146)
Overview of textual interconnections (Page 158)
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.
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)
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)
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)
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.
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.
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.
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)
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.
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.
Note
"Instructions" task card
You cannot change block types in the "Instructions" task card because they are an integral
part of CFC.
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.
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:
See also
Type and instance (Page 29)
Creating a block type for CFC (Page 122)
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.
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.
Result
The instances of a changed block type are updated in all CFC charts of the target system.
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)
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.
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.
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)"
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.
Example
• Data type = INT
• Low limit = 10
• High limit = 90
Display in the "Type" field:
• Int (10..90)
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.
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.
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.
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.
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)
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.
Appearance
Control flow
Structure elements are displayed in the control flow with right indent.
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)
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.
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.
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.
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.
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)"
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)
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:
See also
Representation and properties of interconnections (Page 127)
Interconnecting input and output parameters (Page 136)
Displaying points of use of interconnections (Page 153)
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.
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.
See also
Hierarchical CFC charts (Page 31)
Interconnecting input and output parameters (Page 136)
Displaying points of use of interconnections (Page 153)
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.
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)
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.
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.
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".
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)
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.
Result
The input or output parameter has been hidden.
See also
Representation and properties of interconnections (Page 127)
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.
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:
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)
Requirement
• A CFC is open.
• The parameters are interconnected.
Procedure
1. Select the interconnection.
2. Perform one of the following actions:
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)
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)
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)
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".
More information
• "Creating, editing and closing textual interconnections (Page 161)"
• "Textual interconnections in the "Chart sequence & extras" editor (Page 164)"
Overview
A textual interconnection can only be created at a block/chart input and always references a
block or chart output in the CFC.
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)
Requirements
• A CFC is open.
• Instructions/blocks have been inserted.
• "Data flow" or "Control flow" is open.
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.
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.
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.
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
"Status" column
The status or a possible action is shown in a comment.
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.
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.
See also
Adapting the run sequence of CFC charts (Page 173)
Basic settings for CFC charts (Page 43)
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.
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.
Test mode
The "Enable chart" option can be changed online.
When the option is interconnected with a parameter, it cannot be edited online.
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
The configuration of the reduction ratio and the phase offset depends on the target system.
See also
Runtime model (Page 166)
Representation of instructions and blocks (Page 94)
Requirement
• The CFC chart is open.
• "Control flow" is displayed.
• Instructions/blocks have been configured.
Result
The run sequence is adapted.
See also
Optimizing the run sequence of CFC charts automatically (Page 174)
Runtime model (Page 166)
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)
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.
Requirement
• Cross-chart interconnections or interconnections in the CFC charts are configured.
• The "Chart sequence & extras" editor is open.
• The "Chart sequence" is displayed.
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)
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)"
Requirement
• The CFC is open.
• Instructions/blocks have been configured.
• "Data flow" is shown in the work area.
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)
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.
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.
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.
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.
Properties of CFCs
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.
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.
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)
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.
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.
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.
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)
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".
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.
4.7.6 Setting several parameters to defined values with the "Forcing" function
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.
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.
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.
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.
Exporting values
The values of the trend chart can be exported or imported in CSV format.
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)"
Additional information
• "Creating a dynamic display (Page 206)"
• "Using the dynamic display (Page 208)"
Toolbar functions
The toolbar provides the following functions.
The time interval is not refreshed. You can set any range. This mode can be
used to visualize all logged values in detail.
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)
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):
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):
See also
Overview of the trend and dynamic displays (Page 193)
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.
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)
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)"
Memory requirements
Each trend value occupies 16 bytes of memory.
That is, each trend occupies a maximum of 1.6 MB.
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)
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.
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)
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)
Keyword
BOOL
Description
Bit value
Value range
0 to 1
See also
Data types in the TIA Portal (Page 209)
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)
Keyword
DWORD
Description
Sequence of 32 bits
Value range
0 to 4294967295
See also
Data types in the TIA Portal (Page 209)
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)
6.2.2 Integers
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)
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)
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)
Keyword
USINT
Description
Unsigned integer
Value range
0 to 255
See also
Data types in the TIA Portal (Page 209)
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)
Keyword
UDINT
Description
Unsigned integer
Value range
0 to 4_294_967_295
See also
Data types in the TIA Portal (Page 209)
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)
Keyword
REAL
Description
Signed floating-point number
See also
Data types in the TIA Portal (Page 209)
Keyword
LREAL
Description
Unsigned floating-point number
See also
Data types in the TIA Portal (Page 209)
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)
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)
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)
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)
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)
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)
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)
Keyword
LDT or LDATE_AND_TIME
Description
Point in time
Information on date and time in nanoseconds since 01/01/1970 0:0.
See also
Data types in the TIA Portal (Page 209)
6.2.5.6 DTL
Keyword
DTL
Description
Point in time
See also
Data types in the TIA Portal (Page 209)
6.2.6 Characters
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)
Keyword
WCHAR
Description
Tag.
Single character.
Sequence of 16 bits.
Value range
$0000 - $D7FF
See also
Data types in the TIA Portal (Page 209)
6.2.7.1 TIMER
Keyword
TIMER
Description
Number of an S7 timer.
Value range
0 to 65535 (number depends on the target system).
See also
Data types in the TIA Portal (Page 209)
6.2.7.2 COUNTER
Keyword
COUNTER
Description
Number of an S7 counter
Value range
0 to 65535 (number depends on the target system).
See also
Data types in the TIA Portal (Page 209)
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)
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)
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
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.
See also
Data types in the TIA Portal (Page 209)
See also
STRUCT (Page 225)
Data types in the TIA Portal (Page 209)
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.
See also
Data types in the TIA Portal (Page 209)
6.5.2 POINTER
Keyword
POINTER
Description
Pointer to a memory area
Value range
Only as interconnection
See also
Data types in the TIA Portal (Page 209)
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.
See also
Data types in the TIA Portal (Page 209)
See also
Data types in the TIA Portal (Page 209)
See also
Data types in the TIA Portal (Page 209)
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"
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.
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
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.
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"
See also
Instructions and blocks (Page 27)
Updating instances of a changed block type (Page 120)
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)
"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)
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.
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.
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.
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)
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.
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.
"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)
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.
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.
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)
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.
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)
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 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)
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:
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)"
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)
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.
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)
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.
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)
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.
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)
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.
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.
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)
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.
See also
Overview: Compiling and downloading CFC charts (Page 256)
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)"
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.
See also
Multiuser Engineering in CFC (Page 273)
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"
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.
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.
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)"
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
See also
Inter-project engineering in CFC (Page 271)
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)"
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
*) 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.
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
See also
Configuring alarms in CFC (Page 281)
Additional information
Information system of the TIA Portal:
• "Program PLC > Configuring alarms"
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.
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)
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"
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)
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"
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
Basic instructions
Extended instructions
Communication
See also
"CFC" Editor (Page 45)
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.
General
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.
Parameters
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)
See also
Overview of CFC instructions (Page 286)
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".
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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.
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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.
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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.
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
Description
This instruction inverts the input value.
Truth table
IN OUT
0 1
1 0
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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.
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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.
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
JK_FF: JK Flipflop
Description
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
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
Description
0 0
0 1 1 0
1 0 0 1
1 1 0 1
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
Description
0 0
0 1 1 0
1 0 0 1
1 1 1 0
Parameters
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
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".
See also
Overview of the instruction families "BIT_LGC" and "FLIPFLOP" (Page 291)
Overview
This family contains instructions for comparing two input variables of the same type:
See also
Overview of CFC instructions (Page 286)
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
See also
Overview of "COMPARE" instruction family (Page 303)
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
See also
Overview of "COMPARE" instruction family (Page 303)
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
See also
Overview of "COMPARE" instruction family (Page 303)
Note
Value range
The value range of real numbers:
• -3,40282e^+38 ... -1,755e^-38 ... 0 ... 1,755e^-38 ... 3,40282e^+38
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
See also
Overview of CFC instructions (Page 286)
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.
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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.
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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".
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
Description
This instruction outputs the absolute value of the input value at the output parameter OUT.
OUT = | IN |
Parameters
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
Description
This instruction outputs the input value with changed sign at the output parameter OUT.
Parameters
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
Description
This instruction outputs the input value with changed sign at the output parameter OUT.
Troubleshooting
ENO = 0 if IN = -32,768
Parameters
See also
Overview of the instruction families "MATH_FP" and "MATH_INT" (Page 307)
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.
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.
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
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
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)
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
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the byte of IN to the low-byte of OUT and sets the high-bytes to 0.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the byte of IN to the low-byte of OUT and sets the high-byte to 0.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the bit string of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Converts the value of IN to a REAL number and copies the result to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the bit string of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the low-word of IN to the word of OUT.
Troubleshooting
ENO = 0 if the IN high-word > 0
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the value of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the bit string of IN to the low-word of OUT and sets the high-word to 0.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Converts the integer value of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the bit string of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
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
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the low-byte of IN to OUT.
Troubleshooting
If the high-byte > 0, then ENO = 0.
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the word of IN to the low-word of OUT.
Error handling
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
Description
Copies the bit string of IN to OUT.
Troubleshooting
N/A
Parameters
See also
Overview of "CONVERT" instruction family (Page 324)
See also
Overview of CFC instructions (Page 286)
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.
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.
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
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)
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
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
Parameters
See also
Overview of the instruction families "WRD_LGC" and "MULTIPLX" (Page 338)
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.
See also
Overview of CFC instructions (Page 286)
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.
Parameters
See also
Overview of "SHIFT" instruction family (Page 356)
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
See also
Overview of "SHIFT" instruction family (Page 356)
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.
Parameters
See also
Overview of "SHIFT" instruction family (Page 356)
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
See also
Overview of "SHIFT" instruction family (Page 356)
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.
Parameters
See also
Overview of "SHIFT" instruction family (Page 356)
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
See also
Overview of "SHIFT" instruction family (Page 356)
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.
Parameters
See also
Overview of "SHIFT" instruction family (Page 356)
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
See also
Overview of "SHIFT" instruction family (Page 356)
See also
Overview of CFC instructions (Page 286)
See also
Overview of CFC instructions (Page 286)
See also
Overview of CFC instructions (Page 286)
See also
Overview of CFC instructions (Page 286)
See also
Overview of CFC instructions (Page 286)
See also
CFC instructions - Communication: Open User Communication (Page 371)
Overview of CFC instructions (Page 286)
*) 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)
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.
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.
See also
TIA Portal project view: Exporting and importing CFC charts (Page 375)
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".
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.
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)
Requirements
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
Program code
Modify the following program code to export all CFC charts from a PLC with their objects
to an XML file.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)
Requirements
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
Program code
Modify the following program code to export only selected CFC charts with their objects
to an XML file.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)
Requirements
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
Program code
Modify the following program code to import CFC charts from an XML file.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Export/Import of CFC charts (Page 373)
TIA Portal project view: Exporting and importing CFC charts (Page 375)
Requirements
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
Return value
The function "AddChartProtection" returns a System.Boolean:
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.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Export/Import of CFC charts (Page 373)
Requirements
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
Return value
The function "GetChartProtection" returns a System.Boolean:
Program code
Modify the following program code to read a password from a CFC chart.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Setting a password for CFC charts (Page 383)
Export/Import of CFC charts (Page 373)
Requirements
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
Return value
The function "ChangeChartProtection" returns a System.Boolean:
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.
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
See also
Setting a password for CFC charts (Page 383)
Export/Import of CFC charts (Page 373)
Requirements
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
Return value
The function "RemoveChartProtection" returns a System.Boolean:
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".
chartProvider = plcSoftware.GetService<ChartProviderS7>();
if (chartProvider == null) // in case that CFC is not installed
return;
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)
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
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)