I want to generate and email/alarm anytime a tag value changes. The documentation say the Any Change condition will never be active and therefore never triggers the alarm. Is there anyway to trigger the alarm at least long enough to send the email? I tried the Clear Delay thinking that might work but it doesn't. I guess I will have to use the Not Equal and compare it to a memory tag where I store the current value, and when it triggers have it update the memory tag to the new value? That's a pain in the butt, what good is the anychange condition? There has to be a better way I'm just not thinking of?
Do you actually need the alarm? Can you just use system.net.sendEmail
in a tag change script?
Does it have to be an alarm?
You could use a Tag Change Gateway Even Script and system.net.sendEmail.
Kevin beat me, but there's a link to the documentation.
Ideally it would create an alarm, but this is better than nothing.
thanks
Ok, I have the tag change event script working, but ideally I would send the email to the same people in alarm pipeline. Is there someway to read the email list from the pipeline? Or is there a way to inject an alarm into the pipeline?
Did you try setting the "Clear Pipeline" on the tag already?
Any Change alarms do generate events, they are just instantly cleared as well. You should still be able to send them to a pipeline upon being cleared.
You might also be able to send them to an Active Pipeline as long as you don't have Cleared set as a dropout condition.
Yes, I tried that, but it doesn't work either.
Sorry to bump this topic from two years ago, but I'm also trying to send out emails based on tag value change alarms and it looks like this hasn't been resolved yet. I have the on change mode set in the tag alarm, I can see the alarm come and clear instantly in the alarm journal, but no emails are sent despite having the pipeline listed in the clear alarm property.
Have you turned off the "Cleared" condition in the Alarm Pipeline Dropout Condition Properties? Per Kevin's response above:
The pipeline is seeing the active and cleared at about the same time, so if I have that property as True for a dropout condition I do not get emails, but if it is False I see them.
Hi Kvanne, Thanks, I see your link and can get to the alarm properties in the pipeline switch block, but I guess I'm not sure how to actually turn it off.
Nevermind, I found it now, it is when you have the pipeline selected in the project browser, not in the blocks in the pipeline. That worked, thanks!
You could also use a change script on the changing tag to toggle a different bool tag that has the alarm configured the toggle it back off when alarms are reset.
After using this for some time, I realize it is not going to work. The problem is that it is not specific to certain alarms, but applies to all alarms. For example, we used to have alarm notification emails when a machine would turn on or turn off. Now, each time the machine state changes, we get two notifications at the same time, one for turning on and one for turning off, this means we can no longer distinguish if a machine is turning on or off.
What do you mean "all alarms"?
An alarm exists on a tag and can have alarm pipelines assigned for either Ack/Active/Cleared states. Multiple different alarms could use the same pipeline, and then changes to that pipeline could impact more than one alarm. Are you saying that a change you made to your pipeline is now impacting other alarms?
Perhaps you need a new alarm pipeline to handle the conditions, or you can add logic to an existing pipeline to handle the conditions.
If you're seeing two notifications at once, those notifications are triggered by alarms that could have settings that are more inclusive than you intended. Identify the tag(s), and then the alarms to explain why you would see two emails for the same value trigger - if that's what is happening.