Course A4 · Foundations

Subscriptions done right

Subscriptions are where OPC UA projects succeed or quietly fail. This course separates publishing interval from sampling interval, applies deadband and triggers at the source, sizes queues so you stop losing samples silently, and adds the heartbeat that tells you the connection is alive.

Lessons11
Timeabout 84 minutes
PrerequisitesA3
CostFree: written lessons open, video and labs need a free account

What you will be able to do

  • You can explain publishing interval and sampling interval without confusing them.
  • You can apply deadband so noise never leaves the server.
  • You can size a queue and detect an overflow that reports itself as Good.
  • You can design a subscription set for a plant instead of a demo.
  • You can distinguish 'nothing changed' from 'connection dead'.

Syllabus

  1. 1
    Subscribe instead of polling

    Why polling a server on a timer is the wrong default, and what changes when the server pushes.

    Asset A polled client and a subscribed client reading the same nodes, with both network traces

    6 min
  2. 2
    Separate publishing interval from sampling interval

    The single most misunderstood pair in OPC UA. The server samples at one rate and delivers at another, and confusing them produces data that looks right and is not.

    Asset One monitored item at four sampling/publishing combinations, with the delivered samples for each

    9 min
  3. 3
    Inherit the publishing interval when you can

    A sampling interval of -1 and what the server does with it. When per-item rates earn their cost.

    Asset The same subscription with explicit and inherited sampling intervals, with the server's revised values

    6 min
  4. 4
    Read the revised values the server gives back

    You request; the server revises. Ignoring the revised interval is how a client ends up believing it samples ten times faster than it does.

    Asset A CreateSubscription request and response showing requested versus revised parameters

    7 min
  5. 5
    Kill noise with deadband at the source

    Absolute and percent deadband, and the trap that percent deadband silently does nothing without EURange on the node.

    Asset A noisy analogue value with no deadband, absolute deadband and percent deadband, all three logged

    9 min
  6. 6
    Choose a DataChangeTrigger

    Status, StatusValue or StatusValueTimestamp. Why counters need a different trigger from analogues.

    Asset A counter that stops reporting under the default trigger, and the trigger change that fixes it

    7 min
  7. 7
    Size the queue and catch the overflow

    QueueSize from the publishing-to-sampling ratio, discard-oldest, and the overflow bit that reports as Good, which is exactly why 'my data looks fine but samples are missing' happens.

    Asset A deliberate queue overflow, with the overflow bit visible in the DataValue and the samples lost

    10 min
  8. 8
    Add a heartbeat

    Without one, a silent stream is ambiguous. How to make 'unchanged' and 'dead' distinguishable, and the stale-SourceTimestamp side effect to expect.

    Asset A subscription with a heartbeat, showing the re-sent value and its unchanged SourceTimestamp

    8 min
  9. 9
    Keep the number of distinct intervals down

    Every distinct publishing interval forces another subscription. A client with fifty rates has fifty subscriptions, and the server will eventually say so.

    Asset A server hitting its subscription limit, and the same data delivered in three subscriptions

    8 min
  10. 10
    Recover a subscription after a drop

    TransferSubscriptions before recreating everything, GoodSubscriptionTransferred, and the watchdog that notices when a subscription has gone quiet server-side.

    Asset A client surviving a server restart with its subscriptions transferred, with the log

    9 min
  11. 11
    Tune for a plant, not a demo

    The full ladder applied to two hundred machines: interval to consumer need, deadband on analogues, bounded queues, staggered connects, and diagnostics off unless you read them.

    Asset A tuning worksheet with real numbers for a 200-machine, 12,000-tag deployment

    5 min

Lab

Free account required

Subscribe to two changing values on opc.tcp://opcua.umati.app:4840 at 1000 ms publishing, then reproduce a queue overflow on purpose and prove from the DataValue that you lost samples while every status said Good.

Unlock the lab →
Specification background

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login