LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC, Datasocket vi's, and ActiveX

Hi,
I remember reading a knowledgebase entry that mentioned that some Datasocket vi's use activex which could make updates slow, and there was a newer set of vi's with "sync" in front of them which do not use activex. My question is, which vi's do you get with LV v6.1? Are there still problems using the 2 datasocket vi's "read" and "write"? Should I use the vi's in the datasocket vi library? I'm going to use these to connecto to an OPC server to monitor/set PLC registers.
Thanks!
0 Kudos
Message 1 of 6
(3,427 Views)
The "sync" Datasocket VIs appeared a while back (LV 5.1) because of problems with Active-X events. The main problem was that datasockets stopped communicating if you clicked and dragged a window. To fix this, the "sync" datasocket VIs were released:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/862567530005f09c862567c2007af1ef?OpenDocument

With the release of LV6, a whole new datasocket function was created. This is the yellow "Datasocket Write" and "Datasocket Read" function. These essentially contained a connect, write and disconnect inside them. Many people dislike these simplified functions because they are much slower (among other problems). These yellow LV6 functions do NOT appear to have trouble with events. LV6
and 6.1 still include the old datasocket functions (not the sync ones), but you have dig them out of vi.lib\platform\dataskt.llb. You can also download the sync vis from the link above and re-compile them for use in LV6.

So... in summary, LV6 has three options for using Datasockets:

1. Old Style Datasocket VIs. Use connect, write, read and disconnect just like you did in LV5.1. But these VIs still have trouble with events.

2. Download and recompile the sync VIs. These are the same as the VIs in option 1 above, but do not have trouble with events.

3. Use the new LV6-style datasocket VIs that are included with 6i and 6.1 ... but these are slow.
http://www.medicollector.com
Message 2 of 6
(3,427 Views)
<
I didn't really answer this question. In my opinion,

I would use LV6 and use the OLD-STYLE datasocket VIs. Also, use the sync VIs if you find that you stop receiving data when you click on a window.

Why I like the old-style Datasocket VIs better than the new LV6 functions:

-MUCH faster. The new functions must connect, read and disconnect each time you call the function.

-You can maintain connections and check the status of connections using the old-style VIs.

-If you are writing to datasockets using the new LV6 functions, you will sometimes be unable to see the URL in the browse window when you use "DataSocket Select URL.vi". This seems to be because the function disconnects
from the URL after each write.
http://www.medicollector.com
0 Kudos
Message 3 of 6
(3,427 Views)
John Paul,

Thanks for the explanation! Exactly what I was looking for.
0 Kudos
Message 4 of 6
(3,427 Views)
I have a similar problem, and want to try the old datasocket method to see if I get a performance boost. I am currently using LabView 6i. How can I access the old datasocket VIs? Where do I find them? I can only find the new method VIs.
0 Kudos
Message 5 of 6
(3,427 Views)
How can one implement the Old Style Datasocket VI in LV6i? All I can find are the new style datasockets.
0 Kudos
Message 6 of 6
(3,427 Views)