Dialog: Add POU Permalink

Function: The dialog is used to configure a new POU according to the IEC 61131-3 standard. This means that a POU can be a program, a function, or a function block.

Call: “Project  Add Object” menu; context menu in the “Devices” view (when an application is selected); context menu in the “POUs” view

“Name”

Name of the POU

Table 614: Type

“Program”

“Function block”

  • _cds_icon_option_activated.png “Extends”: Specification or selection of a base function module based on the idea of object-oriented programming

    Specified with the ⮫ EXTENDS keyword in the function block declaration

  • _cds_icon_option_activated.png “Implements”: Specification or selection of an interface based on the idea of object-oriented programming

    Specified with the ⮫ IMPLEMENTS keyword in the function block declaration

    When the POU is created, all methods are created which are defined via the interface.

  • _cds_icon_option_activated.png “Final”: Derived access is not permitted. This means that you cannot extend the function block with another function block. This allows for optimized code generation.

  • _cds_icon_option_activated.png “Abstract”: Identifies that the function block has a missing or incomplete implementation and cannot be instantiated

    Abstract FBs are used exclusively as base function blocks and the implementation typically occurs in a derived FB. If a non-abstract function block is created, which in turn extends an abstract function block, then all abstract methods of the abstract basic function block are added to the new function block as (non-abstract) methods.

  • “Access specifier”

    • “PUBLIC”: Corresponds to the specification of no access specifier

    • “INTERNAL”: Access to the function block is restricted to the namespace (library).

  • “Method implementation language”: When you select the “Implements” option, you can select an implementation language here for all method objects that CODESYS generates by means of the implementation of the interface.

    The “Method implementation language” does not depend on the implementation language of the function block.

“Function”

Note: Not available when “Sequential Function Chart (SFC)” is selected as the “Implementation language”.

“Return type:”: Data type of the return value

“Implementation language”

Implementation language of the POU