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
04 Feb 2015 20:40 #2706 by Bmello4688
It seems that the subscription sessions are not getting cleaned up. Every time I run the application the subscription IDs increment, but the sequence number always stays as 1. I am calling unsubscribeAllMonitoredItems and then disposing when I close the application. Is there something else I have to do?

I am now using all default values. I'll push the sampling interval to 1000 if it is not that high already.

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

More
04 Feb 2015 19:56 #2705 by support
Thank you for the info about tag count etc.
And, good that the Node Id part is resolved.

The "subscriptions stopped" problem is different from the Node Id or such issues - it is an internal OPC UA communication problem that (at least in theory) should never be caused by anything that you do in your app.

In OPC-UA terms, one "subscription" holds and handles multiple monitored items. If the subscription parameters of your monitored items are all the same, QuickOPC will create just one subscription. If this is the case, the subscription Id would be irrelevant to you. If the parameters of the monitored items differ (such as their sampling rates), there will be multiple subscriptions, but I do not think this is the case.

Can you please try to slow down all sampling rates that you use significantly - to 1000 milliseconds or so? I understand that this is not what you want from your project, but I am just trying to determine whether the issue would go away in this scenario.

Best regards

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

More
04 Feb 2015 19:01 #2704 by Bmello4688
I actually found a bad node descriptor value and I fixed it. I am now getting a BadSequenceNumberUnknown exception. It is giving me the subscription I'd and sequence number, but how do I figure out what node is having the problem? I keep a reference to the handles, but I cannot tell which subscription it's associated to the error.

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

More
04 Feb 2015 17:24 #2703 by Bmello4688
56 tags to be exact. In reality they do not change very often. Maybe once a second. In my two client scenario, I am changing multiple tags in milliseconds and then waiting for the resulting monitor item changed event.

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

More
04 Feb 2015 16:34 #2701 by support
How many monitored items are we talking about, and how often in reality they change?

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

More
04 Feb 2015 16:22 #2700 by Bmello4688
Okay, but in my logs I have an error stating:

The OPC-UA client session on endpoint URL "opc.tcp://localhost:49320" has encountered a publish error with code 0x80790000 for subscription Id 0 and sequence number 0. The error might be from the Publish or the Republish service. Further publish errors with this code on this session will not be logged.

This looks like a client related error because of the reference to publishing and republishing. Is this just a false positive?

Also is there a way to get more verbose logs out of the client so I could better debug what is happening?

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

More
04 Feb 2015 15:11 #2698 by support
The subscriptions are real. The client creates a subscription in the server, then adds monitored items to it. The server only sends relevant (changed) data to the client. On the (OPC UA) service level, a "long polling" approach is used, which in the end effect is equivalent to no polling, it is a true subscription: The client issues a Publish request to the server, and the server does not return until it has a new data (or other condition, such as related to keep-alive, occurs). This approach is chosen in OPC UA so that it can be used with transports like HTTP which do not allow "callbacks".

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

More
04 Feb 2015 15:02 #2697 by Bmello4688
I know the node Id is not incorrect because after the subscriptions successfully connect I am able to read and write to the specific node. It could very well be a server problem. I am trying to get KEP's help as well.

How exactly do subscriptions work between the client and the server? Does the server maintain the subscription list and then notify the client when items have changed or is the client really just polling the server under the covers and raises the monitoritemchanged event when it notices a node change?

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

More
04 Feb 2015 09:01 #2692 by support
Regarding the error with 'BadNodeIdUnknown': I think that this is either unrelated to the "subscription stopped" problem, or it (less likely) can be somehow related on the server side, as a consequence of "subscription stopped". It is very unlikely that we would "make up" (generate) this error on our side, OR that we would "spoil" the Node Id being passed to the server, causing it to legitimately return this error. I therefore think that either 1) the particular Node Id is truly invalid (given the configuration of the server), or 2) this is a server problem, where the server rejects a Node Id that is valid and should not be rejected.

To the "The OPC-UA subscription published has stopped." error in the monitor change event: This is the reflection of the entries you have seen in the log file, therefore essentially the same primary issue. Thank you - I just wanted to verify what and how gets reported to your app, because *that error* is the actually the description of the problem you have, and the log entries you posted initially then just serve as an explanation for that problem.

How many monitored items are we talking about, and how often in reality they change? I wonder whether we are not dealing with a load that is over the capabilities of the server, the client, or the connection in between.

Thank you

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

More
03 Feb 2015 18:47 #2682 by Bmello4688
Subscription code

easyUAClient.SubscribeMonitoredItem("opc.tcp://localhost:49320/",
"nsu=KEPServerEX;ns=2;s=ECOM.RobotOPCModel.Alarms.Barcoder.LabelPickPlaceHeadErrorAlarm",
50);

s changes based on the tag we want to subscribe to.

The exception message we are getting from the monitor change event is:

OPC-UA service result - An error specific to OPC-UA service occurred.
---- SERVICE RESULT ----
StatusCode: {BadNodeIdUnknown} = 0x80340000 (2150891520)


Also:

The OPC-UA subscription published has stopped.


After the client retries the subscriptions they work fine for a little while then the exceptions happen again.

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

Moderators: support
Time to create page: 0.219 seconds