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.

Accessing sessions from EasyXXClient

More
18 Feb 2016 06:12 #3858 by support
Internally, the event for connection changes (on EasyUAClient, that is) is implemented and tested OK. It will be available in the next version, together with other improvements (some quite big, such as support for OPC UA Events and Conditions).

The software is ready to be released, but we are waiting with the release, and I cannot give a specific date currently. There is a peculiar reason for it: For several reasons (which are not relevant at the moment), the new version will require .NET Framework 4.6 or higher (and the developer projects will have to target .NET 4.6 or higher). Taken broadly, this should not be a big problem, because the previous versions requires .NET 4.5 (or 4.5.1, 4.5.2), and .NET 4.6 is an in-place upgrade to that. And, Microsoft is no longer supporting anything between .NET 4.0 and 4.5.2, effective approx. middle of January 2016.

But we know that sometimes our customer have their good reasons to stay with older frameworks, and in some cases even cannot migrate easily. So, while majority of our customers will be OK with .NET 4.6, we do not want to disappoint the remaining few. And the likeliness of it diminishes with the time - the later we release, the smaller number of developers will be affected, as people migrate away from older frameworks anyway, gradually.

So we need to weigh the pros and cons of when to release. In the meantime, we are working on the software anyway and accumulating the improvements in the new version.
The following user(s) said Thank You: mairoldi

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

More
17 Feb 2016 12:56 #3857 by mairoldi
Hi, I'm currently evaluating a new project where I'd like to use QuickOPC.
Any idea when version 5.36 will be available ?

Thanks and kind regards. :)

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

More
29 Oct 2015 10:56 #3632 by mairoldi
OK thanks, your explanation makes it perfectly clear how the philosophy behind QuickOPC is to hide away ("do it for you") all the connection-related issues, and it's perfectly acceptable and makes sense.

I agree 100% the application has to manage tag-related issues on a tag basis, and that's actually what we do. Using more low-level frameworks we just used to have to manage connection-related problems too, and that was the source of my concerns.

Once enough diagnostic info is provided through the events, it will solve my other issue.

As I said, it would be nice to have detailed diagnostic info, specifically the retry timers, but it's definitely not mandatory as long as I get updates every time the connection state changes and I can check the reason why (exception).

I'll be looking forward to version 5.36!

Thanks again and kind regards. :)

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

More
29 Oct 2015 10:32 - 29 Oct 2015 10:32 #3630 by support
There are two parts to my answer:

First, I agree that in some scenarios it is good to know more about the connection status. As stated already, the new event on EasyUAClient will take care of that in version 5.36. In the current "in-works" implementation it provides the Connected/Disconnected status and the reason for disconnection (the Exception), but based on your input, we may enhance it to include more info - this is yet to be decided.

Second, and here I still disagree with you, such information should normally have no influence on the application logic. It should be for display, logging, diagnostics, but not more. Your reasoning seems to be based on several assumptions that do not actually hold.

One of them is that connection-wide problem are somewhat special and need a special attention. In fact, they are not. The final intent of the application is to communicate with a "tag" in the server; the connection is just a means to that purpose. There are many "tag-level" problems that can occur, i.e. there can be problems with a single tag or a group of tags, while other tags behave just normally. Such problems include, but are not limited to, e.g. a server misconfiguration, or a subscription-level (e.g. keep-alive) problem which affects only some monitored items but items that live on other subscriptions (inside the *same* connection) are unaffected. You get an error indication (Exception object) with each result/notification for each monitored item. A well-written application must therefore be prepared to handle situations in which the result/notification for a monitored indicates an error. When such logic is already in place, all failure situations are covered - and there is no need to add extra logic to look for connection-wide failures. The code just needs to handle the failures on the "tag" level - because they *can* always appear - and that, in fact, handles everything already.

Second incorrect assumption is that by somehow detecting a connection problem, and having extra logic to handle it, you make the application more efficient. This is not the case. If you call SubscribeMultipleItems with 1000 items, and the server is not accessible, the call won't take 1000 times longer. Furthermore, let's say that you call SubscribeXXXX with just 1 item, and the server is inaccessible and is put on "retrial period". Then, if you call another SubscribeXXXX immediately after the first call, it will *not* try to connect to the server again. It will simply return the error from the first call, without even trying. Therefore, your argument "meaning if the connection is not healthy there's no point in trying to subscribe more items right away and wait for another timeout" is in fact correct, *but* that logic is already built into the QuickOPC! What you are doing is tremendously complicating your own code for no reason.

In QuickOPC, a subscription denotes a permanent intent to be subscribed to something. As such, it does never fully "fail" - even if it's not possible to make the subscription the first time, the component will keep trying - until the corresponding UnsubscribeXXXX call. Want to make an HMI screen with 100 items? Just subscribe to them ONCE, do not think about reconnections, and display the notifications as they come. Want to make a logger for 1000 items? Do the same - subscribe once, and log the notifications. Forget about those connection handling complications on you side.

If you still think that your application requires to handle the connection status, then please explain why - but not in lower terms of API calls ("I need to make this because I think it is more efficient"), but rather in the term of the application domain - what do you want to do with the data and how. Perhaps that would then explain the "mismatch" between the perceived requirements and behavior of the component.

Best regards
Last edit: 29 Oct 2015 10:32 by support.

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

More
26 Oct 2015 13:12 #3626 by mairoldi
Please see below the detailed explanation I gave last year.

If there is a more "QuickOPC-compliant" way to achieve my goals, I'll be more than happy to know! :)

Kind regards.

mairoldi wrote: I'm interested in both "a" and "b" actually.

I'll try to clarify what I would like to obtain more in detail: in a typical application, I'll connect to one or more OPC servers, in order to obtain different sets of data. For each OPC server, I'll subscribe to one or more items. Subscription to items may be dynamic: during the application life-time, I may subcribe to more tags as needed, and unsubscribe from some.

The first issue I see is that in order to know if a connection to a server is healthy, I currently have no choice except keeping state information about one of the items I subscribed with that server (since I can't direcly access the corresponding session object). This may lead to moderatly complex scenarios if I must consider any tag as transient: I may need to iterate through the available items to choose the first available item for every server or something similar. If I had access to session objects (and a link from items to sessions and from sessions to items), I'd be able to instantly access all this information as needed.

Furthermore, I currently must set up and manage a connection state to handle the transition from the subsctiption to the first MonitoredItemChanged event, and all the following state changes. This is a minor issue of course, but still an issue.

And finally (this is "b"), I currently have no way to show more detailed diagnostics regarding each server connection. A typical diagnostic view in our software products shows the current connection state (not connected, connecting, connected with no error, timeout and retrying, fatal error...) and any related running timer (meaning if there is any kind of retry in action, I want to show how long it will take for the next try and so on).

Just to give you a few more details, my current solution is wrapping an EasyXXClient object inside a custom made container, which handles connection state information, lets me add and remove items (and subscribe/unsubscribe them depending on the current connection state - meaning if the connection is not healthy there's no point in trying to subscribe more items right away and wait for another timeout), and automatically gets item data and state from events, updating item container objects which are in turn accessible from the rest of the program. However, in order to simplify the architecture of this containers, I currently use a different container object for each OPC server connection (and any of these objects contains a different EasyXXClient instance). This is absolutely acceptable, although it does feel like I'm capping down the EasyXXClient object capabilities in order to obtain what I need.

Hope this clarifies things a bit.
Thanks again for your kind answer, and I sure hope this can help you with improving your great product. :)

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

More
26 Oct 2015 12:46 #3625 by support
Not in version 5.35.

Version 5.36 will have an EasyUAClient.ServerConditionChanged event for this. The release date for this version is not fixed yet but I'd expect it be in 2-3 months from now.

However in most cases, requests for a feature like his come from misunderstanding of how QuickOPC works. I would welcome if you can explain your use case/what are you trying to achieve.

Best regards

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

More
26 Oct 2015 11:31 #3624 by mairoldi
Hi I just downloaded the latest (5.35) version of QuickOPC.
Are there any news concering the topic of this post in this new release ?

Thanks and kind regards.

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

More
27 Apr 2014 07:40 #1897 by support
Thank you very much for detailed explanation. It is very useful for us to know how the developers use (or want to use) our software.

Access to connection state appears to be recurring requirement, and I will try to put to higher position in the planning list.

Regarding "b)", some of what you are looking may be already possible to extract from the information currently provided, but in a complicated manner - I now understand that it needs to be "packed" nicely for it to be usable to the developer without much further coding.

Thanks again, and best regards

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

More
25 Apr 2014 12:17 - 25 Apr 2014 12:20 #1895 by mairoldi
I'm interested in both "a" and "b" actually.

I'll try to clarify what I would like to obtain more in detail: in a typical application, I'll connect to one or more OPC servers, in order to obtain different sets of data. For each OPC server, I'll subscribe to one or more items. Subscription to items may be dynamic: during the application life-time, I may subcribe to more tags as needed, and unsubscribe from some.

The first issue I see is that in order to know if a connection to a server is healthy, I currently have no choice except keeping state information about one of the items I subscribed with that server (since I can't direcly access the corresponding session object). This may lead to moderatly complex scenarios if I must consider any tag as transient: I may need to iterate through the available items to choose the first available item for every server or something similar. If I had access to session objects (and a link from items to sessions and from sessions to items), I'd be able to instantly access all this information as needed.

Furthermore, I currently must set up and manage a connection state to handle the transition from the subsctiption to the first MonitoredItemChanged event, and all the following state changes. This is a minor issue of course, but still an issue.

And finally (this is "b"), I currently have no way to show more detailed diagnostics regarding each server connection. A typical diagnostic view in our software products shows the current connection state (not connected, connecting, connected with no error, timeout and retrying, fatal error...) and any related running timer (meaning if there is any kind of retry in action, I want to show how long it will take for the next try and so on).

Just to give you a few more details, my current solution is wrapping an EasyXXClient object inside a custom made container, which handles connection state information, lets me add and remove items (and subscribe/unsubscribe them depending on the current connection state - meaning if the connection is not healthy there's no point in trying to subscribe more items right away and wait for another timeout), and automatically gets item data and state from events, updating item container objects which are in turn accessible from the rest of the program. However, in order to simplify the architecture of this containers, I currently use a different container object for each OPC server connection (and any of these objects contains a different EasyXXClient instance). This is absolutely acceptable, although it does feel like I'm capping down the EasyXXClient object capabilities in order to obtain what I need.

Hope this clarifies things a bit.
Thanks again for your kind answer, and I sure hope this can help you with improving your great product. :)
Last edit: 25 Apr 2014 12:20 by mairoldi.

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

More
25 Apr 2014 05:39 #1891 by support
Unfortunately, the answer is negative - there is no such capability currently. It is on the "wish list", however.

Can you please describe more about the use case that requires this? Is you your goal more to
a) have way to "get" the state at any time you want (instead of receiving it via events), or b) getting MORE information than you are getting now? (and if so, what precisely are you interested in?).

In case you need more details in cases of errors, there are actually properties on the exception(or inner exceptions) that may already have this information. Let me know what are your requirements.

[moving this to a different forum category]

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

Moderators: support
Time to create page: 0.077 seconds