For providing symbols to an OPC UA Server, we recommend using the Communication Manager with the new configuration editor () for CODESYS CODESYS 3.5 SP18 and higher.
The symbol configuration described on this page is outdated and should no longer be used.
Use the symbol configuration to prepare symbols with specific access rights for project variables. You can use these symbols to access the variables externally.
When generating code, CODESYS also generates a symbol file (*.xml) which includes the description of the symbols.
The symbol file is stored in the project directory. The name of the symbol file is
composed as follows: <project name>.<device name>.<application name>.xml
Example
proj_xy.PLC1.application.xml
You can also generate the symbol file with the “Generate Code” command. This is very useful when downloading to the PLC is not possible.
The variables that you export as symbols can be bundled in the ⮫ symbol configuration editor or defined in the variables declaration using the {attribute 'symbol'}
pragma. Another option is using the element in the SFC editor, where you can define
the implicitly generated element variables that should be exported to the symbol configuration.
For more information, see: ⮫ SFC Element Properties
The name of the symbol is generated in the symbol configuration in the following syntax:
<application name>.<POU name>.<variable name>
. When accessing the variable, you always have to provide the complete symbol name
in this syntax.
Example
MyApplication.PLC_PRG.a
or MyApplication.SymFB.a
As a rule, read-only access applies to symbols for input addresses and for variables that are mapped to input channels. Write access is possible for testing purposes in simulation mode only.
The symbol file is downloaded together with the application to the PLC. Depending on the device description, this file can be generated as an additional (child) application. This application is then listed on the ⮫ Applications tab of the device editor.
Syntax: <application name>._Symbols
The symbol application is regarded as a "normal" application with respect to the maximum number of applications on the PLC.
If the controller has a user management, then you can assign different access rights to a symbol to the individual user groups (clients). To do this, place the same symbol in different symbol sets and allow the individual user groups (clients) either to access a symbol set or not. An on-site operator or an operating data record, for example, receives more information and access to the same symbols as remote maintenance.




NOTICE

When attribute pragmas are used for POUs and variables, the behavior of these POUs and variables can change with respect to the symbol configuration.
For more information, see: ⮫ Attribute Pragmas – Effects on symbols
-
See also: ⮫ {attribute 'symbol'}
-
Creating a symbol configuration
-
Creating symbol sets with different access rights for different control clients