Professional OPC
Development Tools

logos

Some items doesn't update when callin ReadMultipleItemValues (or ReadMultipleItems) using Kepware

More
11 Feb 2015 18:20 #2754 by admin
The problem is, I think, within the server (although Kepware is a quality product, and we have the best experience with it). I have explained it earlier - see bullet #4 in my post from 09 Feb 2015 08:51. Our client - in its default setting - not only does the Reads you tell it to do, but also creates an OPC subscription for the data, and then manages the update rate of the subscription to match the rate of incoming Reads, provided that the app is doing them periodically. This helps with performance with applications that, for whatever reasons, do not use OPC subscriptions but rather issue periodic Reads (which is, generally, discouraged in the OPC world). And, the server does not handle well - from time to time, it sends us the old data, through the subscription. In fact this can sometimes be explained given the background polling mechanism that may exist in the server and may have a different rate altogether, BUT even in such case the server should timestamp data properly, - not with the current time of sending them, but rather with the time the data were collected. This also explains why you haven't seen the issue with other OPC clients. But, if the other OPC clients allow you to create an active OPC group with specific update rate, and also issue Reads using the same group, you would most likely get the same problem.

The settings we/you have posted disable this mechanism on our side. With them, we create an inactive with with "infinite" update rate, i.e. such that does use the subscription.

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

More
11 Feb 2015 11:13 #2753 by forum-dv
Problem solved:

The solution was:
EasyDAClient.SharedParameters.Engine.AutoAdjustmentPeriod = System.Threading.Timeout.Infinite;
 
EasyDAClient.SharedParameters.Topic.SlowdownWeight = 0.0f;
EasyDAClient.SharedParameters.Topic.SpeedupWeight = 0.0f;
opcClient = new EasyDAClient();
opcClient.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
opcClient.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;

Can you comment the solution?
What is actually going on behind the scene?

Thanks

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

More
09 Feb 2015 07:51 #2744 by support
Dear Sir,
Thank you for the details.

Here are my findings:

1. Unfortunately you have not captured the whole session. For precise analysis, it would be worth having the whole thing. But I think I was able to make a reliable conclusion anyway.

2. Unfortunately, in your own log, you have not captured the times when you have received the data, although this has been suggested in the instructions. Nevertheless, as there isn’t so much data and it corresponds to the output from the OPC Analyzer sequentially, I think that I was able to match them.

3. The conclusion from the analysis is: The data we give you are precisely the data we receive from the server. Please see the export from the OPC Analyzer (sent to you by email), where the data from the server are highlighted, and they are the same as in the output from your program. If you believe that this is not the data you should get, you should take this output/export from the OPC Analyzer, and resolve the issue with Kepware.

4. This said, I have a suspicion that the problem may be related to the fact that besides making the Reads, we have a subscription set up for the data. There is nothing wrong with it, but it gives higher chance of confusing some servers. I have given you instructions on how to disable this, they are on the forums. But as far as I can tell, your program does *not* contain the necessary settings, therefore in fact you weren’t testing what I have told you. Please correct it, and if the problem persists, send the new traces, this time containing the times of events on your side as well, and a new program, for confirmation.

Best regards,

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

More
07 Feb 2015 20:06 #2737 by forum-dv
Hello again.

I sent email with zip file to mr. Zbynek.

I also include:
- Test App project (VS2010)
- Output of Test application -> made during OPC trace
- Trace file

Please keep in mind that I am working on .net 4.0 (cannot upgrade to 4.5)
(I will try to upgrade for testing purposes)

Thanks

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

More
07 Feb 2015 15:43 #2736 by admin
Great, thank you.

The instructions are here:

www.opclabs.com/files/knowledgebase/QuickOPC/QuickOPC-1-How%20to%20use%20OPC%20Analyzer.pdf

And the actual tool is here:

www.opclabs.com/resources/product-information/knowledge-base/category/49-restricted

If you can, please make the tests with as small number of tags as possible. This makes it easier to analyze the logs.

Best regards

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

More
06 Feb 2015 07:15 #2729 by forum-dv
I am sorry for that.

Yes this tag is on PLC (S7-315-2PN/DP)
No tags are simulated.

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

More
06 Feb 2015 07:03 #2728 by support
Thank you. I am still missing an answer to this:

Is this with a tag that truly resides on a PLC, or isn't it somehow set to be "simulated"?

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

More
05 Feb 2015 22:47 #2726 by forum-dv
Hello!

I am sorry to say that non of you suggestion worked.

I have tried several things:

1. Changed DB: DINT -> DWORD
2. Shorten OPC Tag names to max 6 chars
3. Create new DB in PLC (DB6)
4. Reserve only 1 DINT value in DB6
5. Tried to read values in at least 3 different ways (no success)
New Test WinForm App
- Reading cycle in worker thread (backgroundWorker)
- Reading cycle in Timer

These functions were called in each cycle
- ReadItem
- ReadItemValue
- ReadMultipleItems
- ReadMultipleItemValues

All produced the same results.

I am asuming that something must be wrong with my OPC library installation or VS2010 installation.

Can you give me directions about OPC Analyzer Tool (Where can I get it,...)

Thanks

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

More
05 Feb 2015 12:28 #2717 by support
QuickOPC 5.32 requires .NET Framework 4.5 or later.

If you cannot make this upgrade, please add the code for disabling automatic subscriptions, plus this line (at the very beginning, before the first EasyDAClient instance is created):
EasyDAClient.SharedParameters.Engine.AutoAdjustmentPeriod = System.Threading.Timeout.Infinite;

If it does not help, we may use an OPC Analyzer tool (I will help with that) to figure out the reason.

Is this with a tag that truly resides on a PLC, or isn't it somehow set to be "simulated"?

Best regards

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

More
05 Feb 2015 11:48 #2715 by forum-dv
Hello!

Sorry for not mention it earlier:
I am working on .net 4.0 so I am using QuickOPC 5.23.

Is this update suitable for my version too?

Thanks

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

Moderators: support
Time to create page: 0.225 seconds

      

 Recommend this on Google