-

'PubSub' Editor (OPC UA)

The following information refers to a specific, typical device type. Your screen may differ.

This help topic describes the 'PubSub' editor of the 'OPC UA' PLANT node. In the 'PubSub' editor you can configure the OPC UA PubSub communication. The compiler checks the entered configuration values for validity. For an error-free configuration, the compilation results in a binary output file according to the OPC UA standard.

Further Info
Details, procedures as well as applicable configuration rules can be found in the help chapter "OPC UA PubSub Communication".

On the left side on the 'PubSub' page, several editor categories can be selected. These are described below in detail.

This topic contains the following sections:

Note
The categories are structured hierarchically. New subcategories are added after you have defined a new data set. To expand a category, click the icon of the entry.

'Server'

Here you can browse remote OPC UA servers for importing external OPC UA PubSub configurations into the current project. This import mechanism can be used to retrieve the information model from an OPC UA server and add it to the current project without the need to manually create it.

To read out the information model provided by the server, the OPC UA client (PLCnext Engineer in our case) connects to the server via the URL of the started OPC UA server and reads the data.

ColumnDescription
NameName that identifies the server connection that is used for the data exchange.
URLEndpoint URL of the OPC UA server to connect to (default: opc.tcp://hostname.de:4840). The client uses the URL to find and connect to the OPC UA server. The format is as follows:

opc.tcp://IpAddress:Port

or

opc.tcp://hostname:Port

Optionally the port can be specified. If omitted, the default OPC UA discovery port 4840 is used.

Note
Currently, only the endpoint type opc.tcp is supported.

Security modeSecurity mode used to connect to the OPC UA server. The security mode defines the level of security for the data being exchanged during client-server communication. You can choose one of the following modes:

  • 'None' - No security is applied. Data are exchanged unsecure.
  • 'Sign' - Data are signed but not encrypted.
  • 'Sign and Encrypt' - Data are signed and encrypted.
Security policy urlSecurity policy url used to connect to the OPC UA server. The security policy describes various algorithms and key lengths which are used to establish a secure connection between server and client. In accordance with the OPC UA specification, you can choose one of the following security policies (from top to bottom, the encryption and signature strength increases):

  • 'None' - No security is applied.
  • 'Basic 128 RSA15'
  • 'Basic 256'
  • 'Basic 256 SHA256'
  • 'AES 128 SHA256 RSA OAEP'
  • 'AES 256 SHA256 RSA PSS'
  • 'Best available' - Best available security policy provided by the OPC UA server is used.

Further Info
See also the 'Security Policies' descriptions in the "OPC UA Security Settings" topic.

Further Info
See the topic "Importing External PubSub Configurations from Remote Servers" for further details.

'Configuration'

'Connections' table

Table for configuring the communication connections. Each table row represents one connection.

ColumnDescription
NameName that identifies the communication connection that is used for the data exchange. Each connection can contain several publishers and/or subscribers which write/read data.
EnabledIf marked, the connection is active for publishing/subscribing in the current project.

If deactivated, the connection is idle.
Network addressMulticast address with OPC UDP protocol as prefix (opc.udp://) and followed by a valid port number (4840 by default).
Default value for the first connection: opc.udp://239.0.0.1:4840
Network interfaceThe local network adapter of your controller. If the IP settings of the PLCnext Technology controller in your project is already configured ('Project | IP Subnet' editor), it can be selected in the drop-down list.
Publisher IDIdentifies the connection within the configuration. The number is assigned automatically after insertion and can be modified. Keep in mind that Publisher IDs must be unique within one configuration. The ID 0 is not allowed.

'Published data sets'

This is a subcategory under the 'Configuration' category.

Ports and variables to be published into the network are organized as so-called data set. Or said the other way around: a data set is a collection of publishable ports/variables. In this table you can add and configure data sets to be published by a writer.

ColumnDescription
NameIdentifies the data set to be published.
After defining a new data by entering a data set name, a new subcategory is added under 'Published data sets' in the tree on the left.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Defining Data Sets to be Published".

Data set name: Published data set

This is a subcategory under the 'Configuration > Published data sets' category.
The subcategory is available for each data set which has been added in the category 'Published data sets'. Ports and variables to be published into the network are organized as so-called data set. Or said the other way around: a data set is a collection of publishable ports/variables.
Data sets are reusable. They can be selected several times, i.e., published by several writers.

'Variables' table

In the 'Variables' table you can add ports/variables to a data set.

ColumnDescription
VariableVariable/port to be published.
The drop-down list offers all OUT ports and global IEC variables defined in the project for selection.
Only elementary data types and one-dimensional arrays of an elementary data type are supported.
Target variableOptional variable name used as published alias name of the local project variable.
OPC UA TypeData type according to the OPC UA specification.
TypeData type according to the IEC 61131-3 standard.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Defining Data Sets to be Published".

Connection name: Connection

This is a subcategory under the 'Configuration' category. The subcategory is available for each connection which has been added in the category 'Configuration'.

'Publish' table

Publishing means writing port/variable values to a defined network where they can be read by accordingly configured subscribers. The 'Publish' table contains the publishers in the project which are referred to as writers. Writers are organized in so-called writer groups. Each connection may contain one or several writer groups. A group, in turn, can contain one or more writers. Which data a writer publishes to the network is defined by selecting a previously defined data set.

ColumnDescription
NameIdentifies the writer group

After adding a writer group, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Publish'.
EnabledIf marked, the writers in this group are active in the current project.

If deactivated, the writer group is idle.
Publishing interval [ms]Time interval in which the writers in this group publish their data to the network.
Writer group IDUniquely identifies the writer group within the connection (which in turn is identified by its Publisher ID). The number is assigned automatically after insertion and can be modified. Keep in mind that group IDs must be unique within one connection. The ID 0 is not allowed.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Configuring the Controller as a Publisher".

'Subscribe' table

Subscribing means reading data sets (values) from a defined network to which these values have been written by accordingly configured publishers. The network from which data is read is specified by the 'Network address' (Multicast address). You defined this network address when you created the particular connection. The 'Subscribe' table contains the subscribers in the project which are referred to as readers. Readers are organized in so-called reader groups. Each connection may contain one or several reader groups. A group, in turn, can contain one or more readers.

ColumnDescription
NameIdentifies the reader group

After adding a reader group, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Subscribe'.
EnabledIf marked, the reader group is active in the current project.

If deactivated, the reader group is idle.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Configuring the Controller as a Subscriber".

Writer group name : Writer group

This is a subcategory under the 'Configuration > Connection name' category. The subcategory is available for each writer group which has been added for a connection.

'Writers' table

This table contains the writers of the writer group marked in the tree structure on the left. You can add new writers, specify a writer ID and select the (previously defined) data set the writer will publish.

ColumnDescription
NameIdentifies the writer.

After adding a writer, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Publish > Writer group name : Writer group'.
Writer IDUniquely identifies the writer within the group. The number is assigned automatically after insertion and can be modified. Keep in mind that this Id must be unique within the configuration. The ID 0 is not allowed.
Published data setSpecifies the data set, the writer should publish to the network. Note that the default name entered here is only suitable if you have also accepted the defaults when creating data sets.

The drop-down list offers all previously defined data sets.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Configuring the Controller as a Publisher".

Reader group name : Reader group

This is a subcategory under the 'Configuration > Connection name' category. The subcategory is available for each reader group which has been added for a connection.

'Readers' table

This table contains the readers of the reader group marked in the tree structure on the left. You can add new readers and define from which publisher (writer) it will read.

ColumnDescription
NameIdentifies the reader.

After adding a reader, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Subscribe > Reader group name : Reader group'.
EnabledIf marked, the reader is active in the current project.

If deactivated, the reader is idle.
Publisher ID
Writer group ID
Writer ID
Identifies the publisher from which data is to be read.

Using the combination of Writer ID, Writer group ID and Publisher ID, the subscriber identifies the publisher from which to read data.
On insertion, Publisher ID and Writer group ID are set to 0 (the read-only Writer ID is set to 0 by default). Enter the Ids which have been specified for the writer in the publishing controller.
Message receive timeout [ms]If this interval is exceeded without receiving data from the specified publisher, a notification is output in the controller Cockpit (category 'Notification').

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Configuring the Controller as a Subscriber".

Reader name : Reader

This is a subcategory under the 'Configuration > Connection name > Reader group name : Reader Group' category. The subcategory is available for each reader which has been added to a reader group.

'Variables' table

This table contains the mappings of the reader marked in the tree structure on the left.
Here, you must map the values read from a publisher to target variables declared in the current project.

Rules for mapping target variables

ColumnDescription
Source variableName of the source variable (i.e, subscribed variable in the published data set).
Target variableClicking into the field opens a drop-down list offering all suitable target variables (IN ports and globals) which are defined in the project.
OPC UA TypeData type according to the OPC UA specification.
TypeData type according to the IEC 61131-3 standard.

You can modify the order of inserted variables by dragging & dropping them within the table: click and hold an entry in the row header.

Further Info
Details and a step-by-step procedure as well as configuration rules can be found in the topic "Configuring the Controller as a Subscriber".