Alarm Notification / Script In Pipeline

V7.99

Overview:
I have 8 finishing lines that all have different associated ingredients that can be used when making a batch. Each ingredient has a deviation alarm that will trigger if something goes out of spec. If a deviation alarm triggers, I need to be able to send out an email that lists the ingredient that was out of spec as well as a variable list of the other ingredients in that batch with their targets recalculated to correct for the deviation.

What I have so far:

Each of my batch ingredients for a weighup has a UDT that has all of it’s associated info such as target weight, actual weight, error %, error makeup weight and finally an alarm that’s triggered when that ingredient weighup goes out of spec. The alarm has custom properties for the target, actual error and makeup weights that I pull from the UDT.

In the notification email I send out, I include the alarm info to let the operators know what happened. Path tells them which line and ingredient and the custom alarm properties. This all works just fine.

I have a named query that will grab the alarm information and then dynamically build a list of all the ingredients being used for this batch and will recalculate the batch target weights. This also works just fine.

What I need:

I am looking for a way to include the information from this named query into the alarm notification. I figure the script block int he alarm pipeline should be able to do that. I’m just not sure how to get the information from the named query into the actual notification block.

Suggestions would be appreciated!

Thanks…

Maybe I’m missing something here, but can you bind the named query to a tag then include it into the custom message portion of the alarm configuration using either tag binding or expression binding?

Easiest way I would know of is to pull information from your query and put it into the custom email message of your alarm. I did something similar just using a rather lengthy expression to create a detailed status report in the email.

That’s my thought also and that’s where I was before posting this question.

I guess where I am stuck is in how to reference the query results to get them to show up in the custom email message…