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.

Unclear subscription problem

More
19 Dec 2017 16:19 #5754 by support
Good - thanks for letting me know.

Yes, when you subscribe to something, you cannot just let the code "flow" further. In essence, there has to be some waiting somewhere, so that the callbacks or events get chance to come in. And the EasyUAClient object is the object that generates the events, so that object needs to be kept around as well.

Let me know should you have further questions.

Best regards

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

More
19 Dec 2017 15:14 #5753 by yp
Replied by yp on topic Unclear subscription behaviour
Solved. My mistake. Looks like the associated client object and associated subscription goes out of scope unintended. One of those time you could hit yourself over the head ;)

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

More
19 Dec 2017 12:59 #5751 by yp
Replied by yp on topic Unclear subscription behaviour
Yes I see it being updated in the UAExpert in which I'm monitoring the value.
Regards.

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

More
19 Dec 2017 11:44 #5749 by support
If the value in the server changes internally, do you see the change in UaExpert or some other client?

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

More
19 Dec 2017 08:51 #5748 by yp
Replied by yp on topic Unclear subscription behaviour
Hi
I'm evaluating QuickOPC .NET for ease of use by customers of our application but am failing to get the subscription to work.

Our server application has a node with value of type string on 'A.B.C'.
I have 2 clients running: 1 = UA Expert tool to monitor and edit the server application and 2= QuickOPC client application.

In the QuickOPC application I've created a subscription like this:
nodeid = new UANodeId(2, "A.B.C");
easyUAClient.SubscribeDataChange(host, nodeid, 0, OnValueChanged);

What I notice is that the OnValueChanged callback is not called when the value changes internally in the server or when I modify it from the UAExpert tool.
The Callback is called however when I write to the node from within the QuickOPC client itself (as a test) like this:
easyUAClient.WriteValue(host, nodeid, "yp says hi");

In this case I also see the value in the UAExpexpert tool being updated so I know the nodeid and type is correct.

Any advise on this?
Kind regards.

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

More
19 Dec 2017 08:35 #5747 by yp
Hi,
I'm evaluating the QuickOPCUA .NET solution but I'm struggling with the subscription part. I've created a subscription like this:
//Node 'A.B.C" has value string
nodeid = new UANodeId(2, "A.B.C");
easyUAClient.SubscribeDataChange(host, nodeid, 0, OnValueChanged);

The 'OnValuechanged' routine isn't called at all when the value on the OPCUA server gets changed as a result of either internal value changes, or when I modify it from another OPCUA client. It does get called when I call it form the same process when I do an explicit write (easyUAClient.WriteValue(host, nodeid,"yp says hi");
Also my other external OPCUA client reflects the changes of my easyUAClient write so I conclude that the type and the nodeid are correct.
Any hints on what could be the isssue?
Regards.

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

Moderators: support
Time to create page: 0.052 seconds