Quality overlays

I’m a little confused (not an unusual state) re quality overlays.

Here’s what I want to do. I have a word containing bits of status data. All the bits are parsed out into SQLTags. However, I don’t want to display the value of the bit; rather I want to display a colored dot, one color when the bit is on, another when it’s off (the colors being queried from a lookup table). All that is done, although I wouldn’t claim that there’s not a better way.

In addition, I want something (the dot, the container that it’s in, etc) do display a quality overlay. I saw the ‘quality’ property of the SQLTag, and the expert ‘data quality’ property of the component (dot, etc) and thought I could simply bind one to the other. However, they are of different data types and can’t be bound.

I do see that I can control the component ‘quality’ value as an integer, and thereby control the overlay. I presume that there isn’t a canned way to cast the SQLTag ‘DataQuality’ data type to integer for the component.

Is there some other relatively direct way?

The data-quality property is meant to be used automatically. Whenever you bind a property of a component to a SQLTag (direct or indirect), that component’s data quality property will be affected by the quality of the tag it is bound to. You don’t need to do anything to make this hookup work. In fact, you would have to check “Overlay Opt-out” in order to turn this off.

So, simply have a property of your dot or container bound to the bit, (it probably already is…)

As is often the case, I am trying to make it too complicated.

However, there is still one issue. I am constructing objects to be reusable and simple to configure. To this end, I have structured my SQLTags like this.

  1. There is a SQLTag reading the OPC value. When the OPC group is enabled, this shows good quality. Otherwise, bad quality. Good so far.

  2. I have a group of SQLTags representing the bits in the word. There are 17 tags in the group, 16 for the bits and one for the word value. The bit tags use getbit() referencing the ‘word value’ tag in their own group. This way, I can copy the group, edit the ‘word value’ tag, and the bit tags are correct.

Unfortunately, the ‘word value’ tag has good quality, regardless of the quality of the tag it’s referencing. It would be nice if a tag’s quality cascaded to any tag referencing it. Presumable, then the bits quality would follow the ‘word value’ tag as well.

My intention is to expand this reusability of tag groups, probably by including static tags that define e.g. the client name, the device ID, etc. FPMI components can then indirectly reference these tag groups to get their data.

Having written that long story, I think that what you’re suggesting is functionally similar, but indirect. You’re suggesting that I can bind a property, even an artificial one made for only this purpose, to the original SQLTag up there in #1, and the quality overlay will follow. Correct?

I’ll have to think re how that fits into my indirect addressing scheme, but it seems like it should be able to fit.

Thanks for the info.

Yeah, the quality should cascade. We'll look into this.

Yep, thats right!

Thanks.

I just wanted to confirm what I am doing and seeing re that cascading quality thing.

When the OPC group is enabled, all tags are happy. When I disable the OPC group, the tags which directly reference OPC data (configured ion the general properties page, OPC properties) have ‘OPC_BAD_DATA’ quality.

The word that references this tag via this expression

{[~]AVEC/Selawik/WT4/_RealTime/Status_Word1}

is happy throughout.

Yeah, expressions don’t respect quality right now, this is a known issue. We’ll get it fixed.

In the meantime, you can bind a dummy property on any components who you want to have the quality overlay directly to the word tag.

It defeats my whole scheme to bind directly, because then everything new needs to be edited to bind to a new tag.

I haven’t tried it yet, but hopefully I can bind that dummy property indirectly. Do you know whether that will work?

I don’t think I’m completely following your scheme, but you shouldn’t have to break your scheme. You can bind indirectly, sure.

You could also just bring the words in as SQLTags and then bind directly them using a getBit expression on the property binding, skipping the expression-based DB tags. That way, the quality will be brought over correctly naturally.