In the Library Manager editor view, select the tab Libraries and click the Add library button to see a list of the libraries which are already installed on your system to the project. Click the Advanced... button.
The Add Library dialog box opens. It consists of two tabs:
oThe Library tab that allows you to add a definite library by specifying a direct version.
oThe Placeholder tab that allows you to reference a library using a placeholder.
NOTE: If you cannot find a specific library in the Add Library dialog box, this library may be blocked for this device in the device description.
For further information, refer to Library Management.
The Add Library dialog box allows you to search in installed libraries, for example, for a certain function block. Enter the text to find in the box in the upper part of the dialog box. Only those objects (library names, POUs, data types, and comments inside these objects) that contain the searched text is displayed in the lists of the Library and Placeholder tab.
The Library tab lists the libraries installed on your system with title, version, company, and category as defined in the project information of the library. You can filter the display by setting a certain Company from the selection list. (All companies) lists available libraries.
If the option Group by category is activated, the libraries of the set company are listed according to the available categories. The categories appear as nodes, the libraries (or further categories) are displayed indented below. If the option Group by category is not activated, the libraries are displayed in alphabetical order.
NOTE: For designing and referencing libraries, follow the guidelines for creating libraries.
If the option Display all versions (for experts only) is activated, the installed versions of the libraries are displayed indented below the selected library entry. In addition to the explicit version identifiers, an asterisk * is available, which means latest version. This allows you to choose among the versions. By default, this option is deactivated and the latest version is displayed.
In this case, a multiple selection of libraries is possible: keep the CTRL or SHIFT key pressed while selecting the desired libraries.
If you want to include a library which is not yet installed on the local system, click the Library Repository button. It opens the Library Repository dialog box for performing the required installation.
Use placeholders in the following cases:
oTo achieve compatibility of projects for multiple interchangeable target devices.
oIf your project is a library project referencing other, device-specific libraries.
Then include these specific libraries in the library manager via placeholders, which are defined in the device descriptions. Also consider the practices for creating your own library.
NOTE: In case of library development, the placeholder cannot be resolved. The selected default library is taken into account.
NOTE: Also consider the assignment of library placeholder resolutions depending on the compiler version, defined via library profiles.
NOTE: Adding a library as placeholder in the Library Manager of the Applications tree will resolve to the library version that is specified by the device that uses this library.
Adding a Library Via Placeholder
Enter a name in the Placeholder name box. To help to ensure correct insertion of the name, click the arrow button to open the selection list offering the placeholder names defined in device descriptions. You can also enter a new placeholder name in order to define an unbound placeholder. An unbound placeholder is not resolved by the device or by the library profile. This placeholder can get a resolution definition specific to the present demand (to be defined in the Placeholders... dialog box).
Choose a default library from the installed libraries that are displayed in the list of the Default library area. This default library is used if for any reason no device is available. It allows compilation of the edited library project without detecting errors. Select a default library as described for adding a library in the Library tab. You can also activate the option Display all versions (for experts only) to display the installed versions of a library.
When you close the Placeholder tab by clicking OK, the placeholder library is inserted in the tree structure of the Library Manager. Select this entry and open the Properties dialog box to display information on the set default library.
In the following example, the placeholder is not yet replaced (resolved). When the Library Manager belongs to an application of a device that references this library, the name and the version of this device-specific library is displayed in the respective columns.
Example for a library placeholder inserted in a Library Manager: