Recommendations and notes

Some recommendations and notes relating to library usage are described below.

Recommendation of library placeholders

Through the use of library placeholders the adaptation of the library versions used requires very little effort, thus making the process of engineering projects and libraries very flexible. We therefore recommended using placeholders instead of libraries.

For more information, see Library placeholders.

Possible online change through the use of “always newest” versions

Sample: You activate and start a project in which the library "LibA" is referenced as "always latest" version. At the time of the download, version 1.0.0.0 is the latest version of this library in the library repository. If you then install a newer version of "LibA" in the library repository (e.g. version 1.0.1.0), this version becomes the latest version of the library. If you log in with the application project, which you have not actively changed, TwinCAT detects a change in the application because "LibA", which is used as "always latest", is no longer referenced in version 1.0.0.0, but now in version 1.0.1.0. This means that you will be offered an online change or download when logging in, although you may not be aware of any project changes.

This irritation due to automatic changing of the effective version of a library (caused by the "always latest version" setting) is unnecessary and should be avoided. In addition, the project sources and the components used should be frozen and backed up for tracking purposes after commissioning or after completion of the project.

Therefore, we strongly recommended that all library references (i.e. library references directly at project level and library references used internally in libraries) be set to a fixed effective version after project completion (i.e. before delivery).

Note that this recommendation applies not only to user libraries but also to Beckhoff libraries, as new versions of referenced Beckhoff libraries may be installed with the installation of a new XAE or RM setup.

During the development phase, however, it makes sense to use the "always latest version" option, as you will then always automatically work with the latest available library versions.

For more information about how to set library versions to a fixed effective version, see section Command Set to Effective Version.

For more information and another example of the behavior of "always newest" versions, see the Command Set to Always Newest Version.

Transferring source code of user libraries

If you have configured the target or file/email archive settings to include source libraries in one of these archives, please note that the source libraries (*.library) used in the project are contained in the ZIP archive in readable source code form when passing on/delivering the target system or when passing on the file/email archive. Keep this in mind when referencing libraries and when passing on the target system or archives.

If you do not want to share the readable source code of (user) libraries in the target or file/email archive, you can either save and reference these libraries as compiled libraries (*.compiled-library) or you can disable adding source libraries to the target or file/email archive in the project settings.

For more information on the configuration options of the target and file/email archives, see section PLC Project Settings > Settings tab.

Information about source code encryption can be found in the documentation on Security Management.