'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:
- 'Configuration'
- 'Published data sets'
- Data set name: Published data set
- Connection name: Connection
- Writer group name : Writer group
- Writer name : Writer
- Reader group name : Reader group
- Reader name : Reader
Note
The categories are structured hierarchically. New subcategories are added after you have defined a new data set. To expand a category, click the ![]() |
'Configuration'
'Connections' table
Table for configuring the communication connections. Each table row represents one connection.
Column | Description |
---|---|
Name | Name 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. |
Enabled | If marked, the connection is active for publishing/subscribing in the current project.If deactivated, the connection is idle. |
Network address | Multicast 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 interface | The 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 ID | Identifies 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.
Column | Description |
---|---|
Name | Identifies 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.
Column | Description |
---|---|
Variable | Variable/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. |
OPC UA Type | Data type according to the OPC UA specification. |
Type | Data 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.
Column | Description |
---|---|
Name | Identifies the writer groupAfter adding a writer group, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Publish'. |
Enabled | If 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 ID | Uniquely 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.
Column | Description |
---|---|
Name | Identifies the reader groupAfter adding a reader group, its name is added in the tree on the left border of the editor under 'Configuration > Connection name > Subscribe'. |
Enabled | If 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 : Connection > Publish' 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.
Column | Description |
---|---|
Name | Identifies 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 ID | Uniquely 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 set | Specifies 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". |
Writer name : Writer
This is a subcategory under the 'Configuration > Connection name : Connection > Publish > Writer group name : Writer' category. The subcategory is available for each writer which has been added in a writer group.
'Writers' table
This table contains the variables of the data set which has been selected for the current writer. You can delete variables or add new ones. The data set is also updated under 'Configuration > Published data sets'.
Column | Description |
---|---|
Variable | Variable/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. |
OPC UA Type | Data type according to the OPC UA specification. |
Type | Data 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 "Configuring the Controller as a Publisher". |
Reader group name : Reader group
This is a subcategory under the 'Configuration > Connection name : Connection > Subscribe' 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.
Column | Description |
---|---|
Name | Identifies 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'. |
Enabled | If 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 : Connection > Subscribe > 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
Column | Description |
---|---|
Source variable | Name of the source variable (i.e, subscribed variable in the published data set). |
Target variable | Clicking 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 Type | Data type according to the OPC UA specification. |
Type | Data 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". |