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.

Cleaning of the apartment All this is well suited to my kitchen. It will look good in my apartment.

More
05 Apr 2016 11:18 #3976 by support
There are some defaults but as this is an internal UA SDK stuff, I am not sure whether you can leave entries out; I suggest that you start with the "default" configuration file and modify the parts that you need.

The configuration that QuickOPC uses when no custom config is in effect: I posted it already - in this forum thread, see post #3952 from March 23: It is the last file attachment there.

Best regards

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

More
04 Apr 2016 09:35 #3975 by sun21
Thank you again, I read the chapter you mentioned, it is clear.

One question still:
If I will provide the <appname>.config.xml file with only some parameters, all the others will be defaults from internal?

Can you please give a link to the OPC-UA configuration file from OPC foundation?

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

More
24 Mar 2016 06:57 #3957 by support
This particular error message is related to the SessionConnectTimeout. IF it is the only kind of timeout error your are getting, I would just modify the SessionConnectTimeout value to suit your needs.

And, there is one more related thing you should consider. After a session-level error (such as the timeout error we are talking about) occurs, the expected EasyUAClient behavior is as follows: For certain duration following the error, all calls that reference the same server will fail *immediately* (without waiting). This should be the case with your subsequent "browse" calls as well. This behavior is intended to 1) reduce the load on the resources (client, network, server) by limiting the number of reconnection attempts, and 2) prevent repeated lengthy blocking on the client side. The length of this time period is controlled by the RetrialDelay property in EasyUAClient.AdaptableParameters.Session, can defaults to 10000 (10 seconds).

Regarding the XML config file: It's a bit complicated, but I believe it is described satisfactorily in the doc I mentioned: Concepts document, section Advanced Topics, chapter Application Configuration. What is not clear there please?

Best regards

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

More
23 Mar 2016 14:02 - 23 Mar 2016 14:04 #3953 by sun21
Hello,

Thank you for detailed answer.

Yes, I do recursive calls to browse the items. There are no other way to see if some tags were added or deleted from OPC server, right? And sometimes I'm getting:
"[2/10/2016 1:23:11 AM] [OpcNodesBrowser] UAException: An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from ''. The inner exception, of type 'OpcLabs.EasyOpc.UA.Engine.UAClientEngineException', contains details about the problem.
InnerException: Timeout connecting the OPC-UA client session. The total timeout value was 60000 milliseconds, and we have waited for 59968 milliseconds. The actual waiting time is lower than the total timeout (or even zero) if the connection operation has already started earlier."

Serge

PS: Where I shall place UAClientEngine.Config.xml to use it in my app?
Last edit: 23 Mar 2016 14:04 by sun21.

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

More
23 Mar 2016 08:48 #3952 by support
Hello.

Tables in the following documents list the various timeouts, and where to configure them:

File Attachment:

File Name: QuickOPC-U...0322.pdf
File Size:319 KB

File Attachment:

File Name: EasyUAClie...0322.pdf
File Size:323 KB


Most parameters can be set directly from the code. The OperationTimeout - which you may not need to change - depends on which one(s) you are getting - is a lower-level parameter that needs a more complicated approach. Please read the Concepts document, section Advanced Topics, chapter Application Configuration. For convenience, below is the "built-in" configuration used; you can use that one and just modify the item(s) that you want change.

File Attachment:

File Name: UAClientEn...nfig.xml
File Size:4 KB


Best regards
Attachments:
The following user(s) said Thank You: sun21

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

More
21 Mar 2016 16:21 #3947 by support
I will give an answer in two parts. This first part is what I can answer quickly.

Yes, EasyUAClient.BrowseNodes(...) performs synchronously.

Detection: In case of timeout and any other error, it should throw an exception (UAException). Depending on the error/timeout cause, there will be different messages and InnerException-s in it. I would be interested to know whether you have received any exception, and if so, what are the details of it. Or is it still the exception listed under www.opclabs.com/forum/ua-reading-writing-subscriptions/1781-...-than-1-minute/reply/3942#3827 ?

Communication problems should *not* be a cause for incomplete results returned by BrowseNodes(...). That it, the method call should either return all correct results, or nothing at all (when it throws an exception). Let me know if it behaves as described. If, of course, you are making repeated calls to BrowseNodes(...), some of them may succeed and some may fail. In such case, your "total" results would be incomplete, of course.

With regard to instructions on how to change the timeouts, I will assemble the information and post it here, later.

Best regards

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

More
21 Mar 2016 09:37 #3942 by sun21
Dear support,

Thank you for the clarification on async/sync. easyUAClient.BrowseNodes() performs synchronously, right?
In my recursive browsing method I use followning code:
UABrowseParameters browseParameters = new UABrowseParameters(UANodeClass.Object | UANodeClass.Variable, referenceTypeIds); // was UANodeClass.All
UANodeElementCollection nodeElementCollection = easyUAClient.BrowseNodes(endpointDescriptor, nodeDescriptor, browseParameters);
When network is not good/fast I get incomplete results (probably due to timeouts) or the recursive method never returns (I typically have 5000..50000 tags to search in up to 5 level UA tree).

Now questions: :)
1. What/how to change timeouts?
2. How to detect timeout so I can invalidate results and stop recursion and return from the method quickly?

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

More
16 Feb 2016 16:16 #3856 by support
Methods other than SubscribeXXXX/UnsubscribeXXXX perform synchronously and are therefore OK to block under error conditions until their timeouts expire - but obviously not forever. There are, however, many of them (mostly configurable), and they are quite long - up to 10 minutes.

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

More
15 Feb 2016 08:50 #3855 by sun21
Thank you for the quick answer.

Yes, the code to un-/re-subscribe is removed.

I need some time to make a test case. Now I see the effect in the app which is too complex to say for sure what is happening after network failure. But I think that the app does not call SubcribeMultiple that time. I think it somehow stalls inside the procedure to browse the tags, but I am not completely sure.

Serge

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

More
11 Feb 2016 15:39 #3839 by support
I have looked through our earlier conversation. It is my understanding that you have now removed the code that attempts to unsubscribe/resubscribe in case of errors, is that correct? - please confirm.

Assuming that the answer to the above is Yes, can you please describe in more details, setp by step, what is happening? Is it, for example, like this?

1. Network is somehow disconnected.
2. Your app calls SubscribeMultiple.
3. After cca 1 minute, the event handler for MonitoredItemChanged receives a notification with the .Exception property set to the error in your last post.
4. At about the same time, the SubscribeMultiple call finally returns?

Or is the sequence or the timing different?

Thank you.

We have not made any changes in this area so far. With the above describe sequence of steps, the only improper/unexpected behavior would be that the SubscribeMultiple call waits for 1 minute (until Step 4), instead of returning quickly after Step 2 - which we do not consider a major problem. But I need to be sure that I understand the observed behavior correctly first.

Best regards

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

Moderators: support
Time to create page: 0.067 seconds