Using Alarms At NA Runtime


This article explains the NA HMI alarms system behaviour in runtime.
For basic information about how to configure and set up alarms in NA please read ‘Introduction to NA Alarms’ article.

Runtime Behaviour

The runtime engine includes an Alarm Handler process that continuously monitors the User Alarms that are configured for the project. The Alarm Handler detects state changes in User Alarms and responds to the state changes by producing Operator notifications and by creating data entries into a User Alarm Log.

Each time a User Alarm is raised, acknowledged or cleared is captured in runtime by the Alarm Handler. On each event the Alarm Handler creates a data entry into the User Alarm Log. The sum of the data entries in the User Alarm Log constitutes the User Alarm History. All logging occurs in MRAM and is stored as a circular buffer with at least 2048 log entries and will not be cleared during a power cycle. When the maximum size is exceeded then the oldest log entry will be overwritten by new data. System Variables can be used to monitor the number of alarms in the system, and methods are provided to save the alarm log (see below).

Alarm Statuses

Each User Alarm can exist in one of five states:

  1. Acquiescent
  2. Raised – Requiring acknowledgement, but not acknowledged
  3. Raised – Acknowledged or not requiring acknowledgement
  4. Cleared – Requiring acknowledgement, but not acknowledged
  5. Cleared - Acknowledged or not requiring acknowledgement


Acquiescent - The User Alarm has never been raised in the current runtime session

Raised – Raised state for a User Alarm is achieved when the expression associated with the User Alarm resolves to True

Cleared – Cleared state for a User Alarm is achieved when the expression associated with the User Alarm resolves to False (having previously been True)

Acknowledged / Not Acknowledged – Acknowledgement is a process applied by the runtime user confirming their recognition that a User Alarm has been raised. Whether User Acknowledgement is required or not can optionally be applied for each individual User Alarm.



Alarms in VB

The following functions are available for the user to use within VB:



1. AlarmID

1. Alarm

Acknowledges the specified user alarm.




Acknowledges the latest user alarm.




Acknowledge all user alarms.


1. AlarmID

1. Alarm
Return Type:  Boolean

Returns TRUE if the specified alarm is active, otherwise F

ALSE will be return. Active states are Raised & Acknowledged,

Raised & Unacknowledged and Cleared & Unacknowledged.


1. AlarmID

1. Alarm
Return Type:  Boolean

Returns TRUE if the specified alarm is raised or FALSE if it is cleared.




Removes all current alarm data stored in MRAM

 (the data will be lost and is unrecoverable).


1. File Name

1. String
1. String Variable

Copies the current user alarm data from MRAM

 and saves it into the specified file.


1. Active Alarm Number
2. Name
3. Group
4. Level
5. Message
6. Details

1. Integer
1. Integer Variable

2. String Variable (ByRef)
3. String Variable (ByRef)
4. String Variable (ByRef)
5. String Variable (ByRef)
6. String Variable (ByRef)

Gets the alarm information (alarm name, group name,

 level, message and details) associated with the specified Active

Alarm Number. The Active Alarm Number is simply the order of the

 alarms in the viewer (i.e. the order in which they were raised).


1. Page Name
2. Alarm
 Viewer Object Name
3. Scroll Direction
4. Scroll Amount

1. String
1. String Variable

2. String
2. String Variable
3. Integer Variable
4. Integer
4. Integer Variable

Scrolls the specified alarm viewer object up or down by the amount

defined in the 'Scroll Amount' parameter. When the value 1 is passed

 to the 'Direction' parameter then alarm viewer object will be scrolled

 upwards (to scroll downwards, the value 2 must be passed).

The 'Scroll Amount' parameter defines how many will be scrolled each

 time the function is called.


1. Page Name

2. Alarm Viewer Object Name

Returns: AlarmID

1.  String

2. String

Return Type: String

Gets the selected alarm ID from the specified viewer.



1. AlarmID

2. Name

3. Group

4. Alarm Code

5. Level

6. Message

7. Details


1. String

2. String (ByRef)

3. String (ByRef)

4. String (ByRef)

5. String (ByRef)

6. String (ByRef)

7. String (ByRef)


Returns the Alarm information for the specified Alarm ID.


Note: the AlarmViewer also has a property called ‘SelectedAlarm’ (ID) which enables VB to find the currently selected alarm for some of the functions above.

Note: For the list of Alarm’s system variables please read ‘Introduction to NA System Variables’ article


See Also:

Introduction to the NA series HMI