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.

RX observabl;es only giving one value

More
31 Jul 2014 10:25 - 31 Jul 2014 10:26 #2114 by support
I have reproduced the issue. It has to do with the absolute deadband again being used, same as in your previous report.

I was surprised myself to see it behave this way. It looks like that the original design used a different default when this particular overload is used, WITHOUT defaulting to the absolute deadband, which would cause both the examples - in your previous post, and this one - work as you expected.

We will revert the behavior in a future release. Thank you for reporting this.

For now, if - in this particular example - you use the code below instead, it will work:
                UAMonitoredItemChangedObservable<float> dynamic =
                    UAMonitoredItemChangedObservable.Create<float>(
                        new UAMonitoredItemArguments(
                            null, 
                            "opc.tcp://localhost:51210/UA/SampleServer", 
                            "nsu=http://test.org/UA/Data/;i=10853",
                            1000));

Best regards
Last edit: 31 Jul 2014 10:26 by support.
The following user(s) said Thank You: giles

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

More
30 Jul 2014 18:57 #2111 by giles
ps I am uninstalling and reinstalling to make sure it is nothing I have done. I am running on windows 8 btw and the RX DA example works fine. I also tried it out with a node opc server and the server publishes to it and unsubscribes at the end but the observable just doesn't pick anything up except the first ....

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

More
30 Jul 2014 18:29 #2110 by giles
Your UA obbservable example (below) only produces one sample. - surely it should produce a constant stream? The opc node is definitely changing constantly on the server...
// $Header: $
// Copyright (c) CODE Consulting and Development, s.r.o., Plzen. All rights reserved.
 
// ReSharper disable CheckNamespace
// ReSharper disable PossibleNullReferenceException
#region Example
// Shows how to create an observable for OPC-UA monitored item changes, and subscribe to it.
using OpcLabs.EasyOpc.UA.Reactive;
using System;
using System.Threading;
 
namespace ReactiveDocExamples
{
    namespace _UAMonitoredItemChangedObservable
    {
        class Subscribe
        {
            public static void Main()
            {
                Console.WriteLine("Creating observable...");
                UAMonitoredItemChangedObservable<float> dynamic =
                    UAMonitoredItemChangedObservable.Create<float>(
                        "opc.tcp://localhost:51210/UA/SampleServer", "nsu=http://test.org/UA/Data/;i=10853", 1000);
 
                Console.WriteLine("Subscribing...");
                using (dynamic.Subscribe(e => Console.WriteLine(
                    e.Exception == null ? e.AttributeData.ToString() : e.Exception.GetBaseException().ToString())))
                {
                    Console.WriteLine("Waiting for 10 seconds...");
                    Thread.Sleep(10*1000);
 
                    Console.WriteLine("Unsubscribing...");
                }
            }
        }
    }
}
#endregion
// ReSharper restore PossibleNullReferenceException
// ReSharper restore CheckNamespace


and the output =

0) Return
1) "ReactiveDocExamples._DAItemChangedObservable.Subscribe.Main"
2) "ReactiveDocExamples._DAWriteItemValueObserver.OnNext.Main"
3) "ReactiveDocExamples._DAReactive.Composition.Pipeline"
4) "ReactiveDocExamples._UAMonitoredItemChangedObservable.Subscribe.Main"
5) "ReactiveDocExamples._UAReactive.Composition.Pipeline"
6) "ReactiveDocExamples._UAWriteValueObserver.OnNext.Main"
Select action to perform <0>? 4
Creating observable...
Subscribing...
Waiting for 10 seconds...
-2.361808E-31 {System.Single} @30/07/2014 18:25:56 @@30/07/2014 18:25:56; Good
Unsubscribing...
Press Enter to continue...

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

Moderators: support
Time to create page: 0.051 seconds