Library creation
- A TwinCAT 3 PLC project can be stored as a library (<Project name>.library/.compiled-library). At the same time it can be installed in the Library Repository, if required. To create a specific library project, it is recommended to select the template Empty PLC project directly in the New Project dialog.
- In order to be able to save a project as a library, a title, a version number and the company name must be entered in the project properties.
- If the library integrates other libraries, the user should carefully consider how these referenced libraries should behave later, when the "father" library is integrated in a project. These considerations apply to version handling, namespace, visibility and access options, some of which can be configured in the Properties dialog of the individual referenced libraries. A placeholder can be used when the reference is defined, if the library is to always reference another library when it is integrated in a project.
- To make library modules view- and access-protected, a library project can be saved in a precompiled format (<project name>.compiled-library) – see Command Save as library.
- Data structures of a library can be marked as library-internal. These non-public objects have the access label INTERNAL or the attribute 'hide' and therefore do not appear within the Library Manager, the “List components” function or the input wizard.
- A comment can be added to the declaration of a function block parameter, as a convenient way to make library function block information available to the library user. This comment is later shown on the Documentation tab in the Library Manager, when the library is integrated in a project. Also note the Library documentation options.
- The following commands for saving a library are available in the context menu of the PLC project:
Further Information