> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms.md).

# Alarms and alarm paging

Alarm classes, escalations and annunciators in DATRAN VI: set up an alarm class, apply it to a point, change message text, and hold alarms until office hours.

Different classes of alarms can be created that specify the sequence of actions and escalations to be performed when an alarm event takes place. The Escalation Sequence holds a list of ‘Annunciators’ which perform certain tasks. These are arranged in the escalation sequence to gain the desired actions to be taken when an alarm is triggered.

{% hint style="info" %}
**Applies to:** the DATRAN VI Alarm Service. The Datran Help file contains full information on all settings; this page covers the common tasks.
{% endhint %}

## In this section

* [Send alarms by text: Datashed and SMS Direct](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms/sms.md)
* [Force DATRAN to use SMS Direct](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms/force-sms-direct.md): when Datashed looks connected but texts aren't arriving
* [Test alarm texts from Supervisor](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms/test-sms.md)
* [Query and control DATRAN by text](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms/sms-commands.md)
* [Send alarms by email](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/alarms/email-alarms.md)

## How an alarm class works

A typical alarm class:

| Step | Annunciator                          | Why                                                                                                                                                                                                                                         |
| ---- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1    | Standard                             | A predetermined set of escalations which are common to several alarm classes. These usually contain such things as ‘Beep’ annunciations and logging to the DATRAN Supervisor and to the Database. Every alarm class should start with this. |
| 2    | Wait                                 | A stock annunciator that waits a set period of time before continuing, in this case to stop intermittent faults being paged out.                                                                                                            |
| 3    | SMS Message (or Alarm Pager Message) | A stock paging annunciator that deals with the paging of alarms out to the correct operator.                                                                                                                                                |
| 4    | Wait                                 | Another wait statement to allow the operator to acknowledge or fix the problem.                                                                                                                                                             |
| 5    | SMS Message                          | This is to make sure that someone else gets the message if for any reason the first operator missed the page.                                                                                                                               |

There is no requirement to have waits between annunciators; you can send 10 SMS’s simultaneously if you want to. The waits allow for an operator to acknowledge the alarm. Once the alarm is acknowledged the escalation sequence stops.

Alarm Service provides several ‘standard’ Annunciators. It can print a message to a serial printer; play a sound file through a sound card; sound a ‘beep’ using the computer’s internal speaker; or just wait a period of time for the alarm to ‘return-to-normal’ before escalating further. The Alarm Service could also take action itself by running a script that sets a digital output on a remote telemetry unit that closes a valve.

In any alarm class that you want the alarms to appear in your custom alarms screen, add in the “Remote Annunciator Water” to the escalation sequence. See also [wait for office hours](#hold-non-urgent-alarms-until-office-hours).

### Annunciator formats

Each annunciator is broken up into three major nodes, ‘Annunciations’, ‘Formats’ and ‘Properties’.

**Annunciations** – This displays a list of the current annunciations currently being annunciated or that have previously been annunciated and have not yet been deleted.

**Formats** – This is the most important node structure and most unique. It is separated up into sub nodes, ALM, ALM Ack, RTN and sometimes Complete. Each sub node represents one of the possible states an Annunciation can be in, ALM for when the alarm is triggered, ALM Ack for when the alarm is acknowledged, RTN for when the alarm returns to normal and Complete for when the Annunciation is complete. Each field (Node) under each of these sub nodes indicates a piece of information that the Annunciator needs to function correctly. You will also notice that there are several instances of sets of ‘{ }’ brackets, such as `{Description}` or `{(ALM)LocalTime}`. These indicate that information is needed in this space and the values within them are either the value of nodes from where the Annunciation was triggered or certain system generated values.

## Set up an alarm class

1. Unlock DATRAN Browser by clicking on the padlock and entering the password.
2. Open the **Alarm Service** node under **\<computer>\Applications**.
3. Right-click **Alarm Classes** and select **New Alarm Class**. Enter a name. Click **OK**. You will get an error message “No escalations”. This is normal when creating a new alarm class.
4. Right click **Escalations** and select **New Escalation**. Double click the new, blank escalation.
5. Select **Standard** from the drop down annunciator list. Click the **Apply Annunciator** button at the bottom of the screen.
6. Add a wait annunciator. Make it the second in the queue.
7. Continue adding annunciators as required to build your alarm class. For each:
   * select an annunciator
   * if a SMS annunciator is selected then a valid operator must be selected and the **Enabled** box checked, and make sure it is set to Enabled
   * if an email annunciator is selected then the selected operator must have their email details entered in the Operator configuration, enabled box checked and an entry for “Page” set to “1”
   * click the **Apply Annunciator** button.
8. An annunciator can be moved up and down the list by right-clicking on it and choosing either the `/\` option to move up one step or the `\/` option to move down.

{% hint style="info" %}
When making changes to any application or service, make sure to press the appropriate “apply” button to make the changes active, e.g. “Apply Escalation” will activate any changes you have made to the alarm escalation such as the annunciator. Pressing the “OK” button will save the changes, but the service will continue to function as it did before the changes were made.
{% endhint %}

Alarm classes can be added to or changed at any time as requirements change.

## Apply an alarm class to a point

1. Insert a node under your point called `_alarm_`. This will open a dialog box so you can configure your alarm. To change an existing alarm, double click on its `_alarm_` node.
2. Open the **Alarm Class** drop-down box and select the alarm class.
3. If you wish to override the default message that gets sent for this particular alarm, check the **Description** check-box and enter the new message.
4. Also check the **Acknowledged** and **Acknowledged By** nodes. This will allow DATRAN to provide feed-back about if an alarm has been acknowledged, and who acknowledged it.
5. Click **Apply Alarm**.

## Change the message text

Existing generic annunciators should not have their formats altered. Many different alarm classes may use the same set of annunciators. To make a customised annunciator copy an existing annunciator that is close to what you want and rename it:

1. To make an email annunciator that has customised text, copy **Send Email**.
2. Right click & **Paste As** `Send Email P1`.
3. Expand the `_Annunciator_`, double click on **Message Body**. Add in the extra text (in this case “P1”), click **OK**.

The new annunciator “Send Email P1” will now appear as an annunciator when you are adding an escalation in an alarm class.

## Send to whoever is on duty

Each DATRAN System holds a list of operators. Generic operators are created using an Alias, such as a duty roster operator. Messages can be configured to be sent to the alias and not an individual. In Supervisor, to change the recipient, open the Operator Roster tab, double click the operator alias in the list and select a new operator from the list in the dialogue box that pops up. See [Operators and the duty roster](https://help.qtech.co.nz/datran/datran-vi-scada/datran-supervisor/operators.md).

The use of operator Aliases allows the user to dynamically change the operator that alarms are being sent to. For example: An alarm escalation sequence can be set up to page to an Alias with the name of “Duty Operator”. DATRAN Supervisor can then be used at any time to select which operator the alias “Duty Operator” applies to and the alarms will begin going to a different person without the need to edit the alarm escalation sequence.

## Hold non-urgent alarms until office hours

The **Wait For** alarm annunciator is used to halt an alarm escalation sequence until a specified DATRAN node is set to 1. Whilst the specified node remains at 0 the escalation sequence will not continue. If during this period the alarm returns to normal the escalation sequence will be exited. The most common use for the Wait For annunciator is delay sending out a non-urgent page (SMS, email etc.) until office working hours. This can be achieved by using the DVG Timetable functionality. The DVG Timetable will handle the toggling of the specified Wait For node at the user defined time of day or week.

### 1. Make a timetable

1. Under the **Data Root\System\Timetables** node create a descriptive node name for what you require your alarm escalation to wait for, for example `Daytime Only`. It may be that the entire above node path does not exist. In this case you will need to create the nodes.
2. Insert a `_Template_` node underneath Daytime Only and select the **DVG Timetable** script. Once you press the **Apply** button your timetable will be created and you will notice that the Daytime Only node will be assigned a value of either 0 or 1 depending on the current time of day.
3. Double click on the `_Formula_` node to modify its configuration:
   * **Poll Rate:** The Poll Rate specifies how often the current time gets compared to the timetable. By default this is set to 0 msec which means that it is constantly checked. As we are only interested in a resolution of every 30 minutes it makes more sense to slow this down to say every 5 min and therefore put a little bit less stress on the DATRAN system.
   * **On and off times:** You can see the table of 0s and 1s and a Header line giving the hours of the day. A 1 indicates that the output should be set to 1 for that particular 30 minute period for that day. Using the scroll bar on the right of the dialog you can see the timetable for the Saturday and any day that has been specified as a holiday.
   * **Holiday years:** In the formula part of the dialog the holiday year information is a little outdated and needs to be updated for the current years. There are 2 modifications required for each year change.
4. Expand the `_Formula_` node. The **Hols** node shows the fixed public holidays. These occur of the same date every year. The remainder of the rows are for you to enter the public holiday dates that change each year such as Easter. Use the same format as shown in the example Hols 1998 node (DD-MMM and space separated). Any of the Hols nodes outside of the years the formula handles are no longer required and can be deleted.

{% hint style="warning" %}
The holiday year information in the formula is a little outdated and the Hols nodes are very much out of date.
{% endhint %}

### 2. Use it in the alarm class

1. Insert a **Wait For** escalation into your alarm class.
2. Double click on the **Wait For** escalation and add a new property also called `Wait For`. Note that you will need to tick the check box next to the property before you can enter any text. Press the **OK** button.
3. Ensure that the new Wait For property is selected and then click on the **Node Reference** button on the DATRAN Tool bar. From the next dialog box that is displayed navigate to the Daytime Only node and press **OK**.

Note that multiple timetables can be created. For example you may wish to have Evenings, Weekends etc.

## Alarm service diagnostics

To check if email is working, enable DATRAN diagnostics by right clicking in the diagnostics windows. Trigger your alarm by setting the trigger node to 1 and see if you receive the email. If all is successful you will get a tick under the paging annunciations. If however, something went wrong you will get a cross and a reason. E.g. Page must be specified.
