Attribute 'TcNoSymbol' / 'tc_no_symbol'

The pragma can be used to specify that no (ADS) symbol is generated for a variable. In other words, symbolic access is prevented. If the value "unused" is assigned to the pragma, the pragma acts only for variables that are not used.

Note that variables declared with the attribute 'TcNoSymbol'/'tc_no_symbol' cannot be stored persistently. Furthermore, the generation of the associated process image (allocated inputs/outputs) is prevented for variables for which no (ADS) symbol is generated.

Syntax: {attribute 'tc_no_symbol'} or {attribute 'TcNoSymbol'}
(The notation 'TcNoSymbol' is only available with TwinCAT version 3.1.4022 or higher.)

Insertion location: Line above the declaration line of a variable

Samples:

VAR_GLOBAL
    {attribute 'tc_no_symbol'}
    nVar1  : INT;
    {attribute 'tc_no_symbol'}
    var2   : OTCID;
END_VAR

Or, for the new notation since TwinCAT version 3.1.4022:

VAR_GLOBAL
    {attribute 'TcNoSymbol'}
    nVar1  : INT;
    {attribute 'TcNoSymbol':= 'unused'}
    var2   : OTCID;
END_VAR