Libraries are collections of objects that you can link to your application. You can use the objects contained in libraries in the same way as objects that you have defined in the project.
Libraries can contain the following objects:
POUs (such as function blocks or functions)
Interfaces and their methods and attributes
Data types (such as enumerations, structures, aliases, and unions)
Global variables, constants, and parameter lists
Text lists, image pools, visualizations, and visual elements
External files (such as documentation)
Cam tables
Objects from the ETEST plugin (for example, )
For managing libraries in a project, use a Library Manager Editor chapter. The installation of libraries is accomplished during the installation of those elements (devices, solutions, controllers) you select to install with the Schneider Electric Software Installer. You can manage user-defined libraries via the and the directly within EcoStruxure Machine Expert.
. The editor is described in theIn the
, you find the libraries included in your project / library and in the , you find the available libraries. Depending on the selected library, different information is available:
Information |
Description |
Example |
---|---|---|
Name |
Name of the library |
TcpUdpCommunication |
Version |
Version of the library |
1.1.10.0 |
Company |
The primary provider or group name defined by the primary provider of the library, as shown in the and dialog box. |
Schneider Electric |
Namespace |
The default namespace of the library for accessing 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. |
TCPUDP |
Category |
The category (or categories) which this library belongs to, as shown in the and dialog box. |
|
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; |
A default namespace is defined for each library.
The EcoStruxure Machine Expert. The 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 . With the installation of EcoStruxure Machine Expert, a set of libraries is installed by default in the library repository. You can install new libraries or new versions of existing libraries either via the dialog box, or by using the Schneider Electric Software Installer.
is the editor that manages libraries installed inThe paths to the folders where the (
and ) repositories are located are configured in the dialog box.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. |
Signing |
A certificate is used for the signing of library projects (*.compiled-library-v3). The signing can be enforced by means of a setting in the Save Project As Compiled Library. dialog. Then for generating a compiled library, you need a certificate suitable for code signing in your user profile. See alsoFor library projects that have to be compatible with EcoStruxure Machine Expert < V2.0 (*.compiled-library), only less secure signing is possible with a private key and a corresponding token. These methods should only be used for reasons of compatibility. Settings are configured in the on the tab. |
Integrity check |
When the option the , the project file is stored in a proprietary format. The integrity of the file is verified each time the project is loaded. dialog box is selected in |
Encryption using password or certificate |
When the option Menu Commands Online Help. is selected in the dialog box, the project file is encrypted by password or certificate according to your individual requirements. For further information, refer to the |
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. |
Libraries declared in a project are managed in the
editor.An EcoStruxure Machine Expert project can include more than one controller. Therefore, different are available. In general, two intended use cases of the same object exists:
Use Case |
Location of the |
---|---|
One for each controller to handle the controller-specific and the application-specific libraries. |
In the Tools tree below the node for each controller |
EcoStruxure Machine Expert project. nodes for user-specific POUs which are used in more than one controller of the same |
In the Tools tree below the node. |
For more information about library management, Library Management.
and , refer toFor more information on finding a function or function block of libraries with the How to Find a Function or Function block with the FFB Finder.
, refer to