General Description of Libraries
Libraries provide the following items that are executed in the runtime system of your controller:
oFunctions and function blocks
oData type and enumeration definitions
oGlobal variables
oVisualization objects
For managing libraries in a project, use a Library Manager. The Library Manager editor is described in the Library Manager Editor chapter. The installation of libraries is accomplished during the installation of those elements (devices, solutions, controllers) you select to install with EcoStruxure Machine Expert Configuration Manager. You can manage user-defined libraries via the Library Manager and the Library Repository directly within EcoStruxure Machine Expert.
In the Library Manager, you find the included libraries and in the Library Repository, you find the available libraries. Depending on the selected item, 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 Library Manager and Library Repository 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 Library Manager and Library Repository dialog box. |
Communication |
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 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 a 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. You can install new libraries or new versions of existing libraries either via the Library Repository dialog box, or by using the EcoStruxure Machine Expert Configuration Manager.
Managing Libraries by Using Library Managers
Libraries declared in a project are managed in the Library Manager editor.
A EcoStruxure Machine Expert project can include more than one controller. Therefore, different Library Managers are available. In general, two intended use cases of the same Library Manager object exists:
Use Case |
Location of the Library Manager |
---|---|
One Library Manager for each controller to handle the controller-specific and the application-specific libraries. |
In the Tools tree below the Application node for each controller |
Library Manager nodes for user-specific POUs which are used in more than one controller of the same EcoStruxure Machine Expert project. |
In the Tools tree below the Global node. |
For more information about library management, Library Repository and Library Manager Editor, refer to Library Management.
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.