Introduction

You can use the Excel file to add alarm extensions to a point and set its properties.

The system creates (a value in the column "model" is then mandatory) or updates (a value in the column "name" is then mandatory) an alarm extension.

You can create an extension

  • Using a Typespec
  • Using a template

You can wrap both into variables.

Example

In the following example,

  • We create an alarm extension from a variable and set it to an alarm class
  • We create an alarm extension from a model (in the alarm.bog)
  • We update the low limit value of an existing alarm extension (so we don't need to indicate the model)
Alarm
Create/Update an alarm extension
modelnamealarmClasslowLimithighLimit










$BooleanChangeOfState
hvac_Level1

myBooleanCommandFailureAlarmExt
hvac_Level1


OutOfRange
50


This is the model used in the templates folder for the BooleanCommandFailure extension.The alarm.bog is located in your User Home in the shared/excel/templates folder

SInce the 46.17, the "alarm/" prefix is not needed anymore to target a component in the alarm.bog


Columns syntax

Create a column named "Alarm" on the first line. Then you can define those following subcolumns

  • model: component which will be used to create/update the alarm extension (Mandatory only for a component creation).

  • name: name of the alarm extension (Mandatory for a component update).

  • alarmClass: the alarm class associated to the alarm extension.

  • errorLimit: the error limit of the loop alarm / elapsed active time alarm /  change of state count alarm algorithm.
  • highLimit: high Limit value of the out of range offnormal algorithm.

  • highLimitText: high Limit text value of the out of range offnormal algorithm.

  • lowLimit: low Limit value of the out of range offnormal algorithm.

  • lowLimitText: low Limit text value of the out of range offnormal algorithm.

  • info subColumn
  • slot subColumn to specify any other values of an alarm extension (toOffnormal text, timeDelay etc.)

Accepted values

  • model (by priority during the export):

    • variable from the alarm column.

    • path to a template (from the alarm.bog).


The variables defined for alarm extensions in ~Variables Sheet of default config files are special.
Example: the alarm:OutOfRangeAlarmExt associated to $OutOfRange variable is not really a Niagara TypeSpec but a kind of shortcut.
We use this to be able to define the alarm extension and to set offnormal and fault algorithms (in a similar way of what can be done with vykonProUtil module which can not be done with ProgramService)


  • name: String value (can be omitted  for a creation, in this case, the name from the Type or the template will be used).

  • alarmClass, highLimitText, lowLimitText, name: String value.

  • errorLimit:
    • loop alarm: double value.
    • elapsed active time alarm: Time in seconds.
    • change of state count alarm: integer value.
  • highLimit, lowLimit: double value.

  • info values.
  • slot values.

IMPORT

For an OutOfRange offnormal algorithm, if there is a highLimit value or a lowLimit value, the associated limit will be enabled.

If specified alarmClass doesn't exist, import will create it in AlarmService

Create an Alarm Extension

The model used to create the extension will be stored inside an “excelTemplate” slot. Therefore, the system knows how the extension was created when you do an export.

Change the type of an existing Alarm Extension

If the value in the model cell is different from the value previously saved in the alarm extension, the extension will be deleted and a new one with the desired type will be created.

Be careful with the model value,

  • ANY DIFFERENCE between the cell and the saved value will trigger the change. All the previous slot values will be lost.
  • if the sub component was not created using excel, importing the sub component with a model value will change the type the sub component in the station. Again, the previous slot values will be lost.

EXPORT

The lowLimit, lowLimitText, highLimit, highLimitText will only be exported if the associated limit is enabled

If they’re absent, some SubColumns will be added under certain circumstances:

  • the SubColumn "name" will always be added

  • If there is a value inside the “excelTemplate” slot a model SubColumn will be added

  • If there is a highLimit or lowLimit value and the associated limit is enabled, a highLimit or lowLimit SubColumn will be added

If there is at least one Alarm Column and a component has more alarm extensions than available alarm columns, new Alarm Columns will be created

Example:

You have only one Alarm Column in your destination file and one of your exported components has more than one alarm extension. A new Alarm Column with the same subColumns as the first AlarmColumn will be added.

Try it yourself !

Here is the file used in the above import example. Download it, try importing it and see the result.

For the 7th line, you will need to add an OutOfRangeAlarmExt named OutOfRange in the alarm template

For the 8th line, you will need to add a BooleanCommandFailureAlarmExt named myBooleanCommandFailureAlarmExt in ModbusClientNumericWritable (import the file, add the alarm and import again to see the update in the alarm extension)

setAlarmExtensions.xlsx

Play a bit with it:

  • Add another Alarm column and add a second alarm extension to a component.

setAlarmExtensions-solution.xlsx