Array returned by functions or methods - Manual - AX2TIA - This package contains the documentation for ax2tia - Converting SIMATIC AX libraries to TIA Portal libraries,

AX2TIA CLI Tool (ax2tia)

Portfolio
SIMATIC AX
Product
AX2TIA
Software version
9.1.8
Edition
11/2024
Language
English (original)
Package Name
@ax/ax2tia-docs

Using an ARRAY of any type as return type will result in an error when trying to convert the library to a TIA Portal library.

Workaround: Use a variable in the OUTPUT-section instead.

FUNCTION Example : ARRAY[0..10] OF INT
    ;
END_FUNCTION

CLASS Exanple
    METHOD PUBLIC ReturnArray : ARRAY[0..1, 5..20] of INT
        ;
    END_METHOD
END_CLASS