LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the quality of OPC tag in LV8.0 DSC?

I've tried several methods to read the quality of an OPC tag, finally, I find only two methods:
1. use shared variable value change notification in event structure, but the event will be called only when data changed, In my situation, when problems happened on my OPC server, the data still stay unchanged while the quality goes to bad. So I cann't get the bad quality in this way.
2. use datasocket as in Labview7.0, it works OK. But I don't want to write additional code since I already created a Shared Varialble.
Is there a good way to get the quality of OPC tag through SV?
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 11
(10,927 Views)

I haven't tried this myself, but did you take a look at the error code in the Error cluster of the Shared Variable?  There could (should?) be a warning code in there for bad quality..

-Khalid

0 Kudos
Message 2 of 11
(10,921 Views)
I tried, but there is no error in the error cluster of Shared Variable when its quality go to bad.Smiley Sad
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 11
(10,916 Views)

Hi,

There are some quality codes that are ignored and not returned for the Variable node for various reasons, or are returned as a warning instead of an error.

For example a quality of "No known value" does shows up as a warning.
-or-
I also believe If you have a "write only" variable, the variable node does not get the quality.

Can you tell me what "bad" qualities you have encountered? are you using read/write nodes? Are the variables themselves "write only" / "read only"?

-Lorenz

Message Edited by Lorenz03Tx on 03-28-2006 08:35 AM

Message Edited by Lorenz03Tx on 03-28-2006 08:39 AM

0 Kudos
Message 4 of 11
(10,906 Views)
The "bad quality" means when I browse OPC tags in OPC Client Server Explorer, the quality of the tag go to bad.   I binded Shared Variable to this OPC tag. So how can I get the quality from the Shared Variable? And How to read the warning infomation?
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 11
(10,884 Views)
UP again
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 11
(10,870 Views)
up
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 11
(10,840 Views)

What's up?  Or should I say, wassssup?!  Smiley Very Happy

Message Edited by Khalid on 03-31-2006 01:41 AM

Message 8 of 11
(10,838 Views)
I just want to make this article to be read againSmiley Tongue
--------------------------------------------------------------------------------------------------------------------------
LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn
---------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 11
(10,834 Views)

Sorry for the delay in the reply, but I was having some trouble reproducing this issue.

Your issue as I understand it is as follows:

1) You create an OPC Client I/O Server and connect to an OPC Server.
2) You bind a Variable to an Item under the OPC Client I/O Server
3) You are able to read data, but you are not getting an error out from the Variable node on the block diagram when the quality goes bad.

If this is not your issue then, please repost and attempt to explain again.

There is an issue where the OPC Client appears to be dropping the quality in some cases. Thank you for pointing this out, I filed a bug report (# 3VUE5KTM) and hopefully we will have this fixed in the next version of LabVIEW. For a workaround you can use the Data Socket to get the value and quality from the OPC Server.

Thanks for the feedback



Message 10 of 11
(10,814 Views)