Creating library configuration

The library configuration defines the layout for the library to be created (e.g. folder of the library) and the elements to be integrated (e.g. the user blocks).

How to create a library configuration:

  1. Select a folder within the →project in which you want to create the library configuration.

  2. In menu File or from the context menu of the folder, select New and the command Library Configuration.
    Result: The project explorer displays the library configuration (with icon ). The editor for the library configuration is opened for this library configuration.

  3. Adjust the already existing settings for the library configuration according to your requirements.

Example for library configuration

The following example results in a created library:

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 under "Syntax for library configuration" and "Example: Creating library with blocks incl. help files" for explanations of the statements.

 
  1. Save the library configuration: e.g. menu File, Save

Representation/actions within editor for a library configuration

  • The contents of a library configuration is displayed within an editor similar to the ST-editor. Subsequently, you are able to use the features of the ST-editor (e.g. Inhaltshilfe (Code-Assistent oder "Content Assist")) within the editor for a library configuration as well.

  • You are able to apply the actions within ST-editor to a large part within the editor for a library configuration. Just select a command within the editor for a library configuration. If the result is not to your liking, undo the action (menu EditUndo).

  • However, the editor for a library configuration supports a different syntax than the ST-editor. See "Syntax for library configuration" for the correct syntax within the editor for a library configuration.