Adding Libraries

  1. To add libraries, first open the “Program Structure” panel.

Libraries contain collections of reusable objects such as functions, function blocks or variables that are incorporated into projects. The contents of these libraries can be used here without any new declaration.

Project libraries are managed in library managers that are displayed in the program structure below the applications. Library managers handle both application-related, function-related libraries as well as CODESYS and WAGO system libraries.

Library Manager in the Program Structure
Library Manager in the Program Structure

Exactly one library manager per application (or controller) is automatically created by default. This also corresponds to WAGO recommendations.

A so-called “System” library repository already contains all updated libraries included with e!COCKPIT from CODESYS and WAGO. The library repository is automatically installed when setting up the e!COCKPIT software. Using the library manager, you can load libraries into your project from this existing library pool.

If no library manager is available, proceed as follows:

  1. Right-click on the application.
  2. Select Library Managers in the context menu.
  3. Click [New] in the dialog.

Reinstalling libraries via file:

  1. Double-click to open the library manager.
  2. Click the [Library Repository] button in the library manager.
  3. Click the [Install…] button.
  4. Select the library on your PC (*.compiled-library, *.library, *.lib).
  5. Click [Open] to confirm the installation.
  1. The library is installed in the library repository.

To load new libraries from the library repository, proceed as follows:

  1. Double-click to open the library manager.
Opening Library Managers
Opening Library Managers

Usually, different libraries are displayed that have already been added by e!COCKPIT from the device selection and configuration. These libraries are described as “implicit” and shown in gray in the library manager. You should only change them implicitly by changing the device selection or configuration in the project.

Examples:

If you want to add libraries from the existing library repository for application development (e.g., WagoAppBluetooth), proceed as follows:

  1. To add a new library that has already been installed in e!COCKPIT, click [Bibliothek hinzufügen].
  2. Select the relevant library in the dialog.
  3. Click the [OK] button to confirm your selection.

The library manager adds a reference to a pre-installed library to the project. You have then “explicitly” added the library to the project. Explicit libraries are shown in black in the list.

Display of Explicit Libraries
Display of Explicit Libraries

Different versions of a library may be available in the e!COCKPIT library repository. Which version is used when adding a library depends on the placeholder resolution of the library.
A library placeholder is used as a reference to the library and contains relevant properties of a library such as name, company, version and type of resolution. Generally, there are three types of resolution:

To update placeholders based on the project, proceed as follows:

  1. Click the [Placeholder] button in the library manager.
  2. The dialog displays a list of placeholders. This includes all placeholders for libraries that are included in your project via placeholders.
    The “Library” column shows both the name and version of the currently used library.
  3. Click on a library name.
  4. All versions of the library available in the library repository are displayed.
  5. Select the required version.
  6. Project-Specific Change of a Library Version
  7. “Resolved by placeholder redirection” now appears after the entry.
  8. Click [OK] to confirm the change.

Note

Install libraries in e!COCKPIT !

Note that all libraries must be integrated permanently, i.e., they must be installed in the e!COCKPIT library database (library repository). If you simply replace library files in a local directory on your computer, the libraries are not available in e!COCKPIT.

For additional information see: