You are here: Core Reference > Coding > Logic > Reference an ST Library or Function Block Library in a Logic Diagram

Reference an ST Library or Function Block Library in a Logic Diagram

When you have created one or more ST Libraries or Function Block Libraries, you can reference them in other Logic programs, including Logic diagrams such as Function Block Diagrams.

NOTE: For information on referencing a library in an ST program, see Reference an ST Library or Function Block Library in an ST Program.

By referencing an ST Library or Function Block Library, you allow a Logic program to use the Logic behavior that is defined in the library without having to replicate the code in the Logic Program itself. This is useful when the same Logic is needed in multiple programs.

To reference an ST Library or Function Block Library in a Logic Diagram:

  1. Display the Logic diagram in Design mode (see Display a Logic Program in Design Mode).
  2. Select the Logic tab on the ViewX ribbon.
  3. Select Libraries in the Library command group to display the Libraries window.

    The Libraries window contains a list of the ST and Function Block Libraries that are available.

  4. Select the check boxes of those libraries that you want to reference in the Logic diagram. (Clear the check boxes for those libraries that are not required.)
  5. Select the OK button to confirm your selection and close the Libraries window.
  6. On the Logic diagram, right-click on the background of the diagram to display a context sensitive menu.
  7. Select the User Function Blocks option.
    A further menu is displayed. The further menu contains a list of the custom function blocks that you have created.
  8. Select the option for the function block that you require.
    A further option is displayed. The option has the same name as the custom function block.
  9. Select the option that has the same name as the required function block.
    The custom function block is added to your Logic diagram.

You can connect variables and constants to the inputs and outputs of the custom function block. To do this, you should use the same methods that you use to make connections to a built-in function block (see Built-In Function Blocks).


ClearSCADA 2015 R2