PLC

Command Properties

Function: The command activates the Properties view for the selected library to configure the settings.

Call:

Context menu of the library in the PLC project tree
If the Properties window is already open: Select library in the PLC project tree
 

Properties view

 

Advanced

The following settings are of interest as soon as the library is integrated (referenced) in another library. By default, they are disabled:
Hide reference
TRUE: If the current project is referenced as a library in another project, this library reference is not displayed in the dependency tree and therefore not in the Library Manager either. Thus, you can add "hidden" libraries. It may be difficult to find the cause of compile errors that are due to library errors.
FALSE: If the current project is referenced as a library in another project, this library reference is displayed in the dependency tree and therefore not in the Library Manager either.
Optional
TRUE: The selected library is treated as optional. When loading a project that references the library, no error is output even if the library does not exist in the library repository.
Publish all IEC symbols
TRUE: If the current project is later included as a library in another project, the IEC symbols of the selected library reference are published in this project as if the selected library reference were directly included in the project. You can address the library function blocks unambiguously if you use the corresponding namespace path. This consists of the namespace of the "father" library and its own namespace and precedes the function block name.
You should only enable this option if you want to create a so-called "container library". A container library is a library that does not define its own function blocks, but only references other libraries to create a kind of library bundle. This can be useful if you have to include several libraries in a project at the same time. In this case it is, however, desirable to place the individual libraries of the top-level package in the Library Manager of the project to shorten the access paths for the library function blocks. This is exactly what you can achieve by enabling this option in advance.
FALSE: If the current project is referenced as a library in another project, the function blocks of the library reference displayed in the properties can be addressed unambiguously by using the corresponding namespace. The namespace consists of the namespace of the current library project and the namespace of the selected library reference.
Qualified access only
TRUE: You can access the function blocks and variables of the library in the project only with a namespace prefix.
 

Conditional referencing

Condition
Here you can add entries that are compared with the compiler definitions set in the PLC project. The library is actively referenced if at least one of the entries corresponds to one of the definitions. If no entry corresponds to any of the definitions, the library is deactivated and displayed grayed out.
If you wish to make several entries, you can separate them with a comma.
This setting has no effect if no entry exists.
Sample: def1,def2,def3
 

Miscellaneous

Here you can (re-)define which version of the library is used in the project if it is not a library placeholder, or you can edit the placeholder resolution.
Using fixed libraries should be avoided, if possible. Instead, use placeholders to reference the libraries.
Description
Library description
Effective version
Effective version of the library to which the placeholder refers. This field is displayed if the setting "Always newest"/"*" is configured in the Resolution field. This allows the user to see the actual library version used, despite the general "Always newest" resolution setting.
Name
Library name
Namespace
Displays the current namespace. By default, this is identical to the library name unless you have explicitly defined a different default namespace in the project information when you created the library. You can change the namespace for the local project here in the "Properties" view.
Resolution
If you selected a library placeholder in the Library Manager, this field contains the name and version of the library that is to replace the placeholder. At this point, the placeholder is thus resolved as a "real" library and is resolved either as a specific version of the library (e. g."1.0.0.0") or as "Always newest"/"*".
If you want a specific version of the library, select it from the list and TwinCAT uses exactly this version.
If you want the "Always newest"/"*" version of the library, select this from the list and TwinCAT always uses the latest version of the library found in the library repository. This may cause the library modules that are actually used to change when a newer version of the library is available.
 

See also:

Using libraries
Placeholder