Creating a call of a block by dragging from project explorer

How to create a →call of a →block in the →graphical FBD-editor by dragging the block from the project explorer:

  1. Expand the ST-object or the FBD-object in the project explorer.

  2. Point to one of the following sub-level items.
    (The sub-levels of the ST-objects and the sub-level of the FBD-object display an icon each to identify the declaration type)

    Icon

    Type

    a function block

    (info) Such a function block that is declared in ST may even implement →interfaces and/or contain →methods.

    a function

    However, it is not possible to drag the following language elements into the FBD-editor. Hence, it is not possible to create a call of them within the FBD-editor.

    • →classes

    • interfaces

    • methods

    • derived function blocks (= function blocks using the keyword EXTENDS)

    • abstract function blocks (= function blocks using the keyword ABSTRACT)

  3. Press and hold the primary mouse button while you are dragging the block into the opened FBD-editor.

  4. Position the call in the FBD-editor by releasing the primary mouse button. The call is created for a block, if it is possible in the context of the opened FBD-editor (see glossary items →program→function block and →function for more information).
    During this user action, it is possible that affected lines are automatically rerouted.  If the positioned element is presented with a red rectangle, the destination is not possible. Press the ESC-key, if you do not want to position the element and abort the action.
    (info) It is possible to insert the call of the block into existing lines, if you press and hold the Ctrl-key as well as the Shift-key while dragging the block.

An alternative to dragging the block from the project explorer is the Content Assist