Limits on MinPublishingInterval and AvailableSamplingRates

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
sgs
Jr. Member
Jr. Member
Posts: 1
Joined: 14 May 2018, 14:40

Limits on MinPublishingInterval and AvailableSamplingRates

Post by sgs »

Hello,

I am using version 1.5.2 of the C++ SDK and a low latency kernel on Ubuntu.
My goal is to create a Client-Server subscription to transmit node changes in the Server's Address Space to the Client at high rates. I have a few questions regarding the publish and sample interval and hope you can solve my problem.

First question: Is there a lower limit to the publishing interval from the SDK point of view? Even when I set MinPublishingInterval in the server configuration file to 0 (ms), the lowest revised publishingInterval I can achieve is 1(ms).

Second question: Is it possible to achieve a publishing interval less than 1ms?

Third question: In this thread: https://forum.unified-automation.com/topic998.html you explained that the sample interval is a double and therefore sample intervals such as 0.1ms could be used. Unfortunately, I am not able to achieve non-integer sample rates. For instance I have 0, 0.5, 1, 2, 2.5, 5 as AvailableSamplingRates in the server config (and MinSupportedSampleRate = 0) and specified sample rates of 0.5 and 2.5 in createMonitoredItems. For a specified sample rate of 2.5, the revised sample rate is 2 and for 0.5 it is 0. The integer sample rates from above (0,1,2,5) are accepted by the server. How can I specify non-integer sample intervals?

Fourth question: I have observed that specified sample rates have been revised and accepted by the server if they were added as AvailableSamplingRates, even though they were below MinSupportedSampleRate (say MinSupportedSampleRate = 100, for instance). Does AvailableSamplingRates overwrite MinSupportedSampleRate?

I thank you for your efforts and greatly appreciate your help!

Kind regards

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

Re: Limits on MinPublishingInterval and AvailableSamplingRat

Post by Support Team »

Hello sgs,

1) and 2) You can't achive Publishing Intervals faster than 1ms - in practice depending on the OS it can be even more. E.g. on windows around 15ms because of the timer resolution.
That's why all values smaller 1 ms are revisd to 1 ms.

3) The UA Standard defines the SamplingInterval to be double. However the implementation of the SamplingEngine in the Tolkit class does not work with intervals smaller 1 ms.
If you implement your own IOManager (this includes implementing your own sampling) you of course get the SamplingInterval as double and can implement faster sampling.

4) MinSupportedSampleRate is just a configuration parameter to define the value of the Variable ServerCapabilities -> MinSupportedSampleRate. It doesn't really have any technical impact.
Best regards
Unified Automation Support Team

Post Reply