IEC Symbol Set Configuration
For the configuration of IEC symbols for the exchange with other controllers, CODESYS Communication provides the new IEC Symbol Publishing object with a new editor for the configuration of IEC symbols for the exchange with other controllers. The previous Symbol Configuration Editor is still available, but it should no longer be used if possible.
You can insert multiple objects to configure different symbol sets for different purposes. Individually assign the object names accordingly. A folder with the assigned name is created in the OPC UA Server for each symbol set. The folder contents are then displayed in the OPC UA Client.
Creating and configuring a symbol set
Requirement: You have a project with IEC variables and IEC data types. You want to exchange a specific set of variables as symbols with other OPC UA Clients via an OPC UA Server. For the following instructions: To control the publication, you have also created a data source of type OPC UA in the project. See here: Establishing the Connection of a Data Source OPC UA Client to an OPC UA Server.
In the following, you create the required symbol configuration for a symbol set in the editor of an object of type IEC Symbol Publishing:
Click Add Object to add a Communication Manager below the application.
Add an OPC UA Server below the communication manager.
Add an IEC Symbol Publishing object below the OPC UA Server and rename the object (for example, "webvisu", or "client xy", depending on the intended use of the symbol set to be configured).
Double-click the symbol publishing object to open the editor.
Below Precompile Sets in the left part of the window, the variables and types which are currently supported in the project for publishing are listed.
Select one or more variables or a POU containing variables and drag the selection to the right part of the window.
The variable(s) are inserted into the table.
Configure all desired variables in the table for export as symbols. If necessary, assign a different symbol name and set the access rights. When assigning the access rights, note the Use access rights defined in the user management option at the top of the editor. When this option is selected, the rights assigned in the user management of the controller for the symbol set are also considered in addition to the access rights set here in the editor. The stronger restriction is applied.
If you have structured data types in the project, then on the Symbol Type Editor tab you can make a specific symbol configuration for different variants of the type:
For example, on the Symbol Type Editor tab, drag a POU of type
STRUCT
to the table on the right side of the window. Click thebutton to open the Data type members of <STRUCT> dialog.
Select the members of the <STRUCT> POU to be exported as symbols and configure accordingly. Close the dialog.
Option: On the Symbol Type Editor tab, drag the same POU of type
STRUCT
to the table a second time and configure it with the corresponding name as a "variant" of the first one.In the project, change something in the declaration of the
STRUCT
type, for example, add another member. Then clickRefresh in the symbol editor.
An icon
is displayed at the corresponding entry in the table. In the tooltip of the icon, you will be prompted to click the
button to resynchronize between the editor and the project.
Click the
button.
The Data type members of<STRUCT> dialog opens and by clicking
the editor and project are synchronized again. The new member is added to the configuration table.
When the symbol configuration is finished, log in to the controller and open the data source object created for OPC UA to check the symbols for publishing.
On the Tab: Variables, you can see the symbol set(s) with the variables and types you have defined as symbols.
Using the symbol set to publish an alarm group via OPC UA
Requirements:
A symbol set has been created and configured.
The application contains an alarm configuration with at least one alarm group.
The alarm group contains alarms with the
ACK_REP
acknowledgement method.
In the device tree, double-click the already configured symbol set of the OPC UA Server object below the Communication Manager object.
The symbol set opens in the editor.
Open the Alarm Group Editor tab.
The alarm groups of the application are displayed in the Alarm Groups area on the left. Use the mouse to drag the desired alarm group from this area to the Alarm Groups area on the right.
If the alarm group contains alarms which cannot be published via OPC UA because their acknowledgement method is not
ACK_REP
, then this is displayed in the tooltip.When you click the Export button, a file in
*.json
or*.csv
format is exported containing information about the alarms which are available via OPC UA.