Limits with subscription of monitored items

Unified Architecture topics related to OPC UA Specification, compliant behavior and any technical issues of OPC UA, like Security, Information Model, Companion Specs DI, PLCopen, ADI, ...

Moderator: Support Team

Post Reply
schlenk
Sr. Member
Sr. Member
Posts: 10
Joined: 04 Jul 2013, 14:01

Limits with subscription of monitored items

Post by schlenk »

Dear Support,
is it correct that using data transfer from server to client via subscriptions, OPC UA will possibly loose data when the time between two item updates is less than 1 millisecond? I guess the limiting factor here is the minimum sampling interval of 1 ms. Is there no way around this for simple data transfer? This would mean that if for some reason the routine which acquires data gets a burst of new values would have to artificially stretch the value update rate and thus the server timestamps?
Many thanks in advance,
Stefan

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Limits with subscription of monitored items

Post by Support Team »

Hi Stefan,

Your assumption / statement is NOT correct from an OPC UA specification point of view. It may be right for a specific software / implementation of OPC UA.

The sampling interval in OPC UA is based on milliseconds but
- 0 is a valid sampling interval
- the data type of the sampling interval is double which allows to assign a sampling interval like 0.1ms

A sampling interval of 0 is normally used (supported by a server) if the server has an event based data source or the data source is in memory and every value change can be detected. In this case there is no real sampling and sampling interval 0 is the preferred setting from a server point of view. Clients may have problems with 0 since they may get data updates too fast to be able to process them. Sampling interval 0 is typically also used together with a queue size > 1.

For a real sampling below 1ms (which can be configured through OPC UA), a server normally needs special hardware or must run on a real-time operating system. Since it will not be possible to transfer this sampling rate also across a network, the queue size must match the capabilities of publish to make sure you are not loosing data.

Sampling is not delivery. The data delivery is done through Publish based in the publish interval. If you do not want to loose data and the sampling interval is smaller than publish interval, you must calculate the right queue size for the monitored item.

Best Regards,
Unified Automation Support Team

schlenk
Sr. Member
Sr. Member
Posts: 10
Joined: 04 Jul 2013, 14:01

Re: Limits with subscription of monitored items

Post by schlenk »

Dear Support,
many thanks for the reply.
What tricked me into that assumption was the automatic negotiation of a samplingInterval between client and server for a given subscription. I had set the server sampling to 0 but the client had specified something else than 0 resulting in the server applying a non-0 sampling interval. In that respect the behavior is not quite obvious however understandable considering several clients which may make different requests for the samplingInterval.
Stefan

Bangonkali
Jr. Member
Jr. Member
Posts: 1
Joined: 18 Aug 2016, 07:23

Re: Limits with subscription of monitored items

Post by Bangonkali »

Can I set Monitored Item Queue Size to 0 if I only care about the latest value and don't mind missing updates with Publish Interval of 1 sec? Or is it better to set a Queue Size of 1?

Post Reply