OPC Reads

I am trying to use system.opc.readValue and check the quality. Here is a snippet of sample code:

qualifiedValue = system.opc.readValue('IgnitionOPCUA', opcPath)
if( qualifiedValue.quality.isGood() ):
   # quality is good, can continue
   print qualifiedValue.value
   # quality is bad, need to do something else.

In essence, I want to check to make sure that the opc read succeeded before I work with the data. However, when running the above code, I get the following error:

Am I using this attribute wrong? I was trying to use it the way the user manual specifies…


Yes, it appears that accessing “.quality” directly isn’t correct. Try this:


We’ll have to update the incorrect example in the manual.


Works. Thanks!