Symbol:
Keyword: METHOD
Methods are an extension of the IEC 61131-3 standard and a tool for object-oriented programming which is used for data encapsulation. A method contains a declaration and an implementation. However, unlike a function, a method is not an independent POU, and it is subordinated to a function block or program. A method can access all valid variables of the superordinate POU.
You can add a method below a program or a function block. Click “Project Add Object Method”. Then the “Add Method” dialog opens.
You can use interfaces for the organization of methods.
For more information, see: ⮫ “Implementation of an Interface ”




NOTICE

When you copy a method below a POU and add it below an interface, or move the method there, the contained implementation is removed automatically.
-
Declaration
-
Implementation
-
Calling a Method
-
Recursive method call
-
Special methods of a function block
-
Dialog: “Add Method”
-
Input support when generating inheriting POUs