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.

HoldPeriods

More
27 Nov 2012 18:13 #1121 by support
Replied by support on topic Re: HoldPeriods
Hello.
First, I have to apologize - the information given earlier was not fully correct, as I have realized by looking at your settings. The .HoldPeriods.TopicRead and .HoldPeriods.ToipcWrite of course apply to reads/writes (I have incorrectly stated that HoldPeriods only have to do with explicit subscriptions).
There is nothing wrong with your settings below. Of course when reading always from cache, one needs to be prepared that the cache is not always filled in with good quality data - especially in the beginning. The "operation failure" information is not sufficient to determine what's wrong. For example, if you have used ReadItemValue/ReadMultipleItemValues (as opposed to ReadItem/ReadMultipleItemValues), the reason may simply be a Bad quality. Or, it can be something else - it is necessary to examing other fields of the exception, especially the InnerException and the Source. Can you please find this out?

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

More
27 Nov 2012 09:50 #1120 by empir
Replied by empir on topic Re: HoldPeriods
Hi!
I tried with these settings yesterday.

opcControl.ClientMode.DataSource = DADataSource.Cache;
opcControl.HoldPeriods.TopicRead = 12000;
opcControl.HoldPeriods.TopicWrite = 12000;
opcControl.UpdateRates.ReadAutomatic = Timeout.Infinite;

I got 'Operation failure' directly when trying to read. Is there something wrong with this combination?
>Regards Owe

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

More
27 Nov 2012 07:48 #1119 by support
Replied by support on topic Re: HoldPeriods
Hello,

80 or 800 tags is not high number per se, we work with thousands normally, but it all depends on how often you read/write them, or how often they change (in case of subscriptions).
When you do SubscribeItem, you will get notification all the time until you call UnsubscribeItems. The HoldPeriod is only an internal optimization, and only applies AFTER you unsubscribe. It means (roughly) that after UnsubscribeItem, the actual OPC subscription is not immediately removed, but is held for certain period. The reason why HoldPeriod exists is that many applications such as HMI-like apps have forms that subscribe to a set of items, and if you switch to a different form, there may be many same items, and it would be unnecessary to unsubscribe from an item and then subscribe to it again in just a few milliseconds. If your application is not alike this scenario, you can set HoldPeriod to zero. I do no see, however, how HoldPeriod can have anything to do with your issue.
I'd like to reinstate the fact the "Device failure" quality is something that should indicate device failures, and can only come from the target OPC server. If it is generated in situations when it should not, you need to investigate on the OPC Server side, not on the client side.

Best regards

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

More
26 Nov 2012 08:54 #1118 by empir
Replied by empir on topic Re: HoldPeriods
Thanks!
I seems like the opcserver we use doesn't like "internal" subscriptions or something like that. I think the load is getting to big. The production works without problems in about 15 minutes. After that the problems seems to come, Device failure, bad quality etc. Thats when all tags in the OPC server has been read or written to.

What happens with the Items i subscribed to with SubscribeItem after the HoldPeriod has passed. Won'tI get Notified anymore?

We subscribe to about 80 tags and read/write about 800.
>Regars Owe

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

More
26 Nov 2012 07:56 #1117 by support
Replied by support on topic Re: HoldPeriods
Hello,
the HoldPeriods are only used with subscriptions that you explicitly make using SubscribeItem/SubscribeMultipleItems.
If you do not use SubscribeItem/SubscribeMultipleItems, and you want to prevent any OPC subscriptions being used internally, you can enforce that by setting both UpdateRates.ReadAutomatic and WriteAutomatic to Timeout.Infinite (-1). UpdateRates.WriteAutomatic is already equal to Timeout.Infinite by default, so in reality you just need to set the ReadAutomatic.
I am not completely sure where you are getting to, so if I have not answered your question in full, let me know.

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

More
23 Nov 2012 08:42 #1112 by empir
HoldPeriods was created by empir
Hi!
If I set
- HoldPeriods.TopicRead=0
- HoldPeriods.TopicWrite=0

is it then no "internal subscriptions" made in the component?
Or should I set this to -1 instead?

If I set DataSource=Cache. Is HoldPeriod still relevant or are
they only used when setting is ByValueAge?

Regards Owe


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

Moderators: support
Time to create page: 0.049 seconds