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.

Slow reads (with bad quality) when the PLCs is off

More
07 Nov 2017 15:43 #5647 by jmolina
Thanks for the help. Today I have applied your recommendations and the app runs very fast.
Regards

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

More
07 Nov 2017 12:09 #5645 by support
The delay you are seeing is how long it takes the OPC server to return the data. So, primarily this is a question you should ask your server vendor.

Related information:

The behavior also depends on the read parameters (of type DAReadParameters) passed to the ReadMultipleItems call. They can specify a) that the data will be always be read from the device, b) that the device will be always provided from the OPC server cache, or c) that the cached data will be used if "fresh enough", but that the OPC server should perform a read from the device if the data is older. By default, the "c)" option is used, with value age set to 1 second. Quite likely the server has to retrieve the data from the device, which takes time - especially if there is some problem. You can speed up things by choosing to read data from the cache, but then of course you must consider the consequences - it may not be the up-to-date data you wanted.

See also e.g.:
Also note that (if your application is of that nature), it is better to use OPC subscriptions rather then repetitive reads (if you are doing them). Collecting the data would take the same time to the OPCserver, but your program is not blocked until the data is available - you are sent a notification when there is an update.

Regards

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

More
06 Nov 2017 18:48 - 06 Nov 2017 19:00 #5641 by jmolina
Hi,

I'm working with Visual studio 2015 creating a Windows Form app in C# with Classic .NET Connection. I'm using Matrikon OPC Server for Siemens and Matrikon OPC Server Simulation.
I execute multiple threads each 1000MS to read multiple tags for each thread, for this I use ReadMultipleItems. Another thread is executed each 500 MS to check the connection with the OPC Server, I do that with ReadItem.

Everything works fine but when the PLC or OPC is turn off the ReadMultipleItems and ReadItem methods are really slow to make the reads (bad quality reads, I need this bad quality reads). This not happens when there a network disconection of the PLC.

Example code: According to my tests the problem of delay is in these lines
DAVtq value = cliente.ReadItem("", "Matrikon.OPC.SiemensPLC.1", "TCP CHANNEL>RH1F120>MD17"); 
DAVtqResult[] tagsFinales = cliente.ReadMultipleItems(new ServerDescriptor("", "Matrikon.OPC.SiemensPLC.1"), tags);

The delay from the reads (with bad quality) is between 10S to 20S, so my question is ¿ there a method or something to set a parameter of time spended on the reads? The reconnection works without problem.

Please help with this.
Thanks
Last edit: 06 Nov 2017 19:00 by jmolina.

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

Moderators: support
Time to create page: 0.127 seconds