Using Library POUs

Libraries are collections of objects that you can link to your application. You can use the objects contained in libraries in exactly the same way as objects that you have defined in the project.

Libraries can contain:

  • POUs, such as function blocks or functions
  • Interfaces and their methods and attributes
  • Data types, such as enumerations, structures, aliases, and unions
  • Global variables, constants, parameter lists
  • Text lists, image collections, visualizations, and visual elements
  • External files, such as documentation
  • Cam plate tables

The library manager is used for managing libraries in a project. You use the library repository dialog box for installing the library in advance onto the system.

See also

Using library POUs

The following instructions describe how to insert the counter module CTUD from the Standard library into your program.

  1. Open a POU in the editor and place the cursor in the declaration part.

  2. Specify the name for the function block instance, followed by a colon (example: iCounter1:).

  3. Press F2 to open the Input Assistant.

  4. In the category Structured Types, select the CTUD function block from the Standard library (subfolder “Counter”).

    Activate the option Insert with namespace prefix.

  5. Click OK to close the dialog box.

    The function block is inserted with a namespace prefix into the declaration part: iCounter1:Standard.CTUD.

See also