- Posts: 23
- Thank you received: 1
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.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Reading, Writing, Subscriptions, Property Access
- Reading already subscribed item causes troubles with State
Reading already subscribed item causes troubles with State
Thank you for quick fix, it works great now.
Best regards,
Kristian
Please Log in or Create an account to join the conversation.
The problem is now fixed, in QuickOPC 5.80.274, which is now on our Web site (Downloads) and www.nuget.org.
Thank you again for reporting it.
Best regards
Please Log in or Create an account to join the conversation.
As it turns out, it is a bug in the Item Caching optimization. Essentially, when you do Read, and there is a value from Subscription notification that is of the good age, it is provided to you instead, bypassing the actual OPC Read. You get the VtqResult from the subscription, but of course the State should have been replaced by the one that you specified for Read - which is not happening.
There is a workaround - turn off the Item Caching optimization. See here: opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...html#OPC%20DA%20Optimizer.html , i.e. in your case:
DAOptimizerPluginParameters? optimizerPluginParameters =
opcClient.InstanceParameters.PluginConfigurations.Find<DAOptimizerPluginParameters>();
if (!(optimizerPluginParameters is null))
optimizerPluginParameters.EnableItemCaching = false;
Best regards
Please Log in or Create an account to join the conversation.
Attachments:
Please Log in or Create an account to join the conversation.
Is this something for which you can provide a code that shows the problem, with some OPC DA server accessible to us?
I can try to write the code and reproduce, but there is a danger that it won't show up.
Regards
Please Log in or Create an account to join the conversation.
Unfortunately, using OpcLabs.QuickOpc 5.80.255 does not solve the problem.
Kind regards,
Kristian
Please Log in or Create an account to join the conversation.
I agree this looks like a bug.
However, you are using an older version. First thing to do is to try to reproduce with the current QuickOPC version. If it remains a problem, we will investigate.
Best regards
Please Log in or Create an account to join the conversation.
I am communicating with OPC DA server using OpcLabs.QuickOpc 5.63.246 (.net6.0). In my application I perform subscription to the item A at startup, and in some cases I need to read the value of item A using EasyDAClient.ReadMultipleItems(DAReadItemArguments[] argumentsArray). Data source is ByValueAge and ValueAge is 1 sec.
Both for subscription and for reading I use State and operate with that when I get the response from OPC DA server. In most cases I perform read operation after the value changes, so it happens after I get subscription notification (< ValueAge). The problem is, in this situation State contains wrong object. Instead of State I specified in the DAReadItemArguments before reading using EasyDAClient.ReadMultipleItems(DAReadItemArguments[] argumentsArray), I receive object of type OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient+DelegationRecord, which is impossible to operate with.
Specifying ValueAge = 0 sec fixes the issue, but this is not expected behavior and seems to be bug.
Best regards,
Kristian
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Reading, Writing, Subscriptions, Property Access
- Reading already subscribed item causes troubles with State