LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use datasocket to read OPC quality attribute?

I use the read datasocket VI to read data from an OPC server. How can I get the quality attribute of the data I read?
0 Kudos
Message 1 of 7
(3,682 Views)
May be it help:

Using DataSocket to Read OPC Quality and Timestamp Attributes
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E1E756A4E034080020E74861&p_node=DZ52000&p_submitted=N&p_rank=&p_answer=&p_source=External
Message 2 of 7
(3,682 Views)
Thanks for your answer, but it doesn't help much : I don't use Labwindows CVI, but Labview.
0 Kudos
Message 3 of 7
(3,682 Views)
Upss, sorry...
But LabVIEW have one sample with illustration how it possible. Look in examples:
Help->Find Examples->
Communicating with External Applications->OLE for Process Control (OPC)->OPC Quality and Timestamp Attributes.vi
(located in LabVIEW\Examples\comm\opc.llb
0 Kudos
Message 4 of 7
(3,682 Views)
You may want to start by looking at the two examples DS Writer with Attributes.vi and DS Reader with Attributes.vi. They ship with LabVIEW and do exactly what you are wanting to do. If you're reading from Datasocket it doesn't matter what type of server you're using because it's the same high-level interface for all of them. Therefore, what you see in these examples is what you will do with the data from the OPC server.
J.R. Allen
0 Kudos
Message 5 of 7
(3,682 Views)
Thanks a lot, it answers perfectly to my problem.

I am just suprised that all the dataskt.llb VIs are not directly reachable through the function palette.
0 Kudos
Message 6 of 7
(3,682 Views)
Well, thanks for yoour anxwer, but the exact answer to my problem is given in the "datasocket OPC" example. In this example, it says that : "This example uses the DataSocket VIs that shipped with versions of LabVIEW prior to version 6i. These VIs are provided with LabVIEW 6i for compatibility. The DataSocket primitives shipping with LabVIEW 6i are not currently fully compatible with OPC. When using DataSocket to connect to OPC Servers, use the older compatibility DataSocket VIs."

This comment explains why I couldn't find (in the current 6.1 LV version) a datasocket read vi allowing me to read the OPC quality status. The required VI exists in prior versions, and is given in dataskt.llb.
0 Kudos
Message 7 of 7
(3,682 Views)