LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do my OPC calls via DataSocket slow down?

I've written my biggest application ever using DataSocket to make OPC calls to get data, and it slows down from 2 to 10 seconds per call after running for awhile.

There are no memory leaks. System resources seem fine when it happens.

VI Analyzer found nothing wrong.

What could cause this?
0 Kudos
Message 1 of 4
(2,491 Views)
There could be several causes for a slow connection from DataSocket.  If the connection to the OPC server is not very good, meaning it may lose connectivity and regain it, then this has a tendency to slow DataSocket connections.  You mentioned that you have written a very large application, so is it the case that you are using a large number of tags?  It may be that the OPC server's queue is getting full, which would cause a slow down as well.  DataSocket does have a plateau point which it can handle tags, so if you have, or more than, 100 tags, then this would significantly increase the amount of time for calls made to the server.  There is a good discussion of that last point at the following thread.
 
 
Hope this helps,
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 4
(2,471 Views)
I only have 13 tags, but two of them are arrays of 6 and 24; the others are scalars.

Thanks for the ideas.
0 Kudos
Message 3 of 4
(2,463 Views)

To help troubleshoot this issue I have a couple questions for you: Are you reading the tags in a loop and it takes 10 seconds to update or does the read itself take 10 seconds?  Are you using the front panel connections or the block diagram Datasocket VIs?  I might suggest switching between the VIs and the front panel connections and vise versa, just to see if you can get an increase performance.  I might also suggest just trying to read one tag and see if you get the same decreased performance.  This might give you an idea of connectivity.  If that does not cause any delays, try reading the array.

Andy F.

-----------------------------------------------------------------
National Instruments
0 Kudos
Message 4 of 4
(2,442 Views)