Getting quality of tag from alarm event

I've got a script block in an alarm event pipeline, and I'm trying to figure out what the quality of the tag was when the alarm went off. First up, I get that this probably only applies to quality alarms. Most other alarm types don't seem to receive events for any tag changes with a non-good quality. (Which makes sense...)

But ... shouldn't I be able to see the quality somewhere in the event properties of a quality alarm?

The event['eventValue'] is returning just the basic tag value. I'm not seeing any other properties with "qual" or "qv" in the names.

How can I know what the quality was that triggered the alarm?

After looking at the list of Tag Alarm Properties linked in the description of the alarm event scripting object:

I don't think tag quality is included in the default properties, so you can add the Quality of the tag at the execution of the alarm via Alarm Associated Data.

The Alarm Properties when creating an Expression Binding on an Alarm prop include the "Evaluation Properties" such as the Quality. So I would name my new associated data "Quality" and bind it to {Quality}. Then I can use it in the pipeline.

If someone knows of any even more built-in way let me know.

2 Likes