Symbol:
An object of type “POU” is a "programming organization unit" in a CODESYS project. Source code for your controller program is written in POUs.
There are following POU types:
You add a “POU” in the device tree or in the “POUs” view by means of the “Project Add Object” command. When adding a POU, you specify the POU type and the implementation language.
You can also add other programming objects (method, action, etc.) to these objects.
Calling POUs
Certain POUs can call other POUs. Recursions are not permitted.
When calling POUs by means of the namespace, CODESYS scans the project for the POU to be called by the following order:
- 1
-
Current application
- 2
-
“Library Manager” of the current application
- 3
-
“POUs” view
- 4
-
“Library Manager” in the “POUs” view
If you want to call a POU which exists with the same name in a library used in the application and as an object in the “POUs” view, then the following applies: There is no syntax that allows you to call the POU in the “POUs” view only by its name. In this case, you have to move the library from the Library Manager of the application to the Library Manager of the project (in the “POUs” view). After that, you can call the POU object in the “POUs” view simply by its name. When you add the namespace to the library, you can call the POU of the library.
The term "POU" is also used in CODESYS for the “POUs” view where CODESYS manages the objects which are valid throughout the project.
-
Dialog: Add POU
-
Object: Program
-
Object: Function Block
-
Object: Function
-
Object: Interface
-
Object: Method
-
Object: Interface Method
-
Object: Interface Property
-
Object: Property
-
Object: Action
-
Object: Transition