Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
Reactive Observable UAMonitoredItemChangedObservable.Create<T> Does Not Appear to Use the passed Sample Interval
There are two sets of parameter that influence the "rate of changes". The first set is called monitoring parameters, and it contains the "logical" parameters, mainly, how often the data should physically be sampled (or otherwise obtained) by the server from the underlying device or system - this is the sampling interval. The second set is called subscription parameters, and it controls *how* (and how often) is the data transferred from the server to the client - here we have the publishing interval. The publishing interval can be shorter or longer than the sampling interval. The client cannot received data faster than the publishing interval is (but, when queuing is enabled, it can still receive all the data, but they will come in "batches").
In order to make things easy for the developer, we allow the publishing rate be set to zero, in which case we determine the actual publishing rate automatically before making a subscription request to the server. The default publishing rate in UAMonitoredItemArguments is, however, set to 1000 milliseconds. You can set it to zero yourself, or you can use EasyUAMonitoredItemArguments, which (among other things) will do it for you.
Other notes to the code you posted:
1. In the first instance you have the sampling rate as fast as 10 milliseconds - in principle there is nothing wrong with that, but be aware of possible performance requirements and consequences.
2. If UAMonitoredItemArgumentsCollection is a class from our assemblies: It is a (yet) undocumented class, with different purpose. It will work; but you'd better not using. All you need is any IEnumerable of UAMonitoredItemArguments: It can be e.g. an array, or a generic Collection<UAMonitoredItemArguments>.
Best regards
Please Log in or Create an account to join the conversation.
That also helped me understand the difference between the two.
Thanks for the quick response!
Please Log in or Create an account to join the conversation.
Note: The likely reason is in the PublishingInterval (in SubscriptionParameters) setting - but I need that code to verify it, and illustrate the difference.
Thank you
Please Log in or Create an account to join the conversation.
While working with the software, we were using the UAMonitoredItemChangedObservable to monitor for changes. We used the collection of multiple arguments to subscribe to multiple items. However, the subscription does not appear to respect the sample rate passed to it. We can compare this to the MonitoredItemChanged event approach and that seems to work fine.
We declare the arguments as follows:
We then create the subscription as follows:
Finally we have a collection of objects using the observable that has been passed into their constructor and create a subscription to that observable.
What happens is the behavior seems to work, except the sampling rate is much lower. It seems fixed at 1000ms instead of the desired 100ms that is requested.
How might we correct this issue?
Thanks!
Please Log in or Create an account to join the conversation.