LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket Open Connection.vi: getting soooo slow as number of items grows...

Hello: this is my question:
I try to do data acquisition connecting my PC to another PC that hosts an OPC server. I based my app upon the "Multiple OPC Items Monitor.vi" example and
it works well with small amount of tags. The problem is that I have 1,500 tags (no array tags on this kind of OPC server) and I notice that the "DataSocket Open Connection.vi" takes about 60min (!) to create the 1,500 tag references. Actually the 50-60 first tags are created very quickly but then it slows down until it reaches a 5s time to create the 1,500th tag! I use the same loop as in the NI example and I also tried using replace element in a preconfigured array but it does not help. On the other hand I g
et the same result with VB in less than 1min.

Then when the references are defined I get all values
in less than 1s which is perfect. What do you recommend? Would it be better to use "DataSocket Read" and to pass the all tagname string everytime I fetch the values (once per 2 s) or not? I do not think I will be able to read the 1,500 tags in less than 2s with the latter option whereas with the NI example its no problem. Please help...
Thank you very much in advance,
Chris

NI Software : LabVIEW version 6.1
OS : Windows 2000
0 Kudos
Message 1 of 2
(3,645 Views)
Chris,

as you have experienced the DataSocket OPC Client works fine for a limited number of items. The reason is the way it is implemented. To keep DataSocket OPC simple the user doesn't have to create OPC groups but one OPC group is created for each DS OPC connection. In fact every access to a single item acts like a single client connection to the OPC server. So if you open 1,500 DataSocket OPC connections this equals to 1,500 clients connected to the OPC Server...
To make a long story short. DataSocket OPC is good for no more than about 100 item connections.

A much better solution would be to use the LabVIEW DSC module. LV DSC enhances the architecture of LabVIEW by a second process called the tag engine. You can import items as tags into the tag en
gine and communicates to the OPC server through a single OPC group. The communication between the tag engine and the LabVIEW client application is event based (tags are only updated if their value has changed by a configurable amount). Addiotionally DSC provides features like data logging in a database, user managment, alarm handling and much more. The typical LV DSC project is 500 - 5000 I/Os.

Please refer to the following link for more information about LabVIEW DSC:
http://www.ni.com/labviewdsc

Regards,

Jochen Klier
Applications Engineering Group Leader
National Instruments Germany GmbH
Message 2 of 2
(3,644 Views)