S7Plus Subscriptions

The WinCC OA S7Plus driver is able to subscribe to value changes on a PLC. Through this mechanism it is possible to receive unsolicited data from the PLC which means that actively polling data is not necessary. Each subscription is linked to a poll group in a 1:1 relationship.

Please consider that the number of variables within a subscription is limited by the used hardware, e.g. the CPU 1512 only supports up to 4000 elements.

Due to this reason it is recommended to only subscribe to values with a high change rate and track other values using a regular poll group.

The parameters of each created subscription are stored on the internal data point _S7PlusConfig.Subscriptions. Click on the S7+ Subscriptions button to open the following panel for creating and configuring subscriptions.

Figure 1. System management Driver S7 tab
Figure 2. Subscriptions panel

Add

Select one of the already existing poll groups from the combo box and click this button to add the poll group to the subscriptions available for the S7Plus driver. The selected poll group is converted to a subscription for the S7Plus driver.

The poll groups button opens the panel to create new poll groups or manage parameters of existing poll groups.

Create

Creates a new subscription.

Remove

Removes the currently selected subscription.

Table

Subscriptions

Name of the subscription.

Interval [ms]

Interval in milliseconds in which the PLC sends the data. Click on this cell to modify the time. The value applies to the poll time of the underlying poll group. Only poll times >= 100 ms can be configured.

Active

Enables the subscription.

Only Changes

The PLC sends data in the specified interval only for variables where the value has changed on the PLC.

For S7-1500 PLCs with firmware >= 2.6 the UTC timestamp for subscribed variables is taken directly from the PLC. For PLCs with older firmware versions or S7-1200 devices the timestamp is still generated in the driver.

The S7Plus driver implements a fallback mechanism. If registering the subscription on the PLC fails the driver automatically switches to polling using the poll group linked to the respective subscription.

A poll group must not be used for polling and as subscription at the same time. For example, the poll group PG1 is used for an address with receive mode "Subscriptions", you must not use this poll group for an address with receive mode "Polling".

When using subscriptions for large amounts of data (e.g. arrays of STRING variables), error messages like the following may arise: If an active subscription subscribes to invalid data, error messages like the following may arise:

WCCOAs7plus (1), 2017.11.14 09:45:51.289, PARAM , SEVERE, 54, Unexpected state, NotificationHandler, handle_notification, Invalid value retrieved for subscription. Access denied = 0, Out of memory = 1, Status = 18

"Out of memory = 1" means that the subscription is used for too large amounts of data (e.g. arrays of STRING variables or strings with maximum length). In this case, you have to deactivate the subscription and use polling for the concerning addresses.

"Access denied = 1" means that an address cannot be read by an HMI.