In this lesson, we take a moment away from Perspective features to talk about alarms. After setting up some alarms, we will configure an Alarm Status Table component to show alarms from just our Stations, ignoring any other alarms that may be active.


(open in window)

[00:00] Welcome back. It's time for us to talk alarms. So there are a lot of other videos here on Inductive University that talk about alarms in Ignition. The short version though, is that you can go to any of your tags, including those inside of a UDT and you can define an alarm one or more alarms, I should say on any one of these tags. The idea being that the gateway will then watch that tag and when the value on the tag falls within some sort of set point, we can generate an alarm event. So the alarm event is something you'll see on the alarm status table here. There are other alarm components we have. We can also generate notifications and basically do a whole bunch of extra work. So if you're trying to look for a specific value on a tag and you want to generate one of these notifications and alarms, a great way to do that. Now for our little project here, I do want to actually generate an alarm when the pump fault tag has a true value. So do a little bit more than just monitor the value here.

[01:02] We'll actually generate something for our table. And because we're working with UDTs, let's go back to our station UDT definition. So we'll switch tabs over here in the tag browser, we will double click on station here. And my tag editor is off window here. We'll switch over. We will select the pump fault tag here. And then from this list of properties, we'll go ahead and scroll down and there is an alarm section. So under alarms, for the alarms property, we'll click the little edit button or the little pen icon on the right and we will add a new alarm to this tag. So we can double click where it says new alarm. Alternatively, you can always just click the little plus button to the right and let's give this a name just so it kind of stands out from the other alarms on the table. So this will be the station pump faulted alarm, I'll hit Enter and then again, there's a lot to the alarm system here. There's a lot of properties but I'm going to skip over explaining all of them and instead I'll just focus under alarm mode settings, there's a mode of property.

[02:06] This allows you to define how the gateway should interpret an alarm on the tag. So, right now the mode is set to equal. So what that means is when the value on the tag is equal to whatever set point value we define here, then the tag is considered in an alarm states and we'll generate an alarm event for this alarm. Now our pump fault tag is actually giving a Boolean value so true or false. It's not giving a numerical value although this field does want a numerical value. However, it is smart enough to map Boolean values to numeric values. So a numerical value of zero correlates to a Boolean false value. Whereas if I click over here and I replace that with a one and hit Enter, so a numerical value of one means a Boolean true value. So if we set this to one then when the tag has a value of true, the alarm will go active. So we'll click commit here and then we'll click okay, again. Now, if we switch back to tags tab here and we refresh, we do get a little bell icon next to a tags that have alarms.

[03:04] Also, we do now start to see some of our new alarms down here. So we do have some new alarms for our pump fault tag there but I do want this window to only show the alarms for any one given station. So we're looking at station one right now and the way I'm determining that is based off of the, if I go back to the view object here, the station number parameter. So I have the set to one which means all of our display components are showing tag values from station one. I would like this table to only show alarms from station one. so we can actually do that directly on the component here. So I'll select the alarm status table here. And then in the property editor, we can actually scroll it down and under filters, there's an active area which I'll expand and then there's conditions, I'll expand that. And there are a couple of properties here. I'm actually going to play around with these source property. So the source property basically, it's sort of a qualified path to the tag that are really to the alarm and the tag gets on.

[04:04] So and includes the tag path. It includes like things like the tag provider and the name of the alarm as well. So there's a bunch of things we can actually look at. The source path is actually one of the columns here on the table. If I go into preview mode here, I kind of scroll over to the right, kind of resize it a little bit too. We can also just do it off of the name I suppose but you kind of see that there's a bit more to it as well but we basically have like tag provider names and so on but that station_2 is actually included in there and that's actually the name of our UDT, our station_3 or station_1. So we can actually search for a partial path. We actually just look for, hey, does it have station_1 or whatever, something like that and the tag path and if so, then we can show it on this component here. So the way that works for the source path here is we can actually come up here, we can just type and you saw from the tool tip but you can use an asterisk as sort of a wild card. So I'll go ahead and type station_1 and I'm going to put an asterisk to the left and to the right of the whole thing, I'll hit Enter.

[05:03] And now we're only looking at station one alarms, you know is that as soon as I hit Enter there, it went ahead and updated immediately. So we want to do something like that except we want to be able to pick a specific station. So if we want all of our stations, we can just get rid of the one at the end there. So what I think I'm going to do is I'm actually going to select the text I typed in here. I'm going to Control C to copy and let's play some binding on this instead. So for the source property here, I'm going to click the little binding button and this time I'll do an expression binding. So expressions are great for doing a sort of string concatenation which is ultimately what I'm trying to do down here. So I'm actually going to right click and paste. So we have my little station one entry in there and the expression language does want you to sort of turn or wrap up strings inside of quotes. So we can actually go ahead and put quotation marks around this and you can see what's the value, what is evaluating to down below. Now we do want to sort of replace the one there. So this isn't an indirect tag binding because I'm not going and getting the value of the tag. Instead, we're basically defining part of a tag path.

[06:04] So what I want to do is instead of leaving the one inside of there, I'm actually going to backspace the one. So the string literal is going to be just station underscore with asterisks characters around it. I'm going to click over to the right and you don't have to put up space but I generally like to put spaces around my expressions. So I'm going to zoom in a little bit too so I can have a better view of what I'm doing and we can grab a reference to the station number that's on the view. So I can go ahead and click the little property browser button here. We can go back up to the view. We can go to params and grab station number and click okay. And kind of see that as sort of evaluating to something like this. Now we do want to actually add another asterisk at the end just so we can say station_1 and we can also get rid of the asterisk that's in the string literal there. So I can actually get rid of that. I'll go to the right of the field there, put another plus sign down and in quotes again put another asterisk stamps or something like that. So it should look something like that in our binding preview.

[07:04] So we'll click okay. All right, so we should be looking at station one alarms. If we go to the view object here if I change station number to three, so not only do our display components change the station three values but now we're looking at alarms from station three as well. So now we have our little table component that's aware of which station it should be looking at. All right, that about wraps up this video here. Again, there are other videos here on Inductive University that take a deeper dive into the alarm system. I highly recommend you check those out if you wanted to learn a little bit more about alarming. As we're more or less done with them in regards to this series here. So I'll see you in the next video.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.


Share this video