Methods contain program code that only runs when you call the method. It is similar to a function in PROCESS-PASCAL, that can have parameters and a result.
Program code in a method has direct access to parameters, local variables, component variables, and constants. However, methods differ from functions, as you can call them via P-NET.
A method can be internal, external or both.
You can call external methods from other components in the same device or via P-NET. External methods can't call methods in other components.
You can't call internal methods from other components, but they can call methods in other components.