Object: POU
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 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:
Current application
Library Manager of the current application
POUs view
Library Manager in the POUs view
Tip
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.
Tip
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
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: menu; context menu in the Devices view (when an application is selected); context menu in the POUs view
Name | Name of the POU |
Program | |
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 |