-

Configuring Connections for Publishing/Subscribing

This topic contains the following sections:

An OPC UA PubSub configuration consists of one or several communication connections into a specific network. A connection is specified by a Multicast address (field 'Network Address'), the controller's network adapter (field 'Network Interface') and a unique Publisher ID.

Each connection can contain several publishers and/or subscribers which write/read data. Each publisher/subscriber contained under a particular 'Connection' node in the configuration tree uses the defined connection settings.

Connections are to be edited in a grid where each row represents one connection.

How to add and specify a connection

  1. In the tree on the left, left-click the 'Configuration' root node.
  2. In the 'Connections' table of the configuration editor, click into the 'Name' field of the lowest, empty table row.

    A new connection with a default name is added.

    Click anywhere into the grid to accept the default name or edit it and press <Enter>.

    The connection is also added to the configuration tree.

  3. Keep the 'Enabled' checked if you want the connection to be active for publishing/subscribing in the current project.
    If you want this connection to be idle, deactivate the checkbox.

    Note
    In a deactivated connection all writer groups with all writers will be inactive, even if they are set to 'Enabled'.

  4. In the 'Network address' field, enter a valid 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
  5. In the 'Network interface' field, select 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.
  6. The Publisher ID uniquely 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.

    Note
    Using the combination of Writer ID, Writer group ID and Publisher ID, a subscriber identifies the publisher from which to read data.

Editing connection properties

The properties of connections can be displayed and edited in the 'Connections' table (on the 'Configuration' node) or on the properties page of a connection selected in the tree.

Example

Next steps

  Add writers (publishers) to a connection and assign data sets to a defined writer

  Add readers (subscribers) to a connection and map target variables to the variables read from a publisher