Access modifier - 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 the example below, the access modifiers will be omitted on converting the library to a TIA Portal library. A warning will be issued for the 'ExampleInternal' function, for the 'varReal' and 'varInt' variables of the 'Example' class and for each of the 'ExampleStruct1' and 'ExampleStruct2' type declarations using the modifier INTERNAL.

NAMESPACE ExampleLibrary
    FUNCTION PUBLIC ExamplePublic
        ;
    END_FUNCTION

    FUNCTION INTERNAL ExampleInternal       // Warning for Function
        ;
    END_FUNCTION

    CLASS Example
        VAR INTERNAL                        // Warning for each member
            varReal : REAL;
            varInt : INT;
        END_VAR
    END_CLASS

    TYPE INTERNAL                           // Warning for each type declaration
        ExampleStruct1 : STRUCT
            memberWord : WORD;
        END_STRUCT;
        ExampleStruct2 : STRUCT
            memberDint : DINT;
        END_STRUCT;
    END_TYPE
END_NAMESPACE

NOTICE

Note that access modifiers are omitted during export. This may unintentionally expose functionality that is supposed to be hidden.