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.

Best method to read a lot of opc variables

More
12 Oct 2016 12:59 #4450 by support
It is correct in principle. Such a big read, however, can take long time, and the default timeout is set to 60 seconds.

It is possible to increase the timeout, e.g. like this (for 5 minutes):

client_.InstanceParameters.Timeouts.ReadItem = 5*60*1000;
You may also think of splitting the read in several chunks (but not very small ones). It is generally recommended to read as many items as possible in "one go", but it has one disadvantage, and that is, that you need to wait for all of them at once. Doing it in chunks gives you at least something sooner. Whether that's better or not depends on the use case.

Best regards

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

More
12 Oct 2016 10:09 #4448 by mpp
Hi, at the startup of my machine interface I need to read (and if a compilation variable is set write) more then 900 OPC variables which are machine parameters to control all the motors, parts, etc.

Actually I'm preparing a list of ItemDescriptors and read them in block with ReadMultipleItemsValue:
var itemDescriptors = new List<DAItemDescriptor>();
 
foreach (var item in variables)
{
    itemDescriptors.Add(new DAItemDescriptor(HandleOPC.PLC_ID + "." + item));
}
 
valueResults = client_.ReadMultipleItemValues(HandleOPC.OPCServerName, itemDescriptors.ToArray());

Is it correct?
If I scan the valueResults a lot of variables has the timeout exception.

What should I do?


Thanks in advance

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

Moderators: support
Time to create page: 0.046 seconds