FunctionsandLibrariesUserGuide EcoStruxure
FunctionsandLibrariesUserGuide EcoStruxure
EIO0000002829.03
12/2023
www.se.com
Legal Information
The Schneider Electric brand and any trademarks of Schneider Electric SE and its
subsidiaries referred to in this guide are the property of Schneider Electric SE or its
subsidiaries. All other brands may be trademarks of their respective owners.
This guide and its content are protected under applicable copyright laws and
furnished for informational use only. No part of this guide may be reproduced or
transmitted in any form or by any means (electronic, mechanical, photocopying,
recording, or otherwise), for any purpose, without the prior written permission of
Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the guide
or its content, except for a non-exclusive and personal license to consult it on an "as
is" basis. Schneider Electric products and equipment should be installed, operated,
serviced, and maintained only by qualified personnel.
As standards, specifications, and designs change from time to time, information
contained in this guide may be subject to change without notice.
To the extent permitted by applicable law, no responsibility or liability is assumed by
Schneider Electric and its subsidiaries for any errors or omissions in the informational
content of this material or consequences arising out of or resulting from the use of the
information contained herein.
EIO0000002829.03 3
Safety Information
Safety Information
Important Information
Read these instructions carefully, and look at the equipment to become familiar
with the device before trying to install, operate, service, or maintain it. The
following special messages may appear throughout this documentation or on the
equipment to warn of potential hazards or to call attention to information that
clarifies or simplifies a procedure.
The addition of this symbol to a “Danger” or “Warning” safety label indicates that an
electrical hazard exists which will result in personal injury if the instructions are not
followed.
This is the safety alert symbol. It is used to alert you to potential personal injury
hazards. Obey all safety messages that follow this symbol to avoid possible injury or
death.
! DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious
injury.
! WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or
serious injury.
! CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could result in minor or
moderate injury.
NOTICE
NOTICE is used to address practices not related to physical injury.
Please Note
Electrical equipment should be installed, operated, serviced, and maintained only
by qualified personnel. No responsibility is assumed by Schneider Electric for any
consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction
and operation of electrical equipment and its installation, and has received safety
training to recognize and avoid the hazards involved.
EIO0000002829.03 5
About the Book
Validity Note
This document has been updated for the release of EcoStruxure™ Machine Expert
V2.2.
The characteristics that are described in the present document, as well as those
described in the documents included in the Related Documents section below,
can be found online. To access the information online, go to the Schneider Electric
home page www.se.com/ww/en/download/.
The characteristics that are described in the present document should be the
same as those characteristics that appear online. In line with our policy of constant
improvement, we may revise content over time to improve clarity and accuracy. If
you see a difference between the document and online information, use the online
information as your reference.
Related Documents
Document title Reference
EIO0000002856 (GER);
EIO0000002858 (SPA);
EIO0000002857 (ITA);
EIO0000002859 (CHS)
EIO0000002849 (FRE);
EIO0000002850 (GER);
EIO0000002852 (SPA);
EIO0000002851 (ITA);
EIO0000002853 (CHS)
6 EIO0000002829.03
About the Book
WARNING
LOSS OF CONTROL
• Perform a Failure Mode and Effects Analysis (FMEA), or equivalent risk
analysis, of your application, and apply preventive and detective controls
before implementation.
• Provide a fallback state for undesired control events or sequences.
• Provide separate or redundant control paths wherever required.
• Supply appropriate parameters, particularly for limits.
• Review the implications of transmission delays and take actions to mitigate
them.
• Review the implications of communication link interruptions and take actions
to mitigate them.
• Provide independent paths for control functions (for example, emergency
stop, over-limit conditions, and error conditions) according to your risk
assessment, and applicable codes and regulations.
• Apply local accident prevention and safety regulations and guidelines.1
• Test each implementation of a system for proper operation before placing it
into service.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
1 For additional information, refer to NEMA ICS 1.1 (latest edition), Safety
Guidelines for the Application, Installation, and Maintenance of Solid State Control
and to NEMA ICS 7.1 (latest edition), Safety Standards for Construction and
Guide for Selection, Installation and Operation of Adjustable-Speed Drive
Systems or their equivalent governing your particular location.
WARNING
UNINTENDED EQUIPMENT OPERATION
• Only use software approved by Schneider Electric for use with this
equipment.
• Update your application program every time you change the physical
hardware configuration.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
EIO0000002829.03 7
About the Book
Standard Description
ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment
and risk reduction
EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General
requirements
In addition, terms used in the present document may tangentially be used as they
are derived from other standards such as:
Standard Description
IEC 61158 series Digital data communications for measurement and control – Fieldbus for
use in industrial control systems
Finally, the term zone of operation may be used in conjunction with the description
of specific hazards, and is defined as it is for a hazard zone or danger zone in the
Machinery Directive (2006/42/EC) and ISO 12100:2010.
NOTE: The aforementioned standards may or may not apply to the specific
products cited in the present documentation. For more information concerning
the individual standards applicable to the products described herein, see the
characteristics tables for those product references.
8 EIO0000002829.03
General Description of Libraries
EIO0000002829.03 9
General Description of Libraries
Library Information
In the Library Manager, you find the libraries included in your project / library and
in the Library Repository, you find the available libraries. Depending on the
selected library, different information is available:
Company The primary provider or group name defined by the Schneider Electric
primary provider of the library, as shown in the
Library Manager and Library Repository dialog
box.
Namespace The default namespace of the library for accessing TCPUDP
functions of the library.
NOTE: Good practice is to use the default
namespace as the namespace used in your
application.
If qualified-access-only is set as library attribute, the
usage of the namespace in your application is
mandatory.
Namespace
A library namespace is a symbol that allows the unique access to the attached
library components (functions, function blocks, variables…). The namespace is
necessary when two components of two different libraries used in the same
project have the same name. The usage of the namespace in your application is
mandatory if the library has set the attribute qualified-access-only . To ensure
unique access to the correct component, use the full name <namespace>.
<component> format, including the namespace.
Case Description
1 There is a function block GEN in the library Util. The namespace of the library Util is Util.
An instance of the function block GEN can be declared with or without the library
namespace if the name GEN is unique within the project:
MyGenerator: Util.GEN;
Or MyGenerator: GEN;
2 A function block GEN has been created within the project. The use of the library Util
namespace will allow the system to access the function block GEN of the library Util.
Without namespace, the project function block GEN will be accessed:
MyGenerator_Util: Util.GEN;
MyGenerator_Project: GEN;
3 Another library, also containing a function block called GEN, is declared in the project
with namespace NewLib. The use of the namespace becomes mandatory to identify the
correct function block GEN to be accessed:
MyGenerator_Util: Util.GEN;
MyGenerato_NewLib: NewLib.GEN;
10 EIO0000002829.03
General Description of Libraries
Library Repository
The Library Repository is the editor that manages libraries installed in
EcoStruxure Machine Expert. The Library Repository allows you to install or
remove user-defined libraries as well as other library types, such as application
libraries, device libraries, or other libraries. A library can be used in an
EcoStruxure Machine Expert project only if it is installed in the Library
Repository. With the installation of EcoStruxure Machine Expert, a set of libraries
is installed by default in the System library repository. You can install new libraries
or new versions of existing libraries either via the Library Repository dialog box,
or by using the Schneider Electric Software Installer (refer to the Schneider
Electric Software Installer User Guide).
The paths to the folders where the (System and User) repositories are located
are configured in the Tools > Options > Directories (Devices, Libraries, ...)
dialog box.
Protection of Libraries
The following methods exist to protect your library:
Method Description
Source code protection When a library is prepared in “compiled-library” format, the source code
of the library modules is no longer visible after the library is integrated
into a project.
Integrity check When the option Integrity check is selected in the Project Settings >
Security dialog box, the project file is stored in a proprietary format. The
integrity of the file is verified each time the project is loaded.
Encryption using When the option Encryption is selected in the Project Settings >
password or certificate Security dialog box, the project file is encrypted by password or
certificate according to your individual requirements. For further
information, refer to the Menu Commands Online Help.
Licensing You can protect libraries by means of a license (dongle or soft container).
License-protected libraries can be installed in the library repository.
However, for use in the project, the valid license has to exist on the
computer.
EIO0000002829.03 11
General Description of Libraries
One Library Manager for each controller to handle the controller- In the Tools tree (see EcoStruxure Machine Expert,
specific and the application-specific libraries. Programming Guide) below the Application node for each
controller
Library Manager nodes for user-specific POUs which are used in In the Tools tree (see EcoStruxure Machine Expert,
more than one controller of the same EcoStruxure Machine Expert Programming Guide) below the Global node.
project.
For more information about library management, Library Repository and Library
Manager Editor, refer to Library Management, page 26.
For more information on finding a function or function block of libraries with the
FFB Finder, refer to How to Find a Function or Function block with the FFB Finder
(see EcoStruxure Machine Expert, Programming Guide).
12 EIO0000002829.03
Library Management
Library Management
Overview
This chapter provides information to help you managing libraries and library
versions of referenced libraries.
Introduction
Overview
Both projects and libraries themselves can use external functionalities which are
stored in other, separate libraries. To use those functionalities, these separate
libraries have to be included into the project in the Library Manager as referenced
libraries. Libraries which are referenced by libraries used in a project (application
project) or library (library project) are referred to as indirectly referenced libraries.
These indirectly referenced libraries are included automatically when compiling
and cannot be used in a project itself.
Depending on the used referencing method, the possibility and/or affect of a
modification of the library version varies. Changing an indirect referenced library
version for example is not possible.
Instead, the library versions are changed by the different library management
mechanisms.
Libraries can be referenced in various ways:
• Direct version, page 14
• Newest version, page 15
• Placeholder mechanism, page 16
• Forward compatible library (FCL), page 18
EIO0000002829.03 13
Library Management
Direct Version
Overview
A simple method for referencing libraries is to define explicitly within the Library
Manager of an application or library project which library and exact library version
should be used.
If a library X embeds another library Z using a direct reference, then library Z will
be loaded exactly in the version that is embedded by library X.
This can lead to several versions of the same library being loaded in one Library
Manager of a project.
NOTE: The method allows referencing several versions of a library within the
same project. Although this method is advantageous for certain types of
libraries, care must be taken when applying it to others to avoid complications.
Therefore, this method is generally discouraged except where indicated.
WARNING
UNINTENDED EQUIPMENT OPERATION
• Verify whether the versions of the libraries contained in your program are
correct, after updating the software.
• Verify whether the versions of the updated libraries are consistent with your
application specifications.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
14 EIO0000002829.03
Library Management
Example
Situation: The following libraries are added in the Library Manager:
Library Version
Library X 1.0.0.0
Library Y 1.0.0.0
Library Z 1.0.0.0
Dependencies:
X 1.0.1.0
Y 1.0.2.0
Assuming that library Z was added in all libraries as a direct library version, this
would mean:
• Library Z will be loaded in three different versions:
◦ The POUs of the project are directly using the functionalities of version
1.0.0.0.
◦ The POUs of library X are using the functionalities of version 1.0.1.0.
◦ The POUs of library Y are using the functionalities of version 1.0.2.0.
• This can cause potential compiler errors, for example, if the system tries to
exchange data between the POUs of library Z used by library X and between
the POUs of library Z used by library Y. This can occur, even if the data
structure is identical.
• This can cause a potentially unnecessary increase of the application size as
both versions of the libraries may be included in the build.
• When the library reference is a direct version reference, a change of the
indirect library dependencies is not possible after the library creation.
Newest Version
Overview
This referencing method is similar to the direct version referencing method.
Instead of an exact library version, a symbol (*) is defined as referenced library
version. Every time when compiling, the newest locally installed version of a
library is used in the project as referenced library version.
NOTE: When a new version of a library gets installed in the library repository,
all projects and libraries referencing this library with the newest version will get
changed without further notice when compiled. Usually this behavior is not
desirable in your application because it may introduce unintended changes,
either during build or during program execution.
WARNING
UNINTENDED EQUIPMENT OPERATION
• Verify whether the versions of the libraries contained in your program are
correct, after updating the software.
• Verify whether the versions of the updated libraries are consistent with your
application specifications.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
EIO0000002829.03 15
Library Management
Example
Situation: The following libraries are added in the Library Manager:
Library Version
Library X 1.0.0.0
Library Y 1.0.0.0
Library Z 1.0.0.0
Dependencies:
X 1.0.1.0
Y 1.0.2.0
On Computer A On Computer B
Assuming that library Z was added by using the newest version method, this
would mean:
On Computer A: On Computer B:
Library X uses Library Z version 1.0.3.0. Library X uses Library Z version 1.0.2.0.
Library Y uses Library Z version 1.0.3.0. Library Y uses Library Z version 1.0.2.0.
Placeholder Mechanism
Overview
A placeholder in the Library Manager is a reference to a definite library version.
Placeholders simplify the maintenance of library hierarchies.
Consequent usage of placeholders allows you to modify libraries at a lower level
of the dependencies hierarchy (such as updates or bug-fixing) and avoids the
need to adapt libraries of the higher levels or to adapt the device descriptions.
The search order for the placeholder resolution is (highest priority first):
1. Placeholder definition in the Placeholders dialog box of the Library
Manager of the application
2. Placeholders defined in device descriptions of the devices used
3. Placeholders defined by plugins
4. Placeholders dialog box of the Library Manager in the Global node of the
Tools tree
The result is displayed in the Effective Version column of the Library Manager
Editor, page 26. Further information is provided in the tooltip of the symbol.
If the placeholder is not resolved after the steps have been executed, the library is
marked with the symbol not resolved in the Library Manager editor list and
the library will not be included in the compile.
16 EIO0000002829.03
Library Management
WARNING
UNINTENDED EQUIPMENT OPERATION
• Verify whether the versions of the libraries contained in your program are
correct after updating the software.
• Verify whether the versions of the updated libraries are consistent with your
application specifications.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
NOTE: With compiler versions of EcoStruxure Machine Expert V2.2 and later,
the library profile is ignored for placeholder resolution. Placeholders which are
not resolved by the Placeholders dialog box, a device description, or a plugin
code become Unbound placeholders and the latest available version of the
library is used.
NOTE: Library names and placeholder references are case-sensitive.
Example
Precondition: The placeholder SysLib is defined and resolved in the device
description of different devices.
If... Then...
If device A with version V1.0.0.0 is implemented Then the library SysLibA with version V1.0.0.0
in your application. is referenced in the Library Manager because
the placeholder Syslib is resolved by the device
description of device A.
If device B with version V2.2.0.0 is implemented Then the library SysLibB with version V1.0.1.0
in your application. is referenced in the Library Manager because
the placeholder Syslib is resolved by the device
description of device B.
If neither device A nor device B are implemented Then the placeholder is not resolved by a
in your application. device.
EIO0000002829.03 17
Library Management
18 EIO0000002829.03
Library Management
Example
Situation: The following libraries are added in the Library Manager:
Library Version
Library X 1.0.0.0
Library Y 1.0.0.0
Library Z 1.0.0.0
Dependencies:
X 1.0.1.0
Y 1.0.2.0
EIO0000002829.03 19
Library Management
Advanced Example
Situation:
• A new version 1.0.3.1 of library Z uses some features of a system library
referenced via placeholder SysLib.
• This System library is compatible to controller A since version 2.0.0.0. This is
indicated in library Z version 1.0.3.1 by a minimum controller firmware, page
46 requirement.
This would mean:
• If a project uses controller A version 1.0.0.0, the following libraries are
compatible:
◦ 1.0.2.0
◦ 1.0.3.0
• If a project uses controller A version 2.0.0.0, the following library is
compatible:
◦ 1.0.3.1
• When clicking the Automatic button in the Version mapping tab, version
1.0.3.1 of library Z will be selected, if the controller A used in the project has
been updated to version 2.0.0.0.
Otherwise version 1.0.3.0 of library Z will be selected.
Using Libraries
Overview
This section provides information on situations you can encounter, when adding
libraries to an existing EcoStruxure Machine Expert project, updating libraries or
creating a forward compatible library.
20 EIO0000002829.03
Library Management
EIO0000002829.03 21
Library Management
The following effects occur when you update your libraries using the Libraries tab
of the Update Project dialog box:
22 EIO0000002829.03
Library Management
If... Then...
If you deselect the option Update libraries from the Libraries tab, • No existing library reference is changed.
and you click Update. • A manual update of the libraries can be executed in the
Version mapping tab of the Library Manager.
• Legacy libraries are listed in the Version mapping tab, but
marked as legacy, if a newer, forward-compatible library
version exists.
• The Update project dialog box is displayed again next time
you open this project.
You can omit this by deselecting the option Check for
updates when opening this project in the Update project
dialog box or in the Project Settings.
NOTE: If you have selected the option Update devices in the
Update project dialog box, libraries referenced in the project
as placeholders will be updated to the corresponding
placeholder resolutions defined by the devices to be updated,
even if the option Update libraries has not been selected.
If you select the option Update libraries with the default option • The directly referenced libraries are updated.
Update all libraries (incl. Libraries declared with direct or • The libraries with at least one forward compatible library
newest version), and you click Update. version installed in the Library Repository and the version
mapping of former legacy versions are updated to the newest
forward compatible library version.
NOTE: There are libraries which will not be updated. This
concerns libraries which are listed and gray colored in the
Library Manager as required library via a reference in the
device description.
If you select the option Update libraries with the option Update all • The forward compatible libraries are updated to the newest
forward compatible libraries (keep existing legacy mappings) forward compatible library version.
from the list, and you click Update.
• The legacy libraries are converted into forward compatible
libraries. They are updated to the newest forward compatible
library version.
NOTE: There are libraries which will not be updated. This
concerns libraries which are listed and gray colored in the
Library Manager as required library via a reference in the
device description.
If you select the option Update all forward compatible libraries • The forward compatible libraries are updated to the newest
(replace existing legacy mappings) from the list, and you click forward compatible library version.
Update. • The legacy libraries are converted into forward compatible
libraries. They are updated to the newest forward compatible
library version.
• The libraries with at least one forward compatible library
version installed in the Library Repository and the version
mapping of former legacy versions are updated to the newest
forward compatible library version.
NOTE: There are libraries which will not be updated. This
concerns libraries which are listed and gray colored in the
Library Manager as required library via a reference in the
device description.
EIO0000002829.03 23
Library Management
Using the Automatic button for updating has the following effects:
• The forward compatible libraries are updated to the newest
forward compatible library version.
• The legacy libraries are converted into forward compatible
libraries and are updated to the newest forward compatible
library version.
For updating only one library, right-click on the respective library in
the Version mapping tab and select Edit version mapping
(selected library).
If you want to update non-forward compatible libraries manually, This manual update can be executed in the Libraries tab of the
Library Manager:
1. In the Libraries tab, right-click a library and execute the
command Properties.
Result: The Properties dialog box is displayed.
2. In the Properties dialog box, select one of the versions
installed on the local system from the Specific version list,
and click OK.
24 EIO0000002829.03
Library Management
2 Select an empty subnode, and click the Add Result: The Add Command dialog
command... button. box opens.
6 Select the option Check Library Compatibility, Result: The Customize dialog box
and click the OK button. closes.
7 Restart EcoStruxure Machine Expert. Result: The Check Library
Compatibility command is
available in the Build menu.
In the Messages view, appropriate messages are reported for the following cases.
They mean that the interface of a POU has been modified:
• Adding or removing inputs and outputs of function blocks, functions, or
methods
• Modifying the data type of inputs and outputs
• Modifying the implemented interfaces of a method
EIO0000002829.03 25
Library Manager Editor
26 EIO0000002829.03
Library Manager Editor
Name The library names in the list consist of the following elements:
<version>: The version of the library when it was referenced for the
first time.
Namespace The default setting for the namespace of a library is <library name>.
An exception is made by libraries that have another namespace in
their Project Information. Use the library namespace (see
EcoStruxure Machine Expert, Programming Guide) as a prefix of the
identifier separated by a . (dot) character:
Effective Version Version of the library after the resolution. This version is used in the
project.
Example: 3.5.10.0
NOTE: For placeholder libraries, the effective version is
determined by the search order listed in Placeholder Mechanism,
page 16.
NOTE: For FCL libraries, the effective version is determined by
the version configured in the Version Mapping tab of the Library
Manager, page 39.
This tooltip symbol informs you about the resolution of the selected
placeholder library, which deviates from the default.
EIO0000002829.03 27
Library Manager Editor
Library symbol for a library that cannot be loaded because its signature
(encryption) could not be verified.
Tab Description
When creating a library, consider the items listed in the chapter Create
Your Own Library, page 43.
Inputs/Outputs The components of the selected library module are listed in a table
with variable Name, data Type, Inherited from, Address, Initial
value, and Comment, as defined in the library.
Library Parameters This tab is available when a Global Parameter List is selected. For
modifying library parameters, execute the command Library
Parameters... to open the Library Parameters dialog box.
NOTE: Library parameters can only be displayed and configured
in the Library Manager of applications.
28 EIO0000002829.03
Library Manager Editor
Command Description
Delete library To delete the library selected in the library list from the project.
Properties To edit general settings about the selected library such as the
namespace version handling, visibility and accessing. Refer to the
Properties... chapter, page 32.
Details To display a dialog box with details about the library (general
information, contents, properties, license information).
Try to reload library If a library has not been found, then select it and execute this
command, page 33 to attempt to reload it into the project.
Library parameters Opens the Library Parameters dialog box that allows you to display
and configure the parameters of the libraries that are available in the
Library Manager of the Application node for each controller.
NOTE: Library parameters can only be displayed and configured
in the Library Manager of applications.
Library repository To define library locations and to install or uninstall libraries. Refer to
the Library Repository chapter, page 36.
Icon legend Opens the Information dialog box with a legend of the icons that
display the status of a library in the list of integrated libraries.
Summary Opens the Library Summary dialog box that displays the libraries
referenced in the project in a tree structure including the libraries that
are referenced by these libraries.
Command Description
Trust certificate Available in the context menu of a library selected in the Library
Manager editor, in which the library has been signed with an untrusted
certificate. The command turns the untrusted certificate into a trusted
certificate and the prepended icon changes from to .
Export library Available in the context menu of a library selected in the Library
Manager editor: Opens the default dialog box for saving the library file
in the file system.
EIO0000002829.03 29
Library Manager Editor
Add Library
Overview
Two types of Add Library commands are available:
• The Add Library command.
• The Add library without placeholder resolution command.
Search function In the line above the library list, enter a string to find in the list (such as
library names or library POUs).
Library column The libraries installed in the library repository are listed. By default, the
libraries are grouped by library category.
NOTE: If you cannot find a specific library in the Add Library dialog box, but
the library is available in the Library Repository, this library may be blocked
for this device in the device description.
For further information, refer to Library Management, page 13.
30 EIO0000002829.03
Library Manager Editor
EIO0000002829.03 31
Library Manager Editor
Properties
Overview
In the Library Manager editor view, click the Properties button to open the
Properties dialog box for the selected library. It allows you to configure the
namespace, version handling, availability, and visibility of library references.
Properties dialog box for a library:
Visibility:
Publish all IEC symbols to that project as if this reference would have been included there directly.
OK Cancel
Default library If a library placeholder is selected in the Library Manager, this field
contains the name of the library which replaces the placeholder if no
device-specific library is available. Refer to the Placeholder tab.
Parameter Description
Specific version Enter the version or select one from the list that is used in the project.
To be used for container libraries, page 47.
Newest version always The latest version found in the library repository is used. The modules
used can change because a more recent version of the library is
available. To be used for interface libraries, page 47.
32 EIO0000002829.03
Library Manager Editor
Parameter Description
Only allow qualified If this option is enabled, the usage of the namespace is mandatory.
access to all identifiers
If the current project is NOTE: Modify the following settings if you intend to create a
referenced as a library
library project. It has the effect that the selected library is
by another project. referenced in the new library.
Publish all IEC symbols If the present project is a container library, activate this option for the
to that project as if this selected library to make its objects visible at the top level later in the
reference would have project.
been included there
directly Symbolic access to library modules:
Example: NamespaceLibA.ComponentOfLibB
<NamespaceLibA>.<NamespaceLibB>.<ComponentofLibB>
Hide this reference in If this option is activated, the selected library is not displayed (later in a
the dependency tree project) in the Library Manager as a library reference. This allows you
to include hidden libraries into a library. This requires careful use
because if library detected error messages are issued, it may be
difficult to identify the causing library.
Optional (if the library is If this option is activated, the selected library is handled as optional.
missing, no error will be When downloading the project which references the library, no error is
reported) detected, even if the library is not available in the library repository.
EIO0000002829.03 33
Library Manager Editor
After you have made the library available again, execute the Try to Reload
Library command in the Library Manager editor view when the library entry is
selected. The command is also available in the context menu if you right-click a
library entry. Thus, the library can be reloaded without the necessity of leaving the
project.
5 Select an entry from the Save as type list. If the selected library is linked in the project not only as a
compiled library, but also in source format, then one of the
two file types is available for selection:
• Compiled library files (*.compiled-library)
• Library files (*.library)
3 Click the Export... button. Result: The Export Library dialog box opens.
5 Select an entry from the Save as type list. If the selected library is linked in the project not only as a
compiled library, but also in source format, then one of the
two file types is available for selection:
• Compiled library files (*.compiled-library)
• Library files (*.library)
34 EIO0000002829.03
Library Manager Editor
Placeholders
Overview
In the Library Manager editor view, click the Placeholders button to open the
Placeholders dialog box. It provides information about the placeholders available
in the project with their definition for resolution and allows you to assign a
resolution that is valid for the open project.
NOTE: Carefully consider the possible effects of changing the library
referencing. Also consider the guidelines for creating libraries, page 43.
Placeholders
Set all unresolved unbound placeholders to the newest available versions
Element Description
Set all unresolved Click to resolve unresolved placeholder libraries in the Library
unbound placeholders Manager. The latest available version will be used.
to the newest available
versions
EIO0000002829.03 35
Library Manager Editor
Library Repository
Overview
Open the Library Repository dialog box via the Tools > Library Repository...
command or by clicking the Library repository button in the Library Manager
editor.
A library repository is a database for libraries which have been installed on the
local system in order to be available for EcoStruxure Machine Expert projects.
NOTE: A library project *.library, which is stored in a library repository, cannot
be opened there for editing or viewing in the programming system.
The dialog box shows the defined library Locations (repositories) and the
installed libraries.
It allows you to:
• Add, modify, or remove repositories
• Install, uninstall, and export libraries
The Library Repository dialog box contains the following elements:
Parameter Description
Location list Select a directory on the local system where library files are stored.
Installed libraries list The list shows libraries that are available at the selected Location
from the selected Company by their names (title), version number,
and company name as provided by the project information of the
library.
Group by category Activate the option Group by category to sort the Installed libraries
option list according to the library categories. The category names are
displayed as nodes which can be folded or unfolded to show/hide the
libraries.
Edit Locations... button Refer to the paragraph Library Locations (Repositories), page 36.
Install... / Uninstall Refer to the paragraph Library Installation and Uninstallation, page 38.
buttons
Export... button Opens the dialog box for saving the library project to the local file
system. The data type is *.library or *.compiled-library (depending
on the type of the selected library).
Library Profiles... button Opens the Library Profiles dialog box. With compiler versions of
EcoStruxure Machine Expert V2.2 and later, library profiles are ignored
for placeholder resolution.
36 EIO0000002829.03
Library Manager Editor
libraries provided by EcoStruxure Machine Expert and User for those libraries that
you defined.
To edit the path or name of a repository, click the Edit Locations... button.
The Edit Repository Locations dialog box displays:
The Edit Repository Locations dialog box contains the following elements:
Parameter Description
Repositories list Lists the defined locations. They are searched later for a library in the
given order from up to down.
Move up / Move down Modifies the order of the libraries. The selected location is moved up or
buttons down in the list.
Consider that the setting Location: <All locations> displays the libraries of the
previously defined locations. No installation is possible in this view.
Parameter Description
Location box Enter the path of the new repository or edit the path of the selected
repository.
To browse for a folder or to create a new folder, click the ... button.
Name box Enter a symbolic name for the location, for example Libraries for
System1.
NOTE: The folder that is selected as a repository folder has to be empty. The
System repository is not editable. This is indicated by the entry being
displayed in italic font.
EIO0000002829.03 37
Library Manager Editor
Find Libraries
To search for a library in the specified storage location, click the Find button in the
Library Repository dialog box. The Find Library dialog box opens. It allows you
to search for function blocks and the corresponding libraries.
Find Library dialog box
38 EIO0000002829.03
Library Manager Editor
Enter the search string for the function block and the corresponding libraries. In
addition, you can also enter the wildcards * and ?.
EIO0000002829.03 39
Library Manager Editor
Unsupported Devices
If a device is listed in the device dependencies details table as compatible, but is
not installed in the version of EcoStruxure Machine Expert that you are using, then
the text Unsupported device is displayed in the line, together with the device ID.
40 EIO0000002829.03
Library Manager Editor
Step Action
1 In the Library Updates tab of the Library Manager, click Configure Library Sources.
Result: The dialog box Tools > Options > Library Updates opens, showing a list of
Available Library Sources.
3 Enter a Name for the new library source and browse to the Location of the folder in the
network.
4 Select the option Include Subfolders when searching for updates to extend your
search.
5 Select the option Only install released libraries from this source if you want only
released libraries to be shown.
6 Select your preferences concerning open or compiled library types:
• Prefer Compiled: If a library is available as open and as compiled library, the
compiled version is considered.
• Prefer Open: If a library is available as open and as compiled library, the open
version is considered.
• Compiled only: Compiled libraries are considered.
• Open only: Open libraries are considered.
7 Click OK.
Result: The selected folder is added to the list of Available Library Sources. You are
returned to the Library Updates tab of the Library Manager.
Forward compatible libraries (FCL, page 18) are considered for the updating
process. Non-forward compatible libraries are ignored.
If a library detected in the folder is of a later version than the referenced library, the
library is presented as a library update.
EIO0000002829.03 41
Library Manager Editor
Step Action
1 From the list of detected libraries in the tab Library Updates, select the libraries you
want to be updated or click the Select all button.
Result: The libraries are updated or installed. The procedures that are performed are
indicated in the Messages view.
42 EIO0000002829.03
Create Your Own Library
Summary Tab
Specify the following information in the Summary tab of the Project Information
dialog box:
Parameter Description
EIO0000002829.03 43
Create Your Own Library
Parameter Description
Released Select the option to help protect the library from later modifications.
When you later attempt to save the library, you are prompted when this
flag has been set to Yes, and asked if you wish to reset the flag:
• If you click Yes, the flag is reset.
• If you click No, the flag is preserved and the project is not saved.
Default namespace Allows you to make each symbol unique, even if the same symbol
name is used in different libraries
For enforcing the namespace, see the separate section in this chapter.
Library Categories Provides helpful sorting of the entries in the Library Repository and
Library Manager
Automatically generate
NOTE: When calling these POUs, prefix them with the
‘Library Information
corresponding library namespace. For calling the POUs of the
POUs’
project POUs tree, prefix them with the namespace __Pool.
Automatically generate
‘Project Information
POUs’
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not use the parameters "Automatically generate ‘Library Information POUs’"
and "Automatically generate ‘Project Information POUs’" unless you modify the
namespace as directed above.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
44 EIO0000002829.03
Create Your Own Library
Properties Tab
List of configurable properties:
EIO0000002829.03 45
Create Your Own Library
Procedure
NOTE: The following procedure describes the steps that are necessary for
creating a forward compatible library.
46 EIO0000002829.03
Create Your Own Library
Step Action
1 In the menu Project > Project Information open the Project Information dialog
box, select the Properties tab, and enter or choose the following entries:
• Key field: ForwardCompatibleLibrary
• Type field: Boolean
• Value field: True
2 Click Add for adding the key to the Project Information of your library.
In the File Project > Project Information enter or choose the following entries:
• Key field: MinimumControllerFirmware
• Type field: Text
• Value field: device category “/” vendor and device id “/” version, for example
4096/1003 0082/1.33.2.0
If several devices shall be considered in the MinimumControllerFirmware attribute,
then the identification numbers have to be entered into the Value field together,
separated with a |.
For example:
• 4096/1003 0082/1.33.2.0|4096/1003 009D/1.35.1.1
Visibility
In the Properties, page 32 of each referenced library, define the behavior when
being inserted in a project along with its parent library.
Consider whether a referenced library should be hidden (not visible in the Library
Manager), or if it is useful to create a container library (a library project containing
library references):
Hidden library Deactivate the visibility of the library in the Library Manager
below the parent library by selecting the option Hide this
reference in the dependency tree in the Properties dialog
box, page 32.
EIO0000002829.03 47
Create Your Own Library
Version Constraints
• Interface libraries are referenced with the constraint newest. To achieve this,
select the option Newest version always in the Properties dialog box, page
32 after you have added the library to the Library Manager.
• Common libraries are referenced by a placeholder reference. This provides
consistent relationships between different libraries. An update of an indirectly
referenced library does not require modifications of each affected library but a
modification of the placeholder definition, page 35.
48 EIO0000002829.03
Create Your Own Library
Interface Description
External interfaces (user interfaces) Are accessed by the end-user application. Use
a reduced set of parameter types so that other
programmers need not work with troublesome
or complicated data types like pointers or the
ADR() operator.
If applicable, reuse the common behavior model to build function block interfaces
for end users.
For further information, refer to the CommonPouTypes Library Guide.
Mark libraries especially designed for the usage by end users with the property
IsEndUserLibrary (refer to the End-User Libraries section of the Library
Development Summary part of the EcoStruxure Machine Expert online help).
EIO0000002829.03 49
Function and Function Block Representation
Function Block
A function block:
• is a POU (Program Organization Unit) that returns one or more outputs.
• needs to be called by an instance (function block copy with dedicated name
and variables).
• each instance has a persistent state (outputs and internal variables) from one
call to the other from a function block or a program.
Examples: timers, counters
50 EIO0000002829.03
Function and Function Block Representation
Step Action
3 If the function has 1 or more inputs, start loading the first input using LD instruction.
5 If the function has more than 1 input and when Input Assistant is used, the necessary
number of lines is automatically created with ??? in the fields on the right. Replace the
??? with the appropriate value or variable that corresponds to the order of inputs.
6 Insert a new line to store the result of the function into the appropriate variable: type ST
instruction in the operator column (left field) and the variable name in the field on the
right.
EIO0000002829.03 51
Function and Function Block Representation
IsFirstMastCycle
SetRTCDrift
IL example of a function
without input parameter:
IsFirstMastCycle
SetRTCDrift
52 EIO0000002829.03
Function and Function Block Representation
Step Action
2 Create the variables that the function block requires, including the instance name.
4 In the CAL right-side field, replace ??? with the instance name.
To illustrate the procedure, consider this example with the TON Function Block
graphically presented below:
TON
In IL language, the function block name is used directly in the operator column:
TON
EIO0000002829.03 53
Function and Function Block Representation
Step Action
3 Use the general syntax in the POU ST Editor for the ST language of a function. The
general syntax is:
SetRTCDrift
54 EIO0000002829.03
Function and Function Block Representation
Step Action
2 Create the input and output variables and the instance required for the function block:
• Input variables are the input parameters required by the function block
• Output variables receive the value returned by the function block
3 Use the general syntax in the POU ST Editor for the ST language of a Function Block.
The general syntax is:
FunctionBlock_InstanceName(Input1:=VarInput1, Input2:
=VarInput2,... Ouput1=>VarOutput1, Ouput2=>VarOutput2,...);
To illustrate the procedure, consider this example with the TON function block
graphically presented below:
TON
TON
EIO0000002829.03 55
Glossary
A
application:
A program including configuration data, symbols, and documentation.
B
byte:
A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex.
C
CFC:
(continuous function chart) A graphical programming language (an extension of
the IEC 61131-3 standard) based on the function block diagram language that
works like a flowchart. However, no networks are used and free positioning of
graphic elements is possible, which allows feedback loops. For each block, the
inputs are on the left and the outputs on the right. You can link the block outputs to
the inputs of other blocks to create complex expressions.
control network:
A network containing logic controllers, SCADA systems, PCs, HMI, switches, ...
Two kinds of topologies are supported:
• flat: all modules and devices in this network belong to same subnet.
• 2 levels: the network is split into an operation network and an inter-controller
network.
These two networks can be physically independent, but are generally linked by a
routing device.
F
FB:
(function block) A convenient programming mechanism that consolidates a group
of programming instructions to perform a specific and normalized action, such as
speed control, interval control, or counting. A function block may comprise
configuration data, a set of internal or external operating parameters and usually
1 or more data inputs and outputs.
function:
A programming unit that has 1 input and returns 1 immediate result. However,
unlike FBs, it is directly called with its name (as opposed to through an instance),
has no persistent state from one call to the next and can be used as an operand
in other programming expressions.
Examples: boolean (AND) operators, calculations, conversions (BYTE_TO_INT)
EIO0000002829.03 57
I
IEC:
(international electrotechnical commission) A non-profit and non-governmental
international standards organization that prepares and publishes international
standards for electrical, electronic, and related technologies.
IL:
(instruction list) A program written in the language that is composed of a series of
text-based instructions executed sequentially by the controller. Each instruction
includes a line number, an instruction code, and an operand (refer to IEC 61131-
3).
INT:
(integer) A whole number encoded in 16 bits.
L
LD:
(ladder diagram) A graphical representation of the instructions of a controller
program with symbols for contacts, coils, and blocks in a series of rungs executed
sequentially by a controller (refer to IEC 61131-3).
P
POU:
(program organization unit) A variable declaration in source code and a
corresponding instruction set. POUs facilitate the modular re-use of software
programs, functions, and function blocks. Once declared, POUs are available to
one another.
S
ST:
(structured text) A language that includes complex statements and nested
instructions (such as iteration loops, conditional executions, or functions). ST is
compliant with IEC 61131-3.
symbol:
A string of a maximum of 32 alphanumeric characters, of which the first character
is alphabetic. It allows you to personalize a controller object to facilitate the
maintainability of the application.
system variable:
A variable that provides controller data and diagnostic information and allows
sending commands to the controller.
V
variable:
A memory unit that is addressed and modified by a program.
58 EIO0000002829.03
Index
C
cybersecurity
protection of libraries .......................................... 11
F
functions
differences between a function and a function
block ...............................................................50
how to use a function or a function block in IL
language .........................................................51
how to use a function or a function block in ST
language .........................................................54
L
LanguageModelAttribute.................................. 27, 44
libraries ..................................................................9
Library Manager ......................................................9
library protection ................................................... 11
Library Repository ...................................................9
P
protection of libraries ............................................. 11
U
Update Project dialog box.....................................22
EIO0000002829.03 59
Schneider Electric
35 rue Joseph Monier
92500 Rueil Malmaison
France
+ 33 (0) 1 41 29 70 00
www.se.com