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.
| Lessons | 11 |
|---|---|
| Time | about 84 minutes |
| Prerequisites | A3 |
| Cost | Free: 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
Subscribe instead of polling6 min
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
-
2
Separate publishing interval from sampling interval9 min
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
-
3
Inherit the publishing interval when you can6 min
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
-
4
Read the revised values the server gives back7 min
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
-
5
Kill noise with deadband at the source9 min
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
-
6
Choose a DataChangeTrigger7 min
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
Size the queue and catch the overflow10 min
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
-
8
Add a heartbeat8 min
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
-
9
Keep the number of distinct intervals down8 min
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
-
10
Recover a subscription after a drop9 min
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
-
11
Tune for a plant, not a demo5 min
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
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 →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.