__POUNAME

__POUNAME 1:

Available from TC3.1 Build 4026.

The operator is an extension of the IEC 61131-1 standard.

The operator returns the name of the program organization unit (POU) containing the __POUNAME operator at runtime. To do this, the operator must be assigned to a variable of type STRING in the declaration part or in the implementation part.

The result of __POUNAME depends on where it is used:

Sample:

PROGRAM MAIN
VAR
    sPouNameDecl : STRING := __POUNAME();  //Liefert 'MAIN'
    sPouNameImpl : STRING;
END_VAR
sPouNameImpl:= __POUNAME();               //Liefert 'MAIN'