×
Skip to main content Link Search Menu Expand Document (external link) Right Arrow

Contents

Export and Import

Main article: Alarms.

Similarly to tags, alarms (but not their categories) can be exported and/or imported to facilitate batch creation and backup operations.

Export alarms

Exports all alarms found recursivelyIncluding tags in the selected folders and subfolders. within the selection. If no alarm or folder is selected, exports all alarms found recursively at the export location.

Export generates a comma-separated UTF-8 file (.csv), which has a header row followed by one row per exported alarm, with one column per parameter. Thus, data in the file is structured as follows:

Alarm Name Message Priority Category further alarm parameters
some_folder/some_alarm This alarm does not actually exist Low No Category ...

or, as raw .csv content:

Alarm Name,Message,Priority,Category,further alarm parameters
some_folder/some_alarm,"This alarm does not actually exist",Low,...

The export file has a column for each parameter that can be found in the Alarm Editor. However, most parameters are specific to one or several condition types. The corresponding cells remain unpopulated in the export file where the alarm’s type does not support this or that particular parameter.

Special export formats

The values of most parameters are exported in the same format as used in the alarm editor:

  • Numerical values for integers and/or floats
  • true and false for booleans
  • Plain text for strings

This the value is picked from a dropdown list or set with a checkbox, e.g., Condition type. Additionally, while parameter names in the header row mostly match the parameter labels in the editor UI, a few exceptions exist.

Table 1 below illustrates cases where parameter names in the export file differ from the corresponding UI labels, as well as cases where the exported value has a special format.

Table 1. Partial export specification

Exported name UI label Format / Notes
Alarm Name Title Inclusive of the full path
Localization Not directly labeled; pertains to Message. See Localization.
Condition type Condition type Each type is designated with an integer:

Source Tag Tag
Set Point Value Set Point under Value control, Discreet, or Deviation. Value for Const;
Tag for Tag
Rate Time unit Time unit under Rate of change Exported as the time unit's duration in milliseconds:
  • 1 for milliseconds;
  • 1000 for seconds;
  • 60000 for minutes, etc.
Outlier time unit Time unit under Outlier counter
Save Zone Inside Safe zone inside under 2D Range
Polygon Points X
Polygon Points Y
Points under 2D Range. Export file renders X values and Y values as two separate arrays with a column for each array.
Host for Ping Host
Number of ping attempts Attempts
Ping Time Interval Ping interval
Outlier time unit Time unit under Outlier counter.
Complex Operator
  • and for ALL,
  • or for ANY
type of Complex condition.
See also Complex conditions.
+Example 1
Alarm Name Ping
Message This alarm is intended solely to demonstrate how the export works.
Priority Low
Category No Category
Enabled false
HMI Link My first folder/My first page
Condition Type 13
Source Tag
Operator
Set Point CONSTANT
Set Point Value
Deadband
Max Deviation
Max Rate of Change
Rate Time unit
Delay-On 0
Delay-Off 0
Custom Name
Localization {"en":{"message":"This alarm is intended solely to demonstrate how the export works."},"ru":{"message":"Данный сигнал предназначен исключительно для демонстрации функции экспорта."},"da":{"message":"Denne alarm er lavet kun til at demonstrere hvordan alarmer exporteres."}}
Source Tag X
Source Tag Y
Save Zone Inside
Polygon Points X
Polygon Points Y
Host For Ping 192.168.0.10
Number of ping attempts 5
Ping Time Interval 5000
Bit index
Bit value
Threshold value
Threshold number
Threshold interval
Outlier time unit
Inverted mode
Complex Operator
Complex Set Point Const
Complex Set Point Tag
Complex polygon points
Complex Subcondition Type

This export represents the following alarm: Example of a ping alarm
Note that this export provides localization: Example of alarm message localization

For other parameters, names match the UI labels used in the editor; the exported values are also identical to those in the editor.

Complex conditions

A complex condition has a multilayered structure that can incorporate several non-complex subconditions. However, it still renders as a single data row in the export file. To that end, the file contains several parameters that are not found in the alarm editor.

These parameters specifically define the structure of complex conditions:

  • Complex Subcondition Type
    Condition type-specific integers for all subconditions, see the table under Special export formats above.
  • Complex Set Point Const
    Set point constant values (integers or booleans) for all subconditions.
  • Complex Set Point Tag
    Set point tag names (inclusive of the full path) for all subconditions.
  • Complex polygon points
    JSON-formatted arrays polygon point coordinates for all subconditions. The following syntax is used:
    [
      {
        "valueX": // X coordinate for Point 1;
        "valueY": // Y coordinate for Point 1;
      },
      {
        "valueX": // X coordinate for Point 2;
        "valueY": // Y coordinate for Point 2;
      },
      {
        "valueX": // X coordinate for Point 3;
        "valueY": // Y coordinate for Point 3;
      },
      ...
      {
        "valueX": // X coordinate for Point N;
        "valueY": // Y coordinate for Point N;
      }
    ]
    

Other subcondition parameters are exported in the same columns as they would be for a non-complex condition.

Each parameter’s value renders as an array in the export file. The array lists values in the same order the subconditions were added when configuring the complex condition. The order does not affect how the condition operates.

Values in an array are semicolon-separated: [value1:value2:value3]. All arrays have the same lengthNumber of values, which corresponds to the number of subconditions.

Complex Subcondition Type is the only parameter whose array is always entirely populated. For any other parameter, the array may have an empty value where the corresponding subcondition does not support it: [value1::value2].

For conditions other than 2D Range, the array of Complex polygon points renders an empty sub-array:

[
  {
    "valueX": // X coordinate for Point 1;
    "valueY": // Y coordinate for Point 1;
  },
  ...
]
[null]
+Example 2
Alarm Name All Possible Conditions
Message
Priority Low
Category No Category
Enabled false
HMI Link
Condition Type 6
Source Tag bacnet-docs/Writable Tag:test_folder/Alarm:accumulators/acc_d_ipl:opc-ua-docs/bullcrap::Manual counter:test_folder/docs-rng
Operator LESS:EQUAL:::::
Set Point
Set Point Value
Deadband 3.0::0.0::::
Max Deviation ::55.0::::
Max Rate of Change :::48.0:::
Rate Time unit :::60000:::
Delay-On 0
Delay-Off 0
Custom Name
Localization null
Source Tag X ::::DAAL/DEV01/X1::
Source Tag Y ::::DAAL/DEV01/Y1::
Save Zone Inside ::::true::
Polygon Points X
Polygon Points Y
Host For Ping
Number of ping attempts
Ping Time Interval
Bit index :::::36:
Bit value :::::false:
Threshold value ::::::5.0
Threshold number ::::::5
Threshold interval ::::::5
Outlier time unit ::::::60000
Inverted mode ::::::false
Complex Operator and
Complex Set Point Const 5.0:true:::::
Complex Set Point Tag ::RHV/Virtual Tag1::::
Complex polygon points [null]:[null]:[null]:[null]:[{"valueX":-53.4,"valueY":16.7},{"valueX":-36.8,"valueY":56.7},{"valueX":-1.1,"valueY":-14.1}]:[null]:[null]
Complex Subcondition Type 0:1:2:3:11:14:15

This export represents the following alarm: Complex alarm exported

Import alarms

We strongly recommend reading Alarm Editor carefully to learn about the different alarm parameters before pr

Opens the import dialog where a conflict1 resolution method must be selected:

  • Update all items from the file
    Overwrites the existing alarms with their respective duplicates; pre-selected by default.
  • Update all items from the file and remove the rest
    Adds a step where the existing alarms can be selected for deletion during import. Overwrites undeleted tags with their respective duplicates, if found.
  • Add new items from the file
    Skips duplicates.
  • Do nothing in case of conflict
    Interrupts import on conflict and shows the first encountered duplicate.

Select one of the methods and proceed to upload your import file, which can be drag-and-dropped or selected via the file picker.

Import file

The import file must be a UTF8-encoded .csv file with comma-separated values. It must contain a header row with parameter names followed by one or more rows with parameter values. Each row after the header corresponds to a single alarm. These rows can contain the following data types:

  • Integer
  • Float. Use the dot (.) for the decimal point
  • Boolean: true or false
  • String. Use quotation marks if the string contains a comma or is used within an array or a JSON object.
  • Array. Colon-separated: Value1:Value2
  • JSON object. Encased in braces, semicolon-separated: {Key1:Value1;Key2:Value2}
  • JSON array. Encased in curly braces, comma-separated array of JSON objects: [{Key1:Value1},{Key2:Value2}]

When creating the file in a spreadsheet processor such as Microsoft Excel, make sure the resulting file uses comma separation. Other commonly used value separators such as tab or semicolon are not supported.

The specification table below enumerates all parameters for use in import files and specifies their accepted values. Note the following requirements when preparing an import file:

  • The header must contain all parameters listed in the table, even if the alarms to be imported do not use some of these parameters.
  • Parameter names match the UI labels in the Alarm Editor unless otherwise noted in the table. Parameter names are not case-sensitive.
  • All rows must be of the same length in values: 39 total values.
  • There is no need to provide a value for non-mandatory or unused parameters; however, they still must be delineated with the comma.

Import table structure

Parameter Data type Applies to Comments
Alarm Name string All Labeled as Title in the UI.
Message string See also Localization below.
Priority string Must be one of the following: Low, Medium, or High
Category string  
HMI Link string Must be a valid path-inclusive page name under the project
Condition Type integer Must be one of the following integers:

Source Tag string All except Ping Must be a valid path-inclusive tag name under the project
Operator
string
Value control Must be one of the following: LESS, LESS_EQUAL, MORE, or MORE_EQUAL
Discreet Must be one of the following: EQUAL, NOT_EQUAL
Set Point string Value control, Discreet, Deviation Must be either CONSTANT or TAG
Set Point Value

float Value control and Deviation
if Set Point is CONSTANT
string if Set Point is TAG;
must be a valid path-inclusive tag name under the project
boolean Discreet  
Max deviation float

Deviation
 
Deadband  
Max Rate of Change Rate of change  
Rate Time unit integer Must be equal to a valid time unit as converted into milliseconds:
  • 1 for milliseconds
  • 1000 for seconds
  • 60000 for minutes
  • 3600000 for hours
  • 86400000 for days
Delay-On float
All Specify 0 for default value
Delay-Off
Custom Name str  
Localization JSON array Specify null if localization is not required; otherwise, see Localization.
Source Tag X string
2D Range



Must be a valid path-inclusive tag name under the project
Source Tag Y
Save Zone Inside boolean Labeled as Safe zone inside in the UI
Polygon Points X array of floats
X and Y values must be listed in the same order in their respective arrays
Polygon Points Y
Host For Ping string Ping

Labeled as Host in the UI; must be a valid IP-address
Number of ping attempts integer Labeled as Attempts in the UI
Ping Time Interval integer Labeled as Ping interval in the UI; specify the desired interval in milliseconds
Bit index integer Bit
Must be in range 0-63
Bit value boolean  
Threshold value float Outlier counter



 
Threshold number integer  
Threshold interval float  
Outlier time unit integer Must be equal to a valid time unit as converted into milliseconds:
  • 1 for milliseconds
  • 1000 for seconds
  • 60000 for minutes
  • 3600000 for hours
  • 86400000 for days
Inverted mode boolean  
Complex Operator string Complex condition


Must be either and for ALL or or for ANY
Complex Set Point Const array of floats and/or booleans See Complex conditions below
Complex Set Point Tag array of strings
Complex polygon points array of JSON arrays
Complex Subcondition type array of integers

Notes on the table

Parameters in italics are non-mandatory. Other parameters are mandatory for all condition types where they apply.

Complex conditions

A complex condition requires special configuration in the import file. The following parameters apply to the entire complex condition and take singular values, as they do in case of a regular condition:

  • All metadata parameters
  • Condition Type, which is 6
  • Delay-On and Delay-Off
  • Complex Operator

All other parameters must be specified as arrays of values, where each value matches the parameter’s data type.

The length of each array must correspond to the number of subconditions. Values in each array must follow the order of subconditions in the Complex Subcondition type field. If a subcondition does not have this or that specific parameter:

  • leave its position in the array empty if the parameter takes a string, an integer, or a float;
  • add [null] if the parameter takes a JSON.

Some parameters of the subconditions must be provided in specially designated columns. These are:

Complex Set Point Const Replaces Set Point (if CONSTANT) and Set Point Value
Complex Set Point Tag Replaces Set Point (if TAG) and Set Point Value
Complex polygon points Replaces Polygon Points X and Polygon Points Y

The replaced parameters can be left empty. Each remaining parameter must be configured as long as any subcondition has it, in the same field as it would be for a regular condition.

Step-by-step instruction below presents a simple way to configure it. Note that unless otherwise specified, each subsequent step inherits the requirements from previous steps:

  1. Make a list of subconditions and define their types.
  2. Make an array of subcondition type codes:

    Use colon for value separation. The resulting array should look as in the example below:

    Complex Subcondition Type
    0:1:2:3:11:14:15
    # all possible conditions
    # one for each type
    # same order as presented in the editor
    
  3. Make an array of floats and/or booleans for all subconditions where Set Point must be set to CONSTANT. The array follows the same order as the Complex Subcondition type. Add empty values where Set Point and Set Point Value do not apply:
    Complex Set Point Const # replaces two parameters
    :true:20::::: # values only provided where applicable
    # same order of subconditions
    
  4. Make an array of strings for all subconditions where Set Point must be set to TAG:
    Complex Set Point Tag # Replaces two parameters
    "path/to/tag":::::: # Values only provided where applicable
    

    Note that the string in the example above is in quotation marks; however, this is generally not necessary unless:

    • the string contains commas or colons; OR
    • the string is in a JSON.
  5. Make an array of JSON objects for all 2D Range subconditions. Add [null] where Points does not apply:
    Complex Polygon Points
    [null]:[null]:[null]:[null]:[{"valueX":10.0;"valueY":10.0},{"valueX":20.0;"valueY":20.0},{"valueX":30.0;"valueY":30.0}]:[null]:[null]
    # each JSON in the array specifies a single polygon point
    # at least three points must be added
    
  6. Populate the fields for other parameters applicable to your subconditions; same rules apply:
    • each must be an array;
    • all arrays must have the same length and order as Complex subcondition type;
    • each value must be of parameter-appropriate data type;
    • provide empty values where this or that parameter does not apply.
    Bit Index;Bit Value;Threshold Value # some columns in the header
    :::::35::;:::::true:;::::::3.5 #corresponding values
    # no need to provide values for subconditions where they do not apply
    
  7. Populate the parameters that apply to the entire complex condition: metadata parameters, Complex Operator, Condition Type, Delay-On and Delay-Off.

Consult Import table structure for more details on the parameters in Steps 6 and 7.

TIP

Export alarms contains two examples of configuration tables; take a look for inspiration! You can also download sample files:

These files should provide a good starting point.


  1. Import conflict occurs when the import file specifies one or more duplicates of existing alarms. A duplicate is an alarm being imported whose name (with path) is already used by another alarm within the project.