V8.1.9 Quality string changed, now includes description?

I just upgraded to 8.1.9 and noticed that some of my expressions checking quality don’t work. I checked the reason and it looks like quality strings now include a description of the error:

{[default]Tank Farms/Fermenters/North/Tanks/RF207/Temperature Top/PV.quality}
If no found, used to return:
Bad_NotFound
Now it returns:
Bad_NotFound(“Path ‘[default]Tank Farms/Fermenters/North/Tanks/RF207/Temperature Top/PV.quality’ not found.”)

You probably shouldn’t rely on the String value for comparison’ sake.

toInt() on a quality code should return a consistent result. In 8.1.10 you’ll be able to safely check qualityOf({[default]Tank Farms/Fermenters/North/Tanks/RF207/Temperature Top/PV}) = "Bad_Disabled".

2 Likes

Back in v7 I was using toInt(), however I think these values changed in v8 :frowning: v8.1.10 update sounds good, I remember you saying there would be a function like that, very helpful! Do you know when it’ll be out?

You don’t even need the toInt in all cases, you can do a comparison like this for Bad_NotFound, for example:

({[~]TestTag.Quality} & 0xFFFF) = 519

It’s supposed to be next week if things go to plan.

The changes Paul mention will let this work:

{[default]Tank Farms/Fermenters/North/Tanks/RF207/Temperature Top/PV.quality} = "Bad_NotFound"

even when the actual QualityCode has been enhanced with additional info or description.

You’ll also be able to use qualityOf to pull the code out instead.

1 Like