Configuring Alarms

Just wanted a consult, I’m trying to set up an alarm notification for the tags, like for example when the value of a tag becomes zero it will send an email notification.

I already set up the test alarm on the Alert Notification Profiles, what’s the next step?
When I right clicked on the tags I’ve set up there was a ‘Alerting’ option, is that it?

Thank you

You will also want to set up an alert storage profile in the Ignition Gateway, if you haven’t already.

ok and then after that?

To make this happen you will need to:

  1. Configure your alert storage profile
  2. Create an alert notification profile
  3. Add recipients for the profile (email addresses)
  4. Edit a tag and configure the alert

Here is some more information located in the online user manual for reference:

inductiveautomation.com/support/ … erties.htm
inductiveautomation.com/support/ … erview.htm
inductiveautomation.com/support/ … cation.htm
inductiveautomation.com/support/ … torage.htm

is this the same procedure with the text alarm?

Yes, the email address will be something like this:

1234567890@txt.att.net

Can I skip the creating the alert storage profile?

Yes you can. You do not need to create an alert storage profile unless you want to store alert history.

Ok thanks.

Previously I was trying to create an alarm using the alert notification profile. Now I’m trying to create an alarm notification but this time by coding it. What I need to do is when a tag is not changing it’s value for 30 seconds it will send a notification. How can I do that by code? What can I use?

here is one way, this is for minutes though. if you look at the datediff expression in the manual, you can see how to change it to seconds. basically you just create an expression tag and reference the .lastchange property of the tag you need to monitor. from there you can just setup a digital alarm on this new tag.

I tried to do it in the script, I displayed the tag as a numeric label and then on the script, I did it like this

if(abs(dateDiff("Tag.LastChange",now(),"min")))>1: event.source.parent.getComponent('Multi-State Indicator 1').state = 3

but when I run it, I got an error:

[quote]Traceback (most recent call last):
File “event:propertyChange”, line 1, in
NameError: name ‘dateDiff’ is not defined

Ignition v7.5.6 (b1317)
Java: Oracle Corporation 1.7.0_21[/quote]

no, you need to put the script that I gave you in a new tag.

Ohhh I see the expression tag now. I’ll try it again and get back to you

Ok so I did an expression tag and played with the value to see if the code is working… it’s working. Thank You. But it’s still not sending me the notification email :cry: I already created an alert notification profile and added recipients, but it’s still not sending the notif email :frowning:

did you setup a digital alert when value = 1 on the expression tag that you created? if so did you create an alert expression group like this one

{[ITEM_PATH]} like '%newtag%'

and then assigned that group to the recipients that you created?

[quote=“diat150”]
did you setup a digital alert when value = 1 on the expression tag that you created? if so did you create an alert expression group like this one

{[ITEM_PATH]} like '%newtag%'

and then assigned that group to the recipients that you created?[/quote]

Yes I created a digital alert on the expression tag when the value is 1.
Create an alert expression group? Where can i do that?

If you are using the basic email notification profile then you don’t need to worry about the expression group. As long as the notification profile is not filtering out the alert due to the priority then the notification should be sent out when the tag goes into an alert state. Have you toggled the tag in and out of the alert state?