OPC UA sampling definition

Hi,

I've been trying to drill-down and understand the tag-group editor. Ideally there is some documentation on this, but I'm stranding in a swamp of technical definitions right now.

After reading a few other topics on this, I have the following understanding;

  • Rate is used to define an interval. When polling, this is the interval at which the OPC UA client (in my case, Ignition Gateway) requests new tag-values from the OPC UA server (Siemens PLC). However, when subscribed, this becomes a sampling rate. I'm unsure what this sampling rate entails. Is this a verification of the tag-data when the subscription has not sent an update for an interval longer than defined?
  • Publishing interval I've seen described as the interval through which the Ignition Gateway updates it's tag-data to Ignition clients. This is auto-defined when using a subscription data mode, but what is an ideal interval when using polling? Half the rate, or is equal to the rate enough to not miss updates of tag-data?
  • Sampling interval I've seen described as the interval at which the OPC UA server (Siemens PLC) samples it's own data-source. Why is this specified in the OPC UA client, and does this actually have effect on the OPC UA server on the PLC, or is this setting for different OPC UA server applications?

The PLC hosting this OPC UA server has a significant load already, so I'm trying to configure the connection between the server and the client as efficient as possible. I'd like to differentiate between tags that just need to be backed-up every x mins, and tags that need to be monitored every (half a) second. In my mind, the following makes sense:

  • positional data (xyz-coordinates) that needs to be stored every 500-1000ms, but changes continuously (and doesn't 'rest' on a value) should best be polled to reduce load on the PLC. By updating the tag subscription-based, the OPC UA server's handler is spamming updates every tens of ms, when the PLC-cycle completes and the tag-data on the PLC changes?
  • runtimecounters that need to backed up every x mins should be polled. When subscribed, it'll fire an event every second the RTC updates?

Thanks in advance for your time to answer.

Sampling interval and publishing interval are only relevant for OPC subscriptions. With OPC reads, the OPC client just asks for the data and gets what's in the target, unconditionally, at that moment.

For subscriptions, the OPC Server accepts the task of polling the underlying target at some pace to satisfy the subscription criteria:

  • Sample no faster than the sampling interval--that is, ignore changing values that arrive after a first value within that time limit (but reporting them after that time if no others arrive), and

  • Report one or more sample batches to the subscriber no faster than the publishing interval. (The timestamps within the message distinguish multiple samples in one report.)

Subscribing is always more efficient for a client, less traffic on the network, and more work for a server.

2 Likes