REF_TO - 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

The use of REF_TO in an AX library is transformed as closely as possible but there are some limitations in the TIA Portal that mean the original reference type cannot be retained. The following rules give an overview:

As function parameter:

AX TIA Portal
REF_TO <elementary> REF_TO <elmentary>
REF_TO <structure> REF_TO <structure>
REF_TO <elementary array or structure > REF_TO <elementary array or structure >
REF_TO <class or function block> disabled in FC; REF_TO BYTE in METHOD; hidden ARRAY [0..15] OF BYTE in FB
REF_TO ARRAY[*] OF <type> disabled in FC; REF_TO BYTE in METHOD; hidden ARRAY [0..67] OF BYTE in FB
REF_TO <array of class or function block or interface > disabled in FC; REF_TO BYTE in METHOD; hidden ARRAY [0..15] OF BYTE in FB
REF_TO ARRAY OF REF_TO <type> disabled in FC; REF_TO BYTE in METHOD; hidden ARRAY [0..15] OF BYTE in FB
ARRAY OF REF_TO <type> disabled in FC; REF_TO BYTE in METHOD; disabled in FB's INOUT section, otherwise hidden ARRAY OF BYTE in FB

If REF_TO is used as a persistent reference type e.g. a member of a class or a variable inside of a structure or a function block, a warning is logged and the member/variable is hidden in the TIA portal because persistent references are not supported for these use cases.