You are here: Core Reference > Coding > Logic > Edit a Function Block Library

Edit a Function Block Library

When you have added a Function Block Library database item, you can edit it so that it contains the Logic that defines the functionality of your custom function block.

To edit a Function Block Library:

  1. Display the Database Bar (see Display an Explorer Bar in the ClearSCADA Guide to ViewX and WebX Clients).
  2. In the Database Bar, right-click on the Function Block Library item to display a context sensitive menu.
  3. Select the Edit Function Block Library option to display the Function Block Library Editor display. This window works in the same way as the Function Block Diagram display—it has a section for defining the variables, a design section for creating the Function Block Library, and a compiler section for checking the syntax.

    NOTE: As an alternative to steps 1 and 2, you can double-click on the Function Block Library item to display it in Design mode.

  4. Create the Logic for the custom function block by adding variables, constants, functions, and function blocks in the same way that you would create a Function Block Diagram. For further information, see Function Block Diagrams and Built-in Functions, Function Blocks, and Conversions.
  5. Use the compile tools to check the syntax of the Function Block Library (see Compiling a Function Block Diagram or Function Block Library).
  6. Save the Function Block Library.

When you save the Function Block Library and reference it in a Logic diagram, the function block library will appear as a graphical representation of the function block—it will have input and output connections and will provide the Logic functionality that you have defined. Obviously, if you reference the Function Block Library in an ST program, you will not see the graphical representation of the Function Block Library.

When you have saved the Function Block Library, you can reference it in other Logic programs. For more information, see Reference an ST Library or Function Block Library in a Logic Diagram and Reference an ST Library or Function Block Library in an ST Program.


ClearSCADA 2015 R2