Set supported sampling interval in the server

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

Moderator: uasdknet

Post Reply
pkrawal
Full Member
Full Member
Posts: 6
Joined: 24 Sep 2019, 07:43

Set supported sampling interval in the server

Post by pkrawal »

Hello,
i am using UA .NET based SDK version 3.0.0 with Windows 10 and compiling it with Visual Studio 2015. I am able to create a server just like the examples "GettingStarted.sln". The problem i faced is with the subscription of some variables. I found out that the sampling interval eventhough can be reduced to 1 ms, is practically limited to 100 ms in the server. I am able to change the minimum publishing interval in the config data. But i want to reduce the minuimum sampling interval. I subscribed to the CurrentTime of the server using UaExpert to find out that i got the notifications every 100 ms and not faster. I would like to have it like every 10 ms or 2 ms (1 ms would be perfect.). Where can i change this setting? How can i resolve this problem ?
Thanks.

JohnWick
Jr. Member
Jr. Member
Posts: 2
Joined: 03 Oct 2019, 09:14

Re: Set supported sampling interval in the server

Post by JohnWick »

Hello,

To get faster notifications, you have to change the PublishingInterval (subscriptionSettings) in UaExpert.
I found out that the sampling interval even though it can be reduced to 1 ms, is practically limited to 100 ms in the server
WHERE did you find this information?

as long as I know, the .NET server allows minimum samplingInterval = 0 as well. Check it by changing different samplingIntervals in UaExpert, check revisedSamplingInterval in the UaExpert logs, to know whether the server allows it or not.

I would recommend you to do client development tutorial, you can find it here.

http://documentation.unified-automation ... rials.html

pkrawal
Full Member
Full Member
Posts: 6
Joined: 24 Sep 2019, 07:43

Re: Set supported sampling interval in the server

Post by pkrawal »

JohnWick wrote:Hello,

To get faster notifications, you have to change the PublishingInterval (subscriptionSettings) in UaExpert.
Hello JohnWick,
yes, PublishingInterval will give you faster notifications, but it is the SamplingInterval which decides how many notifications will be recieved in each published. I already set my PublishInterval to 50ms which is the least supported. Eg. if PublishInterval=50ms, and SamplingInterval=100ms, it will still get a notification once in 100 ms because eventhough it will publish every 50ms, there wont be any notification in every 1 of the 2 cycles. if SamplingInterval=10ms, then yes in each publish i will recieve 5 notifications. 50ms PublishInterval is okay for me. I am interested in more data and not faster data. Its explained in this link:
https://documentation.unified-automatio ... ption.html

about the second comment to set SamplingInterval=0: SamplingInterval are a range of SamplingInterval supported by the server. If the client selects any other out of the range, it will be revised. SamplingInterval=0 ms means to automatically select the fastest sampling interval possible which was 100 ms in my case. Please see the following link:
http://documentation.unified-automation ... 1fccf83f22

I checked the UaExpert Log, which said RevisedSamplingInterval = 0 but as i said 0 means here as fast as possible and that is 100 ms because that is the default minimum sampling interval possible with Unified Automation Server. Also this was confirmed when i subscribed to the CurrentTime of the Server and got notifications in multiple of 100 ms. I hope i explained it properly. I welcome inputs from everyone as i am still struggling with this problem.

Post Reply