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
andfalse
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 | Value control, Discreet, or Deviation. | under Value for ;Tag for
|
Rate Time unit | Rate of change | underExported as the time unit's duration in milliseconds:
|
Outlier time unit | Outlier counter | under|
Save Zone Inside | 2D Range | under|
Polygon Points X Polygon Points Y |
2D Range. | underExport 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 | Outlier counter. | under|
Complex Operator |
|
See also Complex conditions. |
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:

Note that this export provides 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:
-
Condition type-specific integers for all subconditions, see the table under Special export formats above. -
Set point constant values (integers or booleans) for all subconditions. -
Set point tag names (inclusive of the full path) for all subconditions. -
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.
[value1::value2]
.
For conditions other than 2D Range, the array of renders an empty sub-array:
[
{
"valueX": // X coordinate for Point 1;
"valueY": // Y coordinate for Point 1;
},
...
]
[null]
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:

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:
-
Overwrites the existing alarms with their respective duplicates; pre-selected by default. -
Adds a step where the existing alarms can be selected for deletion during import. Overwrites undeleted tags with their respective duplicates, if found. -
Skips duplicates. -
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
orfalse
- 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 | 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:
|
|
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 | 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 | in the UI; must be a valid IP-address
Number of ping attempts | integer | Labeled as | in the UI|
Ping Time Interval | integer | Labeled as | 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:
|
|
Inverted mode | boolean | ||
Complex Operator | string | Complex condition |
Must be either and for or or for
|
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 is6
-
Delay-On
andDelay-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:
- Make a list of subconditions and define their types.
- Make an array of subcondition type codes:
-
0
for Value control -
1
for Discreet -
2
for Deviation -
3
for Rate of change -
11
for 2D Range -
14
for Bit -
15
for Outlier counter
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
-
- Make an array of floats and/or booleans for all subconditions where
CONSTANT
. The array follows the same order as theComplex Subcondition type
. Add empty values where and do not apply:Complex Set Point Const # replaces two parameters :true:20::::: # values only provided where applicable # same order of subconditions
must be set to - Make an array of strings for all subconditions where
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.
must be set to - Make an array of JSON objects for all 2D Range subconditions. Add
[null]
where 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
- 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
- Populate the parameters that apply to the entire complex condition: metadata parameters,
Complex Operator
,Condition Type
,Delay-On
andDelay-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.
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. ↩