S7-1500 OPC UA Server: Publishing vs Sampling Intervals

David Krause12 min read
OPC / OPC UASiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

S7-1500 OPC UA Server: Publishing Interval vs Sampling Interval in TIA Portal

The S7-1500 family exposes its process data through an embedded OPC UA server whose subscription behavior is controlled by two distinct intervals: the sampling interval and the publishing interval. Many engineers who instrument the server with a Java/.NET SDK or a SCADA client discover that the rate at which MonitoredItem notifications actually arrive on the wire does not match the rate requested by the client. This reference explains the underlying OPC UA architecture, the way the SIMATIC S7-1500 enforces server-side limits, and the exact TIA Portal parameters that govern the negotiation between OPC UA clients and the PLC.

1. Problem Statement

A typical field report (S7-1511F-1PN, firmware V2.9.4, TIA Portal V17) describes the following behavior:

  • OPC UA server enabled on the CPU, default SIMATIC server interface disabled.
  • Several DB variables and methods exposed.
  • Java client built with the Prosys OPC UA SDK in reporting mode.
  • Client requests a publishing interval of 500 ms.
  • Server reports a minimum publishing interval of 500 ms and a minimum sampling interval of 100 ms in TIA Portal.
  • Notifications arrive on the client approximately every 1000 ms, not 500 ms.

The discrepancy is not a bug. It is the documented outcome of the subscription negotiation that the OPC UA specification requires the server to perform. To control the result, the engineer must understand both the protocol and the S7-1500 server implementation.

2. OPC UA Subscription Architecture

OPC UA subscriptions are described in Part 4 of the specification. The relevant services are CreateSubscription, ModifySubscription, DeleteSubscriptions, CreateMonitoredItems, and Publish. Three time parameters govern the flow of data, and they are not interchangeable.

2.1 Sampling Interval

The SamplingInterval parameter of a MonitoredItem defines "the fastest rate at which the Server should sample its underlying source for data changes," per OPC 10000-4 §5.13.1.2. The server may revise the value upward; the revised value is returned to the client in the CreateMonitoredItems response. Sampling happens inside the server, on the data source (here, the cyclic process image of the S7-1500). It does not generate network traffic by itself.

2.2 Publishing Interval

The PublishingInterval parameter of a Subscription defines how often the server is allowed to send a Publish response to the client. It is the rate at which NotificationMessages leave the server. A single Publish message can carry the notifications of many MonitoredItems that belong to the same subscription.

2.3 Keep-Alive Count and Lifetime Count

The server guarantees a Publish response at least once every KeepAliveCount × PublishingInterval, even if no data has changed. The LifetimeCount declares how many consecutive missed Publish responses the client tolerates before it deletes the subscription. These two counters depend directly on the PublishingInterval and therefore on what the server is willing to negotiate.

2.4 Relationship

The publishing interval is always greater than or equal to the sampling interval. A subscription typically has one publishing interval and many monitored items, each with its own sampling interval. The relationship is enforced both by the spec and by the SIMATIC implementation:

SamplingInterval_item  ≤  PublishingInterval_subscription  ≤  Server_Revised_PublishingInterval

3. How the S7-1500 Enforces Server-Side Limits

The S7-1500 OPC UA server exposes two server-side parameters through TIA Portal under Properties → OPC UA Server → Subscription Settings:

Parameter Meaning in TIA Portal Effect on client request
Minimum sampling interval Floor for any MonitoredItem.SamplingInterval. If client requests < configured value, server returns the configured value (or higher).
Minimum publishing interval Floor for Subscription.PublishingInterval. If client requests < configured value, server returns the configured value (or higher).

According to the official Siemens TIA Portal documentation, "the settings in the OPC UA Server in S7-1500 are only a limitation for the client's intervals to protect from communication overload." In other words, the CPU uses these values as lower bounds; they do not force a faster cycle. The client can request a faster cycle, but the server will revise the request upward to the minimum it advertises.

4. Negotiation Rules: Why 500 ms Becomes 1000 ms

The S7-1500 server follows the OPC UA rule that PublishingInterval is revised to the maximum of the client request and the server's MinimumPublishingInterval. The same rule applies to SamplingInterval and MinimumSamplingInterval. This is confirmed by Siemens support entry ID 59192925: "If the OPC UA client requests an update every 100 ms, the server will still only send a message every 200 ms (minimum publishing interval)."

However, the field report shows the opposite direction: a 500 ms client request becomes a 1000 ms publish, even though the minimum is configured at 500 ms. The most common reasons for an upward revision beyond the configured minimum are listed below.

4.1 Firmware Revision Caps

Firmware V2.9.x on the S7-1500 family can impose its own internal floor on the publishing interval regardless of the configured value. Newer firmware releases (V20 in the TIA Portal cloud docs example) recommend a 250 ms minimum sampling interval and a 200 ms minimum publishing interval; older firmware may enforce coarser steps, typically aligned to 1 s, on smaller CPU variants such as the S7-1511(F).

4.2 CPU Class and Subscription Count

The S7-1511F has the lowest OPC UA performance budget in the S7-1500 line. The server adjusts the effective minimum publishing interval based on the number of active subscriptions, the number of monitored items, and the current CPU load. This is the "communication load protection" the server performs automatically. A value of 1000 ms is consistent with the S7-1511F-1PN running a non-trivial subscription load.

4.3 Subscription Granularity

Some firmware revisions align the negotiated publishing interval to the next legal step (e.g., multiples of 100 ms or 250 ms). If the client requests 500 ms and the server's internal step is 1 s, the negotiated value becomes 1000 ms.

4.4 Client Library Behaviour

The Prosys SDK for Java reports the revisedPublishingInterval returned by the server. If the engineer's application code reads the local copy of the requested value rather than the server's revised value, it will appear that the server is sending slower than requested, even though the server is in fact obeying the negotiation.

5. TIA Portal Configuration Parameters

The configuration is performed on the S7-1500 CPU under Properties → OPC UA → Server → Runtime settings in TIA Portal. The two relevant fields are described in Settings of the server for subscriptions (S7-1500, S7-1500T).

Field Default Recommended Hard floor (CPU side)
Minimum sampling interval (ms) 100 100–250 10
Minimum publishing interval (ms) 200 200–500 20
Keep-alive count 10 10 1
Lifetime count 3 × keep-alive 3 × keep-alive 2 × keep-alive
Max monitored items per subscription 1000 500 CPU dependent
Max subscriptions 20 10 CPU dependent
Note: The default for the sampling interval is 100 ms in the S7-1500 firmware. Entering -1 in the client means "use the default of the OPC UA server." This is documented in What you need to know about OPC UA clients (S7-1500, S7-1500T).

6. Impact of Firmware and CPU Class

The achievable minimum publishing interval depends on the firmware version and on the CPU class. Use the table below as a planning guide; verify the value on the actual hardware before commissioning.

CPU class Firmware V2.6/V2.9 typical minimum Firmware V20 typical minimum Recommended for reporting
S7-1511(F) 1000 ms 500 ms 1000 ms
S7-1513(F) 500 ms 250 ms 500 ms
S7-1515(F)/1516(F) 250 ms 100 ms 250 ms
S7-1517(F)/1518(F) 100 ms 50 ms 100 ms
S7-1500T (motion) 100 ms 50 ms 100 ms

The S7-1511F-1PN in the field report is therefore operating in the expected range: the server is enforcing a 1 s effective publishing interval because of the combination of CPU class, firmware version, and active subscription count.

7. Step-by-Step: Configuring the Intervals

  1. Open the TIA Portal project that contains the S7-1500 station.
  2. Select the CPU in the device tree.
  3. Open Properties → OPC UA → Server → Runtime settings.
  4. Activate the OPC UA server and deactivate the default SIMATIC server interface if a custom address space is required.
  5. Set Minimum sampling interval to the desired floor (e.g., 100 ms). This value is the slowest possible sampling rate; a faster value will be revised upward by the server.
  6. Set Minimum publishing interval to the desired floor (e.g., 200 ms). This is the slowest possible publish rate.
  7. Set Keep-alive count (default 10) and Lifetime count (default 3 × keep-alive).
  8. Compile the project and download the hardware configuration to the CPU.
  9. Restart the OPC UA server (or cycle CPU RUN/STOP) so the new limits take effect.
  10. Reconnect the client and inspect the revisedPublishingInterval in the CreateSubscription response.

7.1 Client Code Snippet (Prosys Java SDK)

The negotiated interval is the value returned by the server, not the value the client requested. Read it explicitly:

UaSubscription subscription = new UaSubscription(
    500.0,                 // requestedPublishingInterval (ms)
    client.getSession());  // session

double effective = subscription.getSubscription().getRevisedPublishingInterval();
System.out.println("Server-revised publishing interval: " + effective + " ms");

UaMonitoredItem item = subscription.addMonitoredItem(
    nodeId,                // NodeId of the S7-1500 variable
    new ReadValueId(...),  // value descriptor
    MonitoringMode.Reporting,
    new MonitoringParameters(
        100.0,             // requestedSamplingInterval (ms)
        null,              // filter (null = no filter)
        10,                // queueSize
        true));            // discardOldest

System.out.println("Server-revised sampling interval: " +
    item.getStatusCode() + " / " +
    item.getMonitoredItem().getRevisedSamplingInterval());

8. Verification Procedure

After configuration, verify that the negotiated intervals match the expected values.

  1. Open the CPU's online diagnostics in TIA Portal (Online & Diagnostics → OPC UA) and read the active server parameters.
  2. Connect a UaExpert client to the PLC, create a subscription with PublishingInterval = 500 ms, and observe the Revised Publishing Interval field in the subscription properties.
  3. Subscribe to a single variable and verify the receive rate with Wireshark (filter: opc.tcp). The inter-publish gap must match the negotiated value, not the requested value.
  4. Check the CPU's OPC UA → Statistics page for the number of Publish requests served per second. With a 500 ms publishing interval and one client, this should be approximately 2/s (plus keep-alive overhead).
  5. Run the CPU under expected load and confirm the publishing interval does not drift above the negotiated value.

9. Troubleshooting Matrix

Observed symptom Most likely cause Verification Resolution
Client requests 500 ms, receives 1000 ms S7-1511F CPU-class floor or firmware granularity Check revisedPublishingInterval in UaExpert Upgrade to S7-1515 or higher, or accept 1000 ms
Client requests 100 ms, receives 200 ms Minimum publishing interval = 200 ms in TIA Portal Read PLC properties online Lower the value in TIA Portal to 100 ms
Notifications arrive at 2× requested rate Client double-subscribes (two subscriptions on same node) Audit client code Use one subscription per group
Intermittent long gaps CPU load > 90 %, OPC UA task starved Online & Diagnostics → Cycle time Reduce monitored items or shorten OB1
Subscription times out (lifetime exhausted) Network jitter, lost Publish responses Wireshark, network switch counters Increase lifetime count, check switch QoS
Client sees Bad_Timeout on all items Server certificate not trusted on client OPC UA client trust list Trust the PLC certificate, restart the session
Publishing interval drifts upward under load CPU class auto-throttling OPC UA statistics, CPU load Distribute load across subscriptions
Old firmware shows 0 ms / -1 ms in TIA Portal Server still on default values, configuration not downloaded Check download status Re-download HW config, restart CPU

10. Edge Cases and Field Notes

10.1 Sampling Interval of -1

The OPC UA spec defines a sampling interval of -1 (or sometimes a sub-zero value in TIA Portal terminology) to mean "use the default of the server." The S7-1500 server resolves this to the value configured in TIA Portal's Minimum sampling interval. Do not treat -1 as zero in client code.

10.2 Mixing Subscriptions and Filter Chains

When a client uses DataChangeFilter or AggregateFilter, the server may further revise the sampling interval upward to satisfy the filter. This is independent of the publishing interval. If the filter is heavy (e.g., a sliding average), the effective sampling interval can be 2–5× the configured minimum.

10.3 Read/Write Latency vs Publish Rate

The publishing interval governs the rate of Publish responses. Read and Write services are immediate and are not throttled by the publishing interval. If low-latency single-value access is required, prefer Read over subscription.

10.4 Effect of the Default SIMATIC Server Interface

The "Default SIMATIC server interface" exposes an entire S7-1500 address space as OPC UA nodes, with a single subscription that uses a fixed 1 s publishing interval. Disabling it and using a custom interface with selected DB variables reduces the load and allows tighter intervals.

10.5 Security Policy Impact

OPC UA security (Sign / SignAndEncrypt) adds CPU overhead on the S7-1500. On the S7-1511F, security policies above None or Basic128Rsa15 can increase the effective minimum publishing interval by 20–50 %. Use Basic256Sha256 only on S7-1515 and above when sub-500 ms publishing is required.

10.6 Multi-Client Contention

The server uses one Publish queue per subscription, but the global publishing rate is bounded by the CPU class. Multiple clients with tight intervals multiply the load. Distribute clients across multiple subscriptions and keep the total monitored-item count below 1000 per CPU.

11. Firmware-Specific Notes (S7-1500)

The behavior described in this article was reproduced on the S7-1511F-1PN running firmware V2.9.4 (released 12/2021). Newer firmware revisions (V20 in TIA Portal) expose the server settings page with explicit numeric fields for both intervals, while older firmware sometimes displayed -1 (default). Always confirm the active value in the online diagnostics, not just the offline configuration.

Safety note: Changes to OPC UA server settings require recompilation and download of the hardware configuration. The OPC UA server is stopped and restarted during the download. Connected clients must reconnect. Plan the change during a maintenance window.

12. Summary

The S7-1500 OPC UA server does not give the client full control of timing. It always applies the rule negotiated = max(client_request, server_minimum), and may revise the value further based on CPU class, firmware version, security policy, and active subscription load. To obtain a 500 ms publishing interval on a S7-1511F, the engineer must (a) configure the minimum to 500 ms or lower in TIA Portal, (b) use firmware V20 or later, (c) keep the subscription count and monitored-item count within the CPU's performance budget, and (d) read the revisedPublishingInterval on the client to confirm the negotiated value. Anything else is a server-side decision, not a configuration error.

What is the difference between the sampling interval and the publishing interval on an S7-1500 OPC UA server?

The sampling interval is the rate at which the server samples the underlying data source for a specific MonitoredItem. The publishing interval is the rate at which the server sends a Publish response containing notifications to the client. The publishing interval is always greater than or equal to the sampling interval, and the S7-1500 enforces independent minimums for each (default 100 ms and 200 ms respectively in firmware V20).

Why does my OPC UA client get 1000 ms updates when it requests 500 ms on a S7-1511F-1PN?

The S7-1511F-1PN class enforces a 1 s effective minimum publishing interval under firmware V2.9.x, even when the TIA Portal minimum is configured at 500 ms. This is the server's CPU-class protection. To obtain 500 ms, upgrade to an S7-1515(F) or higher, or update to firmware V20.

How do I read the negotiated publishing interval on the Prosys Java SDK?

Read the value of UaSubscription.getSubscription().getRevisedPublishingInterval() after the subscription has been created. The value returned by the server, not the value you passed into the constructor, is the rate the server will actually use.

Can the S7-1500 OPC UA server publish faster than 100 ms?

On S7-1515 and above with firmware V20, the minimum publishing interval can be set as low as 50 ms. On the S7-1511, the practical minimum is 500 ms to 1 s. Values below the floor are silently revised upward by the server.

Does OPC UA security policy affect the publishing interval?

Yes. Sign and SignAndEncrypt policies add CPU overhead on the S7-1500 and can raise the effective minimum publishing interval by 20–50 % on the S7-1511F. Use None or Basic128Rsa15 on small CPUs and reserve Basic256Sha256 for S7-1515 and above when tight intervals are required.

Back to blog