Skip to content
  • There are no suggestions because the search field is empty.

OPC Data Client updates items at a different rate than requested

I am using your OPC Data Client to create my application.  I am subscribing to the items in my OPC Server.  The only problem is I am not getting the values back at the rate I requested.

For example I am setting an update rate of 30000 (30 seconds) but am receiving the items at a rate of about 21 seconds.  Why is this happening?  Is there a solution?

Explanation:

OPC Data Client assures that if the application uses a mix of update rates, that not so many OPC groups are created in the server.

The idea behind is that the update rate is always an approximation, it cannot be fulfilled precisely anyway. So, if the application asks for one item with 30010 milliseconds update rate, and then a second one with 30020 milliseconds, there really is no need to treat them any differently - the slight difference isn’t relevant, they can be both put to the same group. There is a concept of logarithmic-ally arranged “buckets” of update rate - so, by default, you have 6 possible real updates rates between 100 and 1000, 6 between 1000 and 10000, 6 between 10000 and 100000 and so forth. The real update rate chosen by EasyOPC is never slower than what you have asked for - if it’s not exact, the closest faster one is chosen.

You cannot turn this off, but by increasing the value below “Update rate buckets per decade” to higher number, you will get closer approximations to the update rate you pass in. There is almost no penalty for making this number really high (hundreds, thousand, whatever…) - the only penalty is that, if you THEN choose two update rates that ARE quite close, the optimization will NOT put them into the same OPC group.

Solution:

The Update rate buckets per decade property can be set either through the code, or through the property interface for the EasyDAClient object. UpdateRateBucketsPerDecade is a member of the EasyDAClientParameters class.