Introduction

FFB is the generic term for:

  • Elementary Function (EF)

  • Elementary Function Block (EFB)

  • Derived Function Block (DFB)

  • Procedure

    (Procedures are an expansion to IEC 61131-3 and must be enabled explicitly in the Tools > Project Settings dialog box, on the Languages > Common tab by selecting the Allow procedures checkbox).

FFBs can be placed in any free space.

If an FFB is to be placed in an area that is already occupied by an object (contact, coil, other FFB, link), an error message is returned.

For more information, refer to chapter Elementary Functions, Elementary Function Blocks, Derived Function Blocks and Procedures (FFBs).

Declaring block instances

Function blocks (elementary and derived) have internal states. If the inputs have the same values, the value on the output can have another value during the individual executions of the function block. For example, with a counter the value on the output is incremented.

The instance name serves as a unique identification for the function block in a project.

Instances can be declared:

  • By selecting a function block type and its placement in a section.

  • By the declaration of the block instance in the FFB input assistant and its placement in the section.

  • By the declaration of the block instance in the Data editor.

Calling FFBs

FFBs can be called in the following ways:

  • Via the FFB Input Assistant menu command

    • Use the Edit > FFP input assistant... menu command.

    • Use the menu command FFB Input Assistant... in the shortcut menu.

      or

    • Press the Ctrl+I key combination.

  • Via the data selection

    • Use the menu command Edit > Data Selection.

    • Use the menu command Data selection... in the shortcut menu.

    • Press the Ctrl+D key combination.

      or

    • Select the symbol.

  • Via the Types library browser per drag & drop

    • Use the Tools > Types Library Manager menu command.

      or

    • Press the Alt+3 key combination.

NOTE: Timers and counters EFB can be called directly via the LD Instruction Bar. You can also customize the LD toolbar to call directly a maximum of 20 EF, EFB or DFB via the LD Favorite Toolbar.