Operator ‘__POUNAME’ΒΆ

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:

Example

PROGRAM PROG1
VAR
        strPOU : STRING := __POUNAME();  //Yields 'PROG1'
        strlocalPOU : STRING;
END_VAR

        strlocalPOU := __POUNAME();     //Yields 'PROG1'