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.

Reactive write value, operation succeeded/failed verification mechanism?

More
11 Dec 2014 08:49 - 11 Dec 2014 08:50 #2567 by support
Yes, you are right, in principle. Automatic reconnection only applies when there is a need for it - which there isn't, when the one-off methods like Write has already failed, and is not being called again.

If one Write fails on the observer, but more are coming, then at some point, the client will attempt to reconnect to the server, though.
Last edit: 11 Dec 2014 08:50 by support.

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

More
10 Dec 2014 15:18 #2564 by rvbr@allseas.com
First of all thanks for very simple wrapper over UAWriteValueObserver the idea! This will indeed do the job.

Second about my example scenario: Your right, I had a little brain malfunction. I was under the assumption that my write subscription would recover when the server went off-line for a little while, (after a successful initial subscription) in the following case:

public void Initialize()
{
//Subscribe to my observable integer that updates every second.
this.MyDisposable = this.MyObservableInt.Subscribe(UAWriteValueObserver.Create<int>("opc.tcp://localhost:51210/UA/SampleServer", "nsu=http://test.org/UA/Data/;i=10389")));
}

But this is not the case, it will stop posting in both cases: successful initial subscription, or not.

This automatic recovery, after a successful initial subscription, only seems to hold true for the UAMonitoredItemChangedObservable...

Hope that I have not created even more confusion with this post ;)

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

More
10 Dec 2014 14:07 #2562 by support
The OnNext method of the UAWriteValueObserver will throw an UAException in case of a problem. How this exception is handled depends on who calls the OnNext, so without knowing your app, I cannot tell what happens with such exception further.

In case the classes that you are using somehow hide this exception or does not allow you to recognize it, it should be possible to write a very simple wrapper over UAWriteValueObserver which would override the OnNext method and handle the exception as needed.

I am not sure if I fully understand the example scenario part where you say "The client will not re-connect to the server in this scenario". If a one-time operation (such as Write) fails because a connection to the serer cannot be made, an error is returned, and the server is internally put into a "failure" state. A reconnection will be made after a configurable period, but ONLY if the application makes further requests (such requests will simply return the last error while we keep the server in "failure" state). The period assures that if the application makes repeated requests, the system is not overloaded with endlessly trying to connect to the server and failing over and over immediately. You are right, however, that "just by itself", no reconnection attempt will be made: Only when you ask for something (Read, Write, ...), a connection is needed - we do not try to reestablish it just because it has failed earlier - there must also be a need for it.

If I have misunderstood something, let me know.

Best regards

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

More
10 Dec 2014 10:43 - 10 Dec 2014 10:54 #2560 by rvbr@allseas.com
Is there a nice way to detect if an UAWriteValueObserver write value operation has succeeded/failed?

When using the UAMonitoredItemChangedObservable I get all the information I need to determine if the UA server and client are happy. But how do I detect there happiness when using the UAWriteValueObserver to write a value :unsure:

Example scenario:
I start my client software before my UA server is up-and-running. How do I detect that the server is missing when using the UAWriteValueObserverpatiance? The client will not re-connect to the server in this scenario... (Or it takes longer than I have patience.)
Last edit: 10 Dec 2014 10:54 by rvbr@allseas.com.

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

Moderators: support
Time to create page: 0.059 seconds