‘Insert’ ‘Additional Library’

With this command you can attach an additional library to your project.

The command opens the dialog for opening a file. If the currently set directory does not contain the desired library, you can select another directory in field Library directory where all directories will be offered, which are defined in ‘Project’ ‘Options’ ‘Directories’ ‘Libraries’ (File type “*.lib”). Choose the desired library - multiple selection is possible - and confirm with OK. The dialog will close and the library gets inserted to the Library Manager. Now you can use the objects of the library in the project like user-defined objects.

Library \ paths

Regard which libraries directories are currently defined in the project options ( Options for Directories). If you insert a library from a directory which is not defined there, the library will be entered with the respective path.

Example: You insert library standard.lib from  directory “D:\codesys\libraries\standard”.

  • If this directory is defined in the project options, the entry in the library manager will be: “standard.lib <date and time of file>”.
  • If in the project options there is just defined a directory “D:\codesys\libraries”, then the entry in the library manager will be: “standard\standard.lib <date and time of file>”.
  • If no matching directory at all is defined in the project options, then the complete path will be entered: “D:\codesys\libraries\standard\standard.lib <date and time of file>”.

When re-opening the project the libraries will be searched according to entries in the library manager. So for example, if just the library file name is entered there, the library will be searched in the libraries directories defined in the project options.

If libraries are not found when opening a project, you will be asked whether you want to change the library directory defined in the project options. If you say no, a dialog will open providing information on the libraries not found and the respective entries in the Library Manager will be displayed red-colored. In this case you can select a red entry and choose command Search from the context menu. Thus you will get the dialog for opening a file where you can browse for the missing library and reload it immediately.

Licensing

As soon as you include a library for which a license is needed and no valid license is found, you may get a message that the library is only available in demo mode or that the library is not licensed for the currently set target. You can ignore this message at that time or start appropriate actions concerning the license. An invalid license will produce an error during compile ( ‘Project’ ‘Build’). In this case a doubleclick on the error message resp. <F4> will open the dialog Overview where you can start the appropriate actions guided by a wizard.