The operator is an extension of the IEC 61131-1 standard.
At runtime, the operator yields the name of the POU that contains the operator __POUNAME
. The result is of type STRING
.
The result of __POUNAME
depends where it is used:
-
In a program: program name
-
In a function name: function name
-
In a function block: function block name
-
In a method: the method name qualified with the FB name
-
In a Get/Set accessor of a property: the property name + Get/Set qualified with the FB name
-
In a GVL: GVL name
-
In a structure: structure name
-
In a data structure
UNION
: union name
Example
PROGRAM PROG1 VAR strPOU : STRING := __POUNAME(); //Yields 'PROG1' strlocalPOU : STRING; END_VAR strlocalPOU := __POUNAME(); //Yields 'PROG1'