4. Configuration
126
 {attribute 'symbol' := 'read'} – when the attribute value is ‘read’, the variables will be available to
the OPC Server with read only access right.
 {attribute 'symbol' := 'write'} – when the attribute value is ‘write’, the variables will be available
to the OPC Server with write only access right.
 {attribute 'symbol' := 'readwrite'} – when the attribute value is ‘read’, the variables will be
available to the OPC Server with read and write access right.
In the following example of variable declaration, the variables A and B settings allow that an OPC
Server access them with read and write access. However the variable C cannot be accessed, while the
variable D can be accessed with read only access rights.
{attribute 'symbol' := 'readwrite'}
PROGRAM MainPrg
VAR
A: INT;
B: INT;
{attribute 'symbol' := 'none'}
C: INT;
{attribute 'symbol' := 'read'}
D :INT;
END_VAR
When a variable with a type different from the basic types is defined, the use of the attribute must be
done inside the declaration of this DUT and not only in the context in which the variable is created.
For example, in the case of a DUT instance inside of a POU or a GVL that has an attribute, it will not
impact in the behavior of this DUT instance elements. It will be necessary to apply the same access
right level on the DUT declaration.
ATTENTION:
The configurations of the symbols that will be provided to the OPC Server are stored inside the PLC
project. By modifying these configurations it’s necessary to load the application on the PLC so that
it’s possible to access those variables.
ATTENTION:
When a variable is removed from the project and loaded on the PLC unchecking it from the object
Symbol Configuration, the variable can no longer be read with the OPC Client. If the variable is
added again to the project, with the same name and same context, and inserted on the object Symbol
Configuration, it will be necessary to reboot the OPC Client to refresh the variable address
reference, which will be created on a different memory area of the PLC.
Configuring a PLC on the OPC Server
The configuration of the PLC is done inside MasterTool IEC XE through the option available in the
Online menu. It’s necessary to run MasterTool IEC XE as administrator.