Alarm name using a script

I'm looking to create a UDT in Ignition that will be used to setup E-stop alarming. I figure this can save me some time as I add each one as they are all the same, just a different tag in the PLC.

Setting up the UDT isn't an issue, but as a look in the alarming portion, I'd like to set up the subject and message (as I'm sending email notifications) to take the name from the Alarm so that I don't have to type in the text each time. I've attached a screenshot showing what I mean.

If the message is always the same, except for the name of the alarm, do this in the notification block instead. No need for anything special in the alarm configuration.

Also, I'm not sure what the issue is when looking at your screenshot. You could very well configure the message there, in the custom message, using the {name} variable, so what exactly isn't working for you ?

1 Like

Sorry for the confusion, I was asking if this was the correct way to do this as I haven't actually deployed it and took that screenshot as an example of how I was hoping to do it.

Basically my thought is for Custom Subject {name} to pull from the name of the tag and then for Custom Message {name} has been pressed. So that the {name} will change based upon the 100s of different E-Stop names and locations on my site. I can do each one manually, but if I can set it up so that it just looked at that {name} variable, it seems a lot more efficient.

It should work, but I'd really just configure that in the notification block itself.

1 Like

Gotcha. I'm still new to ignition and while I've gone through IU, my scripting knowledge is still underdeveloped. I'm trying to learn, but there are so many hours in the day, so this way seemed a little less daunting to me.

There's no scripting involved here, do not mix up expressions and scripting. This here is an expression.

1 Like

:rofl: :rofl: sorry about that. The content of my message still stands. My expression knowledge is low as well.

It may help you to think of expressions as being like Excel's functions. You give it none, one or more inputs and it produces an output. It's all one statement - although multiple functions can be nested.