Referencing libraries
Elements of the library to be deployed might use elements of other libraries that have already been deployed by you. In this case, you have to specify the statement USES with the library configuration.
If you are only using system blocks or system data types provided by logi.CAD 3, the statement USES is not required within the library configuration.
Example: The function block Motor1 for the library com.CompanyA.Controller to be deployed should use the function Expand01 from the library com.CompanyA.Boards (in version 1.0.0). Therefore, you have to specify the statement USES com.CompanyA.Boards, 1.0.0 within the library configuration for com.CompanyA.Controller.
Perform the following steps to reference and deploy the libraries:
Make sure that the library to be referenced with the required elements is already included in the requested version within the project. See "Deploying the library" for the necessary steps.
Example: The project already contains this →library: com.CompanyA.Boards__1.1.0Create the elements for the new library (hence: com.CompanyA.Controller) and use the elements from library com.CompanyA.Boards. See "Creating elements (e.g. user blocks) for library" for details.
Within the library configuration for the new library (hence: com.CompanyA.Controller), insert the statement USES com.CompanyA.Boards, 1.0.0. See "Declaration of information on creation and references for the library" for details on the other syntax.
The library must be referenced with the exact version number with which this library has been installed in the current project.Example for library configuration incl. statementLIBRARY com.CompanyA.Controller
VERSION := 1.1.0;
PACKAGETYPE := zip;
USES com.CompanyA.Boards, 1.0.0; (* The library 'com.CompanyA.Boards' in version 1.0.0 is referenced. *)
FOLDER "Motors"
IEC := com.CompanyA.Controller.Motor1; (* Assumption: The POU 'Motor1' uses an element provided by the library specified at 'USES'. *)
END_FOLDER
END_LIBRARY
Generate the library for com.CompanyA.Controller. See "Generating and examining a library or password-protected library" for details.
Deploy the new library (hence: com.CompanyA.Controller) and install this library within a probject. See "Deploying the library" for details.
You only have to install the library com.CompanyA.Controller within this project. logi.CAD 3 takes care that all required libraries are automatically installed (hence com.CompanyA.Boards as well).