EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Attribute symbol

Overview

The pragma {attribute 'symbol'} defines which variables are to be handled in the symbol configuration.

The following export operations are performed on the variables:

oVariables are exposed as symbols in the symbol configuration.

oVariables are exported to an XML file in the project directory.

oVariables are exported to a file not visible and available on the target system for external access, for example, by an OPC server.

Variables provided with that attribute will be downloaded to the controller even if they have not been configured or are not visible within the symbol configuration editor.

NOTE: The symbol configuration has to be available as an object below the respective application in the Tools Tree.

Syntax

{attribute 'symbol' := 'none' | 'read' | 'write' | 'readwrite'}

Access is only allowed on symbols coming from programs or global variable lists. For accessing a symbol, specify the symbol name completely.

You can assign the pragma definition to particular variables or collectively to all variables declared in a program.

oTo be valid for a single variable, place the pragma in the line before the variable declaration.

oTo be valid for all variables contained in the declaration part of a program, place the pragma in the first line of the declaration editor. In this case, you can also modify the settings for particular variables by explicitly adding a pragma.

The possible access on a symbol is defined by the following pragma parameters:

o'none'

o'read'

o'write'

o'readwrite'

If no parameter is defined, the default 'readwrite' will be valid.

Example

With the following configuration, the variables A and B will be exported with read and write access. Variable D will be exported with read access.

{attribute 'symbol' := 'readwrite'}
PROGRAM PLC_PRG
VAR
A : INT;
B : INT;
{attribute 'symbol' := 'none'}
C : INT;
{attribute 'symbol' := 'read'}
D : INT;
END_VAR