Gets field data from the alarm record that is displayed at the specified AN. You can use this function for Alarm Pages, Sequence of Events pages, and Alarm Summary pages(an Alarm Page, SOE Page, and Alarm Summary needs to be displayed before this function can be used).
You can call this function on an Alarms Server or a client to get the contents of any field in the alarm record at that AN.
You can return the record number of the alarm record for use in other alarm functions, for example, to acknowledge, disable, or enable an alarm (on an Alarms Server).
The AlarmGetDsp() function does not support hardware alarms.
If this function is not called from a foreground task, it becomes a blocking function.
Syntax
STRING AlarmGetDsp(INT AN, STRING Field)
AN:
AN number of an ALMCB Alarm record. Equal to AN where actual ALMCB resides + Offset into the list of ALMCB records.
Field:
The name of the field from which the data is retrieved. The contents of the following fields can be retrieved when the Alarm Page is displayed:
Field |
Description |
---|---|
Area | The area to which the alarm belongs. The user needs to have access to this area to access this alarm data. |
AlmComment | The text entered into the Comment field of the alarm properties dialog. |
Category | Alarm category. |
Cause1..8 |
An alarm response property that describes the cause of an alarm. You need to append a number (1–8) to indicate which set of properties will be referenced, as more than one alarm response can be configured for an alarm tag. The value reflects the order in which the alarm responses were configured. |
Cluster | The name of the cluster the alarm tag applies. |
Comment | Operator comments attached to the Alarm Log entry (if any). |
Consequence1..8 |
An alarm response property that describes the likely outcome if an alarm is not acted upon within the specified response time (RespTime). You need to append a number (1–8) to indicate which set of properties will be referenced, as more than one alarm response can be configured for an alarm tag. The value reflects the order in which the alarm responses were configured. |
Custom1..8 | Custom filter fields. |
Date | The date that the alarm changed state. |
DateExt | The date that the alarm changed state in extended format (mm/dd/yyyy). |
Deadband | Deadband (Only valid on analog alarms). |
Delay | The duration of the alarm delay period. |
Deviation | Deviation Alarm trigger value (only valid on analog alarms). |
Desc | Alarm description. |
DisableComment | Can be used to describe the reason why the alarm was disabled. |
DisableEndDate | The date when the alarm will no longer be disabled. |
DisableEndDateExt | The date when the alarm will no longer be disabled in extended format (mm/dd/yyyy). |
DisableEndTime | The time when the alarm will no longer be disabled. |
Equipment | The name of the equipment with which the alarm is associated. |
Font | Font of alarm. |
Format | Format of alarm. |
High | High Alarm trigger value (only valid on analog alarms). |
HighHigh | High High Alarm trigger value (only valid on analog alarms). |
Help | Alarm help page. |
LogState | The last state that the alarm passed through. |
Low | Low Alarm trigger value (only valid on analog alarms). |
LowLow | Low Low Alarm trigger value (only valid on analog alarms). |
Name | Alarm name. |
Paging |
Alarm paged flag. |
PagingGroup |
Paging group for alarm. |
Priority | The alarm priority. |
Rate | Rate of change trigger value (only valid on analog alarms). |
RecNo | The alarm record number. |
Response1..8 |
An alarm response property that describes the appropriate response to an alarm. You need to append a number (1–8) to indicate which set of properties will be referenced, as more than one alarm response can be configured for an alarm tag. The value reflects the order in which the alarm responses were configured. |
ResponseNum |
Indicates the number of alarm responses that are associated with an alarm tag (0–8). Each alarm response incorporates a set of properties including Cause, Consequence, Response and RespTime. |
RespTime1..8 |
An alarm response property that indicates the period of time in which the specified response should be acted upon. You need to append a number (1–8) to indicate which set of properties will be referenced, as more than one alarm response can be configured for an alarm tag. The value reflects the order in which the alarm responses were configured. |
State | The current state of the alarm. |
State_desc | The configured description (for example, healthy or stopped) of a particular state. |
Tag | Alarm tag. |
Time | The time that the alarm changed state (hh:mm:ss). |
Type | The type of alarm or condition. |
UserLocation | The IP address or machine name where the event was triggered. |
Value | The current value of the alarm variable. |
The contents of the any of the above fields (except for State) and the following fields can be retrieved when the Alarm Summary is displayed:
Field | Description |
---|---|
AckDate | The date when the alarm was acknowledged. |
AckDateExt | The date when the alarm was acknowledged in extended format (dd/mm/yyyy). |
AckTime | The time when the alarm was acknowledged. |
DeltaTime | The time difference between OnDate/OnTime and OffDate/OffTime, in seconds. |
FullName | The full name of the user (Full Name) who was logged on and performed some action on the alarm (for example, acknowledging the alarm or disabling the alarm, etc.). Be aware that when the alarm is first activated, the full name is set to "system" (because the operator did not trip the alarm). |
Native_SumDesc | A description of the alarm summary, in the native language. |
Native_Comment | Native language comments the operator adds to an Alarm Summary entry during runtime. |
OffDate | The date when the alarm returned to its normal state. |
OffDateExt | The date when the alarm returned to its normal state in extended format (dd/mm/yyyy). |
OffMilli | Adds milliseconds to the time the alarm returned to its normal state. |
OffTime | The time when the alarm returned to its normal state. |
OnDate | The date when alarm was activated. |
OnDateExt | The date when the alarm was activated in extended format (dd/mm/yyyy). |
OnMilli | Adds milliseconds to the time the alarm was activated. |
OnTime | The time when the alarm was activated. |
RecordId | String that uniquely identifies SOE records within the cluster. On the Alarm Summary table, this field references the associated SOE record. |
SumState | Describes the state of the alarm when it occurred. |
SumDesc | A description of the alarm summary. |
UserName | The name of the user (User Name) who was logged on and performed some action on the alarm (for example, acknowledging the alarm or disabling the alarm, etc.). Be aware that when the alarm is first activated, the user name is set to "system" (because the operator did not trip the alarm). |
The following fields can be retrieved when the Alarm SOE is displayed:
Field | Description |
---|---|
AlmComment | The text entered into the Comment field of the alarm properties dialog. |
Area | The area to which the alarm belongs. The user needs to have access to this area to access this alarm data. |
Category | The alarm category. |
Cluster | The name of the cluster the alarm tag applies. |
Comment | Operator comments attached to the Alarm Log entry (if any). |
Custom1..8 | Custom Filter Fields. |
Date | The date that the alarm changed state. |
DateExt | The date that the alarm changed state in extended format (mm/dd/yyyy). |
Deadband | Deadband (Only valid on analog alarms). |
Deviation | Deviation Alarm trigger value (only valid on analog alarms). |
Equipment | The name of the equipment with which the alarm is associated. |
FullName | The full name of the user (Full Name) who was logged on and performed some action on the alarm (for example, acknowledging the alarm or disabling the alarm, etc.). Be aware that when the alarm is first activated, the full name is set to "system" (because the operator did not trip the alarm). |
High | High Alarm trigger value (only valid on analog alarms). |
HighHigh | High High Alarm trigger value (only valid on analog alarms). |
LogState | The last state that the alarm passed through. |
Low | Low Alarm trigger value (only valid on analog alarms). |
LowLow | Low Low Alarm trigger value (only valid on analog alarms). |
Message | Additional information about the current status of the alarm. For example, a comment describing why the alarm has been disabled. |
Name | Alarm name. |
Native_Comment | Native language comments the operator adds to an Alarm Summary entry during runtime. |
Native_SumDesc | A description of the alarm summary, in the native language. |
Paging |
Alarm paged flag. |
PagingGroup |
Paging group for alarm. |
Priority | The alarm priority. |
Rate | Rate of change trigger value (only valid on analog alarms). |
RecordId | String that uniquely identifies SOE records within the cluster. On the Alarm Summary table, this field references the associated SOE record. |
State | The current state of the alarm |
State_desc | The configured description (for example, healthy or stopped) of a particular state |
SumDesc | A description of the alarm summary |
SumState | Describes the state of the alarm when it occurred |
Tag | Alarm tag |
Time | The time that the alarm changed state (hh:mm:ss). |
Type | The type of alarm or condition. |
UserLocation | The IP address or machine name where the event was triggered. |
UserName | The name of the user (User Name) who was logged on and performed some action on the alarm (for example, acknowledging the alarm or disabling the alarm, etc.). Be aware that when the alarm is first activated, the user name is set to "system" (because the operator did not trip the alarm). |
Return Value
The alarm field data (as a string) or empty string "".
Related Functions
Example
! Display the tag and category for the alarm at the specified AN.
FUNCTION
AlarmData(INT AN)
STRING Category;
STRING Tag;
Category=AlarmGetDsp(AN,"Category");
Tag=AlarmGetDsp(AN,"Tag");
Prompt("Alarm "+Tag+" is Category "+Category);
END
See Also
Published June 2018