Professional OPC
Development Tools

logos

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.

Using KEPServerEx Sim Driver && Getting dropped subscriptions

More
01 Apr 2015 09:40 #3028 by support
Note to the original issue (....publishing has stopped): With the latest version from the Download are on this Web site (5.33.1152.1 or later), we have taken additional measures to prevent this error when debugging using breakpoints, and made it possible to influence the keep-alive and lifetime counts from the code, if necessary (the related to parameters are in the UAClientSubscriptionParameters class).


Best regards

Please Log in or Create an account to join the conversation.

More
30 Mar 2015 15:55 #3021 by sun21
yes, you are right,
Kepserver "Project Properties" have "OPC UA" tab, where I had to modify "Max Data Queue Size" to 100 (from default 2).
It works now, thank you.

Please Log in or Create an account to join the conversation.

More
30 Mar 2015 14:54 #3020 by support
You are on the right track. You need to combine the two examples you sent: Have a non-zero queue size (as you have in your first example), AND a publishing interval that is significantly greater than the sampling interval (as you have in your seconds example). This way, the server will keep a queue (of the given size) and store the sampled value into the queue, and only send the contents of the queue to the client on each publishing interval.

Note that the server is free to revise the size of the queue (or may not support it).

Best regards

Please Log in or Create an account to join the conversation.

More
30 Mar 2015 14:06 - 30 Mar 2015 14:49 #3019 by sun21
in reply to message #2666 from support: "..If you do need the values sampled at e.g. 50 milliseconds, but do not necessarily have to have them delivered immediately, you can override the publishing rate, and have the same data delivered e.g. each 500 milliseconds, with a help of a queue inside the server. This way, no value will be lost, but they will be sent to the client in "batches", greatly reducing the amount of communication needed."

I tried this with tag that changes every 10ms, but then I received ONLY one value per 500ms.
CODE:
                easyUAMonitoredItemArguments.Add(
                    new EasyUAMonitoredItemArguments(MonitoredItemChangedEvent, 
                        dataItemHandle, 
                        endPointDescriptor, 
                        nodeDescriptor, 
                        new UAMonitoringParameters(dataItem.SamplingIntervalMs, 
                                               new UADataChangeFilter(dataItem.DeadBandType, dataItem.DeadBandValue, UADataChangeTrigger.StatusValue)
                                               )
                    ,  new UASubscriptionParameters(500) // 500ms
                ));
 
What can be a problem?
Last edit: 30 Mar 2015 14:49 by support.

Please Log in or Create an account to join the conversation.

More
30 Mar 2015 13:48 - 30 Mar 2015 14:49 #3018 by sun21
Thank you for your answers, I'll try p.2 and wait for p.3.

About p.1 : Here are the subscription details, unfortunately I cannot decrease the rates:
QuickOPC-UA client (v5.32) subscribed to Kepserver with ~1700 tags with total update rate ~100Hz
All tags subscribed with 200ms rate, except of one tag with 100ms. The tags are updated 4 times/s maximum (250ms).

By the way, what does "queueSize" in UAMonitoringParameters mean?
I tried to increase "publishingIntervalMs", but then got only two points in 1 second instead of 100.
CODE:
                easyUAMonitoredItemArguments.Add(
                    new EasyUAMonitoredItemArguments(MonitoredItemChangedEvent, 
                        dataItemHandle, 
                        endPointDescriptor, 
                        nodeDescriptor, 
                        new UAMonitoringParameters(dataItem.SamplingIntervalMs, 
                                               new UADataChangeFilter(dataItem.DeadBandType, dataItem.DeadBandValue, UADataChangeTrigger.StatusValue)
                                               , 10000 // queue size (?)
                                               ) 
//                       , new UASubscriptionParameters(dataItem.SamplingIntervalMs/2 )   // set publishingIntervalMs = SamplingIntervalMs / 2
                ));
Last edit: 30 Mar 2015 14:49 by support.

Please Log in or Create an account to join the conversation.

More
30 Mar 2015 13:08 #3016 by support
When the communication between the client and the server "lags behind", possibly due to other tasks that put stress on the resources available (CPU, network connection, ...), the built-in OPC UA keep-alive mechanism can (properly, in fact) detect a problem, and that's from where the "...publish has stopped" error comes from.

There are several things that can be done.

First, what are the parameters of your subscription; specifically, what is the fastest sampling rate you are using? Isn't is unnecessarily fast? Can you increase the value (i.e. slow it down?)

Second, it may help to separate the EasyUAClient instances that you use for the subscriptions, and for node browsing. And, set the .Isolated parameter on them to 'true'. This should result in two separate OPC sessions, with less likeliness to interfere.

And third, we are working on an improvement to keep-alive mechanism that would, besides other changes, allow you to further tweak the parameters from the code, if it turns out that that a longer keep-alive interval is needed.

Best regards

Please Log in or Create an account to join the conversation.

More
26 Mar 2015 17:08 - 30 Mar 2015 14:48 #3011 by sun21
I got the message with error code: -1, error message: "The OPC-UA subscription publishing has stopped."
from:
// Callback from monitored item changed event:
        private void MonitoredItemChangedEvent(object self, EasyUAMonitoredItemChangedEventArgs e)
        {
            if(e.Succeeded && e.Exception == null)
            {
... // normal operation
            }
            else
            {
// error: add handle to failed list and log the error:
logger.Log(string.Format("[OpcDataCollector] Failed to log item changed event, error code: {0}, error message: {1}", e.ErrorCode, e.ErrorMessage), Log.LogType.Info);
...
}
}
Last edit: 30 Mar 2015 14:48 by support.

Please Log in or Create an account to join the conversation.

More
25 Mar 2015 20:11 #3008 by support
Thank you. You described your problem as "failed subscription". What are, however, the precise symptoms? E.g. what exception/message are you getting, and where?

Please Log in or Create an account to join the conversation.

More
24 Mar 2015 15:49 #3004 by sun21
yes, I suspect that it sometimes happens when I also check for all nodes every 60s using code:

IDictionary<UANodeDescriptor, UANodeElement> elementCollection = new Dictionary<UANodeDescriptor, UANodeElement>();
UABrowseParameters browseParameters = new UABrowseParameters(UANodeClass.All, referenceTypeIds);
UANodeElementCollection nodeElementCollection = easyUAClient.BrowseNodes(endpointDescriptor, rootNode, browseParameters);

It creates ~90% CPU load

Please Log in or Create an account to join the conversation.

More
24 Mar 2015 15:28 #3003 by support
Can you relate the times of occurrence of the problem to something unusual happening on the computer or in your application? For example, doesn't it coincide with periods of high CPU load?

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.062 seconds