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.

How To Handle Subscribing To An Inactive OPC Item

More
06 Sep 2021 12:07 #10186 by support
Hello.

Thanks for the details. I was under impression that the event log entries are generated by the system somehow (which I would have liked to investigate). But if they were just your own ones, it is clear now.

If you share with me what you are trying to achieve in terms of these invalid items, I might be able to advise further.

Best regards
ZZ

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

More
06 Sep 2021 11:55 #10185 by Bishop
Hi there,

Thank you for the information regarding the subscription model of QuickOPC and answering my questions. I think we need to develop some additional business logic around the "Activeness" of an OPC Item.

To quickly answer your quiestions:

Are you running under .NET Framework, or .NEt Core/.NEt 5+?

  • We are running .NET 5.0

Can you obtain details of these events?...

  • These events are thrown from within our own code via a logging adapter, if the EasyDAItemChangedEventArgs Succeeded property is False

Extra details regarding the errors/warnings can be seen in the XML code below.
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>3</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2021-09-06T09:24:27.272959100Z" /> 
  <EventRecordID>329051</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>"ComputerName"</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>Category: "ClassName" EventId: 0 2021-09-06 09:24:27Z ["TCP Address"] (0070) TagId : hhhffffdfasdf did not succeed *** Failure {http://opcfoundation.org/DataAccess/}E_UNKNOWN_ITEM_NAME: OPC NET API failure result "E_UNKNOWN_ITEM_NAME". + The client method called was 'ItemChanged'.</Data> 
  </EventData>
  </Event>

Kind regards,

Brett.

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

More
06 Sep 2021 11:19 #10184 by support
Hello.

The fact that QuickOPC allows you to subscribe to "anything", and that the errors with subscriptions are reported through the notification channel only, is at the heart of QuickOPC design, quite intentionally. By making a subscription, you indicate an intent to subscribe and stay subscribe. QuickOPC does everything to fulfill that request - including periodic retries - which is what you are observing. You should be aware that an item that does not exist now can become available later...

QuickOPC does not "perform a read on all subscriptions every 60 seconds ". Instead, it tries to add OPC items to OPC groups for those items that have previously failed. Between the QuickOPC and the OPC server, the "failed" item is *not* subscribed, you do not have to be worried about that - doing so is actually impossible, given how the OPC specs are written. It only appears to be subscribed, between QuickOPC and your code.

The retrial period is configurable, and you can set it to very long values if you like, or to Timeout.Infinite to disable the behavior: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ameters~TopicRetrialDelay.html . This needs to be set in static EasyDAClient.SharedParameters.TopicParameters.

The only part that surprises me are the event log entries. I have some questions:
1. Are you running under .NET Framework, or .NEt Core/.NEt 5+?
2. Can you obtain details of these events? I believe that by double-clicking, there should be more info available.

Best regards
The following user(s) said Thank You: Bishop

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

More
06 Sep 2021 09:58 #10183 by Bishop
I am busy investigating edge cases within our subscription workflow and have noticed that one may Subscribe to an inactive OPC Item (Or even one that does not exist) and still receive a handle back from the EasyDAClient.

The ItemChanged method is then still called for this inactive/non-existent OPC Item, which then raises the error below from within our event handler system.
*** Failure {http://opcfoundation.org/DataAccess/}E_UNKNOWN_ITEM_NAME: OPC NET API failure result "E_UNKNOWN_ITEM_NAME".
      + The client method called was 'ItemChanged'.

The ItemChanged method is then called every 60 seconds on the same inactive/non-existent OPC Item and the above error is raised, as can be seen in the image below.



Is this simply an internal default, where the EasyDAClient performs a read on all subscriptions every 60 seconds to compare against previous values?

Is this a known issue with subscribing to an inactive/non-existent OPC Item?

I would ideally like to handle this internally to not subscribe to an OPC Item if it does not exist or is inactive.

Any help with regard to the above issue would be extremely helpful.

Many thanks,

Brett.
Attachments:

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

Moderators: support
Time to create page: 0.054 seconds