-

Configuring the Controller as a Publisher

This topic contains the following sections:

Publishing means writing port/variable values to a defined network where they can be read by accordingly configured subscribers.

The addressed network is specified by the 'Network address' (Multicast address) which you have defined for a particular connection (see topic "Configuring Connections for Publishing/Subscribing"). For that reason writers have to be defined under a 'Connection' node, i.e., as child elements of the connection.

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.

How to add a new writer group

  1. Double-click the 'OPC UA' PLANT tree node and open the 'OPC UA PubSub' editor.
  2. In the tree on the left, open the 'Connection' under which you want to add writers and select the 'Publish' node.
  3. In the editor on the right, click into the 'Name' field of the lowest, empty table row.

    A new writer group with a default name is added.

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

    The group is also added to the tree structure.

  4. Keep the 'Enabled' checked if you want the group to be active for publishing in the current project.
    If you want the group to be idle, deactivate the checkbox.

    Note
    In a deactivated writer group all writers will be inactive, even if they are set to 'Enabled'. In addition, a writer group will be inactive even with the checkbox selected if the corresponding connection is not enabled.

  5. In the 'Publishing interval' field you have to define the time interval in which the writers in this group publish their data to the network.
  6. The 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.

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

  7. Continue with adding/specifying writers in this group.

Editing writer group properties

The properties of writer groups can be displayed and edited in the 'Writer groups' table (on the 'Publish' node) or on the properties page of a writer group selected in the tree.

Example

How to add a writer to a group and assign a data set

  1. In the tree on the left, open the 'Publish' folder and then select the required writer group.
  2. In the 'Writers' table of group editor, click into the 'Name' field of the lowest, empty table row.

    A new writer with a default name is added.

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

  3. Keep the 'Enabled' checked if you want the writer to be active for publishing in the current project.
    If you want it to be idle, deactivate the checkbox.

    Note
    A writer will be inactive even with the checkbox selected if the corresponding writer group or connection is not enabled.

  4. The 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.

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

  5. Assign a data set to the writer.

    In the 'Published data set' column, you must specify 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.

    Click into the field to open a drop-down list offering all previously defined data sets.

    According to the selected entry, the writer will publish the values contained in this data set in the defined publishing interval to the network specified in the connection settings.

    Note
    Data sets are reusable. They can be selected several times, i.e. published by several writers.

How to delete writer groups or writers

The deletion of entries is possible in the 'Writer groups' table of the 'Publish' tree node and in the 'Writers' table of a 'Writers group' node.

  1. Left-click into the table row to be deleted.
    Multi-selection can be done by pressing the <Ctrl> key or <Shift> key while clicking on the desired table lines. <Ctrl> + <A> selects all table lines.
  2. Press the <Del> key.