Declaration of information on creation and references for the library

Syntax
LIBRARY fully.qualified.name
IMPLEMENTS_LOGICALS_LIB := fully.qualified.name; (* optional for 'LOGICAD'; invalid for 'LOGIWEB' and 'LOGISAFE' *)
VERSION := number | number-SNAPSHOT;
CORRUPTION_DETECTION_MODE := INTERNAL|ARTIFACTIDENTITY; (* optional *)
LIBRARYTYPE := LOGICAD | LOGIWEB | LOGISAFE; (* optional; some of the other statements are invalid for a library type *)
PTK_FOR_LIBRARY_BUILD := platform; (* required for library type 'LOGIWEB' and 'LOGISAFE', but invalid for 'LOGICAD' *)
SUPPORTED_PTKS := platform_1, platform_2, ... platform_n; (* optional for 'LOGICAD', invalid for 'LOGIWEB' and 'LOGISAFE' *)
 
 
(* begin of more optional statements *)
PACKAGETYPE := zip;
DISPLAYNAME := "name";
COPYRIGHT := "text";
SUMMARY := "text";
VENDOR := "text";
COMMON_SOURCE := "text"; (* invalid for 'LOGIWEB' and 'LOGISAFE' *)
BASE_TEST_SOURCE := "project-relative path"; (* not supported in all variants of the IDE *)
USES fully.qualified.name, VERSION_number; (* invalid for 'LOGIWEB' and 'LOGISAFE' *)
(* end of optional statements *)
FOLDER ...
END_LIBRARY

Meaning

declaration of a →library, fully.qualified.name must be a fully qualified name
A fully qualified name consists of a sequence of →IEC identifiers separated by . (dots). Best practice is to use the name of the namespace as it has been used for the created user blocks (e.g. com.CompanyA.Controller).
LIBRARY and END_LIBRARY are →keywords for the declaration of a library. The declaration is possible within a library configuration, the declaration of several libraries is allowed. If you declare several libraries within a library configuration and you generate the libraries for it, logi.CAD 3 uses only the content as required for the appropriate library.

Use the specification VERSION to define the version number of a library, number can be any sequence of numbers and the numbers can be separated by . (dots). The statement is stored in a text file within the deployed libary.
For finalized libraries, logi.cals recommends to change the version number of the library before a library is generated anew. See "Arbeitsabläufe: Snapshot-Bibliotheken und/oder finalisierte Bibliotheken erstellen/verwenden", if you want to work with snapshot libraries and finalized libraries.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg A library is identified due to its name and its version. This makes it possible to declare several libraries with the same name within the library configuration – but mind that different versions must be defined for such libraries.

The following statements are optional:

  • CORRUPTION_DETECTION_MODE with the value ARTIFACTIDENTITY – purpose: check artifact identity when creating the library and using the library elements (provided the feature itself is also activated for logi.CAD 3)
    INTERNAL is the default value and is used without the specified CORRUPTION_DETECTION_MODE statement. When using INTERNAL,
    logi.CAD 3 does not check the artifact identity for the library and the library elements – even if the feature "artifact identity" itself is activated for logi.CAD 3.

  • LIBRARYTYPE – purpose: the library type (see under "Creating and deploying a custom library" for details on the library type); The defined type decides whether some other statements are required or invalid.
    These values are supported:

    Value

    Purpose

    LOGICAD

    This defines a logi.CAD 3 library.
    LOGICAD is the default value and is applied without the specified statement LIBRARYTYPE. For a logi.CAD 3 library, all statements may be used with the exception of PTK_FOR_LIBRARY_BUILD.

    LOGISAFE

    This value is not provided in all variants of logi.CAD 3.


    This defines a logi.SAFE library.
    See "Peculiarities for logi.SAFE/logi.WEB libraries" which statements are required for a logi.SAFE library and which must not be used.

    LOGIWEB

    This value is not provided in all variants of logi.CAD 3.


    This defines a logi.WEB library.
    See "Peculiarities for logi.SAFE/logi.WEB libraries" which statements are required for a logi.WEB library and which must not be used.

  • PTK_FOR_LIBRARY_BUILD (This statement is not provided in all variants of logi.CAD 3.)– purpose: the supported logi.SAFE or logi.WEB platform for which the binary code should be generated; Here it is possible to specify just one platform.

  • SUPPORTED_PTKS – purpose: the supported logi.CAD 3 platforms for which the binary code should be generated; Here it is possible to specify several platforms.
    Mind the following effect: You will be able to use the deployed library only within applications for which the same platform has been specified (within the PLC-object) .
    Moreover, this statement is required, if binary code for an element is created when the library is generated (due to the statement IEC := POU, DEPLOY:=OBJECT; – see under "Declaration of the contents of the library").

  • PACKAGETYPE – purpose: the compression format; Currently, only the value zip is supported.

  • DISPLAYNAME – purpose: a (short) name for the library as it will be displayed in the project explorer after the library has been deployed

  • COPYRIGHT – purpose: a copyright text; The text is stored in the same text file where the version number is stored as well.

  • SUMMARY – purpose: the intended usage of the library; The text is stored in the same text file where the version number is stored as well.

  • VENDOR – purpose: the vendor of the library; The text is stored in the same text file where the version number is stored as well.

  • BASE_TEST_SOURCE – purpose: a project-relative directory where the test execution files for a library elements of the library are searched for
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg This statement is only relevant, if the library element is tested by using the test framework. The statement is not evaluated in all variants of logi.CAD 3.
    Without this statement, the test execution files are searched in the directory where the tested block is located. Example: For the block <PROJECT>\src\bistable\helper\motor.iecst, the test execution files are searched within this directory: <PROJEKT>\src\bistable\helper\
    If the statement with the value test-src is specified, the test execution files are searched within this directory: <PROJEKT>\test-src\src\bistable\helper\

  • USES – purpose: referencing a library; Several such statements are allowed.

The optional statements IMPLEMENTS_LOGICALS_LIB and COMMON_SOURCE are not needed when creating custom libraries for team members. Usually, an administrator/OEM is using these statements when a system library for logi.CAD 3is created.

From FOLDER onwards, the contents of the library are specified.

The name of the library results from the fully qualified name, the version number and the compression format (see the following example).

Example
LIBRARY com.CompanyA.Controller (* The library is created with the name 'com.CompanyA.Controller__1.1.0-SNAPSHOT.zip'. *)
VERSION := 1.1.0-SNAPSHOT;
PACKAGETYPE := zip;
USES com.CompanyA.Boards, 1.0.0 (* The library 'com.CompanyA.Boards' in version 1.0.0 is referenced. *)
FOLDER ...
END_LIBRARY
 
LIBRARY com.Musterfirma.Controller (* The library is created with the name 'com.CompanyA.Controller__2.1.0.zip. *)
VERSION := 2.1.0;
PACKAGETYPE := zip;
USES com.Musterfirma.Boards, 1.1.0 (* Die Bibliothek 'com.Musterfirma.Boards' in Version 1.1.0 wird referenziert. *)
FOLDER ...
END_LIBRARY
Example with optional specifications
LIBRARY com.CompanyA.Controller
VERSION := 1.1.0-SNAPSHOT;
PACKAGETYPE := zip;
DISPLAYNAME := "Controller";
COPYRIGHT:="Copyright (c) Company A. All rights reserved.";
SUMMARY:="Company A Controller Library";
VENDOR:="Company A";
FOLDER ...
END_LIBRARY