Perspective UDT Alarm Issue - Quality Binding

I am attempting to create a quality-based alarm on a tag within a UDT, and I'm running into some unexpected behavior.

Background info: the UDT is basically serves to pull the same value (boolean) from two different sources, and there is an expression-driven tag within the UDT for calculating the result. If the two sources disagree, that value is set to "Bad" quality using the QualifiedValue function. If there's no valid data from either source, the value is set to "Uncertain" value.

I want an alarm on the result tag that will activate when the quality is Bad, but not when it is Uncertain. I have tried both the "Bad Quality" mode as well as the "On Condition" mode for the alarm, and cannot get it to produce the desired behavior.

"Bad Quality" mode appears to activate even when the quality is "Uncertain".

I thought that the "On Condition" mode would work using the expression function isBad({[.]<tag name>}) for the "Is Active" property, but this doesn't work. The alarm never activates. Likewise for the isUncertain() function. The isGood() function always activates the alarm. Maybe I'm doing something wrong, but it seems like the binding behavior is not working properly on the "Is Active" property of the alarm.

These bindings do appear to work in other fields of the Alarm. For example I used them in the binding for "Label" and they are calculated and displayed correctly. But I can't get it to work in the "Is Active" property.

Any help would be appreciated.

The alarm never activated because the quality is not bad. The way you describe it, the quality of tag 1 and tag 2 are both Good and then you could use an expression tag to create a 3rd tag. IMO this has nothing to do with the tag quality property.

That's exactly what I'm doing, within the UDT Tag 1 and Tag 2 are pulled from actual data sources, Tag 3 is an expression tag derived from 1 & 2. I am trying to set up the alarm on Tag 3 based on its quality, but it just doesn't work.

I have an alarm on Tag 3 set to "On Condition" mode, with the "Is Active" field bound
using the expression isBad({[.]Tag 3}). I can see in the tag browser that within the UDT instance, Tag 3 is bad quality, but the alarm still doesn't activate.

But I've been doing some testing, it seems like the alarms are just not evaluated at all when the tag quality is not "Good" (other than maybe the Bad Quality mode). I tested this by just linking the alarm on Tag 3 to a generic memory tag that I can toggle at will. This works fine when Tag 3 is Good quality, but the alarm doesn't work at all when the tag quality is Bad or Uncertain.

The only other way I can think of doing this is to add a fourth tag within the UDT, set Tag 4 to be an expression tag based on the quality of Tag 3, and then create an alarm on Tag 4 based on its value. I think this will work, but it seems like a waste.

Don't do it based on the quality. You want the expression to be

pseudo-expression:

{tag1} != {tag2}
OR
isBad({tag1})
OR
isBad({tag2})

Then alarm on value of 1. The quality is good weather the value is 1 or 0