Declaration of the contents of the library
LIBRARY fully.qualified.name
...
FOLDER
"name1"
(* a folder to be included in the library *)
(*
'IEC'
specifies an element to be included in the above-specified folder. Some of its values are invalid
for
library type
'LOGIWEB'
and
'LOGISAFE'
, others
for
'LOGICAD'
. *)
IEC := fully.qualified.name1|POU-name1; (* optional_begin *), DEPLOY:=SOURCE|INTERFACE|OBJECT, VISIBILITY:=PUBLIC|PRIVATE, SiLCoverageReviewed:=
"<FINGERPRINT>"
,
"Comment on reviewed coverage"
(* optional_end *);
IEC := fully.qualified.name2|POU-name2;
...
(*
'FILE'
specifies an additional file to be included in the above-specified folder. *)
FILE :=
"path\name1"
; (* Note: Paths can be entered by using: \ or / *)
FILE :=
"path\name2"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
FOLDER
"name2"
(* a sub-folder to be included in the library *)
IEC := fully.qualified.name3|POU-name3; (*
'IEC'
and
'FILE'
statements can be used as specified above. *)
FILE :=
"path/name3"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
END_FOLDER
... (* additional folders and/or sub-folders with
'IEC'
and
'FILE'
statements as needed *)
END_FOLDER
(* optional statements
for
'LOGICAD'
, invalid
for
library type
'LOGIWEB'
and
'LOGISAFE'
. *)
BINARY_LIBRARIES FOR platform-name
FILE:=
"path\name4"
;
FILE:=
"path\name5"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
END_BINARY_LIBRARIES
BINARY_OBJECTS FOR BuiltInPlc
FILE :=
"path\name6"
;
FILE :=
"path\name7"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
END_BINARY_OBJECTS
INCLUDES (* optional_begin *) FOR platform-name (* optional_end *)
FILE:=
"path\name8"
;
FILE:=
"path\name9"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
END_INCLUDES
SOURCES (* optional_begin *) FOR platform-name (* optional_end *)
FILE:=
"path\name10"
;
FILE:=
"path\name11"
(* optional_begin *), SOURCEPATH :=
"path"
(* optional_end *);
...
END_SOURCES
END_LIBRARY
Meaning |
||||||||||||||
declaration of the contents for a →library Depending on the library type (see under "Creating and deploying a custom library" for details on the library type), you might not be able to use certain sections/elements of the following ones. See "Peculiarities for logi.SAFE/logi.WEB libraries" which statements are required for a logi.SAFE and a logi.WEB library and which must not be used.The contents of the library results from the following sections/elements:
|
The following example results in a created library:
being of type LOGICAD (see "Creating and deploying a custom library" for the possible library types)
being a snapshot library (see "Arbeitsabläufe: Snapshot-Bibliotheken und/oder finalisierte Bibliotheken erstellen/verwenden" for details)
containing the following:
2 folders – see the statements FOLDER ...
4 blocks in total – see the statements IEC := ...
files for the external block help – see the statements FILE := ... directly following the statements for the blocks
binaries, include and source files – see the statements beginning with BINARY_LIBRARIES
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;
FOLDER "Motors" (* The library contains the folder 'Motors' and the sub-folder 'Testing'. Hence, the ZIP-file contains: FOLDER\Motors\Testing *)
IEC := com.CompanyA.Controller.Motor1; (* 'Motors" will contain the files 'com.CompanyA.Controller.Motor1' and 'com.CompanyA.Controller.Motor2'. *)
IEC := com.CompanyA.Controller.Motor2;
FILE := ".olh\com.CompanyA.Controller.Motor1.EN.html", SOURCEPATH := "src/"; (* The files for the external block help for 'Motor1' and 'Motor2' - in English. *)
FILE := ".olh\Motor1.png", SOURCEPATH := "src/";
FILE := ".olh\com.CompanyA.Controller.Motor2.EN.html", SOURCEPATH := "src/";
FILE := ".olh\Motor2.png", SOURCEPATH := "src/";
FILE := ".olh\style.css", SOURCEPATH := "src/";
FOLDER "Testing" (* 'Testing" will contain the files 'com.CompanyA.Controller.Test1' and 'com.CompanyA.Controller.Testr2'. *)
IEC := com.CompanyA.Controller.Test1;
IEC := com.CompanyA.Controller.Test2;
FILE := ".olh\com.CompanyA.Controller.Test1.EN.html", SOURCEPATH := "src/"; (* The files for the external block help for 'Test1' and 'Test2' - in English. *)
FILE := ".olh\Test1.png", SOURCEPATH := "src/";
FILE := ".olh\com.CompanyA.Controller.Test2.EN.html", SOURCEPATH := "src/";
FILE := ".olh\Test2.png", SOURCEPATH := "src/";
FILE := ".olh\style.css", SOURCEPATH := "src/";
END_FOLDER
END_FOLDER
BINARY_LIBRARIES FOR BuiltInPlc (* Moreover, the library will contain some binaries, include and source files as well. *)
FILE := "libs\mathlib.lib";
END_BINARY_LIBRARIES
BINARY_OBJECTS FOR BuiltInPlc
FILE := "libs\mathlib.o";
END_BINARY_OBJECTS
INCLUDES
FILE := "h\mathlib.h";
END_INCLUDES
SOURCES
FILE := "code.c" , SOURCEPATH := "c";
END_SOURCES
END_LIBRARY
See "Example: Creating library with blocks incl. help files", if you need more explanations on the statements for the external block help.
LIBRARY com.MyCompany.MyLib2
...
FOLDER (* The library will contain the folder 'FOLDER' in which the elements are located. *)
IEC := com.CompanyA.Controller.Motor1;
IEC := com.CompanyA.Controller.Motor2;
END_FOLDER
...
END_LIBRARY
Example 3 illustrates the library configuration for a logi.SAFE library:
LIBRARY com.MyCompany.MyLibSAFE
VERSION :=1.1.0;
LIBRARYTYPE:=LOGISAFE;
PTK_FOR_LIBRARY_BUILD:=SafeLibraryWindowsX86;
FOLDER "SAFE"
IEC := com.Musterfirma.Safe.Motor1;
IEC := com.Musterfirma.Safe.Motor2, SiLCoverageReviewed := "E870DD09", "defensive programming -> 70% coverage is OK";
END_FOLDER
END_LIBRARY