1. The user will navigate to an equip which the point lives under and create a new program.
In our case, we navigated to our VAV-01 and created a new program that is below.
The properties we filled out are below:
Name (required) - we named the program "Bool Alarms"
Description (optional) - we added a short description of "Trigger an alarm if bool is true"
Program On (required) - we added alarmPoint and boolAlarm and alarmEnable==true and kind=="Bool" as the filter. This program will only run on those points which match this filter.
alarmPoint
we added this in the filter so that it looks for all boolean points that are tagged as alarmPoint
boolAlarm
we added this so that we know that this is for boolean alarms not some other logic like occupancy or temps etc
alarmEnable
this is a boolean tag so we can easily remove a point from being alarmable if we toggle it to false on the point itself. Its not needed but is only an example of what you can do.
kind
this is a string tag that specifies the type of point to look for and not some other type
2. Once that is filled out, the user will select the OK button to continue and create the program.
3. With the program editor open, the user will select to Add Variables to add some tag variables in the program.
4. We'll be adding three tags:
1. curVal (boolean) - this would be to get the curVal of the boolean points | Tag Name - this is the name of the tag we are looking for on the target (point), it is case sensitive On - this is to specify where this record is found based on the target that the program is running on. Since the program is running on a point (itself), then we pick a target. Data Type - this is a boolean point and the curVal is boolean type, so we need to specify that it's a boolean Is - this to know if we are to read or read and write to this tag. In this case, we are only reading the value to trigger an alarm so we leave as read-only. | |
2. navName (string - variable renamed to "bool") - this would be to get the navName of the point and use dynamically in the alarmText tag. We could have left the variable name as navName and instead of specifying "$bool" in the alarmText, we could have specified "$navName". | Tag Name - this is the name of the tag we are looking for on the target (point), it is case sensitive On - this is to specify where this record is found based on the target that the program is running on. Since the program is running on a point (itself), then we pick a target. Data Type - the navName tag is a string because the name can be anything, so we need to specify that its a string Is - this to know if we are to read or read and write to this tag. In this case, we are only reading the value of the name so we leave as read-only. | |
3. alarmText (string) - this would be to make the alarmText dynamic per point in case we wanted to change what the text says on some instead of all having the same text. | Tag Name - this is the name of the tag we are looking for on the target (point), it is case sensitive On - this is to specify where this record is found based on the target that the program is running on. Since the program is running on a point (itself), then we pick a target. Data Type - the navName tag is a string because the name can be anything, so we need to specify that its a string Is - this to know if we are to read or read and write to this tag. In this case, we are only reading the value of the name so we leave as read-only. |
5. Once the three tag variables are created, the tags will be available to use in the program.
6. Now the user would create the logic they would want
In our case, it's a simple where if the boolean point is true, we'll be triggering an alarm.
7. We'll toggle to the Alarm routine tab towards top left/center.
8. Then we drag out an alarmBlock from the library bottom left.
9. We then link that to the routine start block and set the below:
alarm "Select a variable" - we select the curVal variable to set as the trigger for the alarm since the alarmBlock takes boolean variables only to trigger alarms.
alarmText
we link the alarmText variable to a strMacro block first, then to the alarmText property. The reason we need a strMacro block, in this case, is that we are using the '$' in the alarmText to generate a dynamic string that pulls the value of a variable. In order for that to work, it needs to go through the strMacro block. If we didn't use that dynamic feature, we would just link directly to the alarmText property on the alarmBlock.
instructions
we put something random here like "Please check this". Note: this can be made dynamic like the alarmText if the user chose to add another tag called "instructions" to the point. Then they can change it per point if they wanted some to be different.
priority
we set this to 100
10. Now the user will save the program and we'll be ready to use the Alarm Config app and configure boolean points as alarmable.