Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

AlarmGetFieldRec

  • Last UpdatedOct 28, 2024
  • 2 minute read

Gets the contents of the specified field in the specified alarm record.

This is a blocking function. If the function is called from a foreground task that is unable to block, the return value will be -1 and a hardware alarm set. Use IsError() to retrieve the error code.

Syntax

STRING AlarmGetFieldRec(LONG Record, STRING Field [, INT Ver [, STRING ClusterName]])

Record:

The alarm record number, returned from any of the following alarm functions:

• AlarmFirstCatRec() or AlarmNextCatRec() - used to search for a record by alarm category, area, and type (acknowledged, disabled, etc.).

• AlarmFirstPriRec() or AlarmNextPriRec() - used to search for a record by alarm priority, area, and type (acknowledged, disabled, etc.).

• AlarmFirstTagRec() or AlarmNextTagRec() - used to search for a record by alarm tag, name, and description.

To store this value, use data type Int in Cicode or Long for variable tags (Long needs 4 bytes).

Field:

The name of the field from which the data is retrieved.

ACKDATE, ACKDATEEXT, ACKMILLI, ACKTIME, ACKUTC, ACQDESC, ACQERROR, ALARMTYPE, ALMCOMMENT, AREA, ARR_SIZE, CATEGORY, CAUSE1…8, CLASSIFICATION, CLUSTER, COMMENT, CONSEQUENCE1…8, CUSTOM1…8, DATE, DATEEXT, DEADBAND, DELAY, DELTAMILLI, DELTATIME, DESC, DEVDELAY, DEVIATION, DISABLECOMMENT, DISABLEDDATE, DISABLEDTIME, DISABLEENDDATE, DISABLEENDDATEEXT, DISABLEENDTIME, ENG_ZERO, ERRDESC, ERRPAGE, EQUIPMENT, FORMAT, FULLNAME, GROUP, HDELAY, HELP, HHDELAY, HIGH, HIGHHIGH, HISTORIAN, ITEM, LDELAY, LLDELAY, LOCALTIMEDATE, LOGSTATE, LOW, LOWLOW, MESSAGE, MILLISEC, NAME, NATIVE_COMMENT, NATIVE_DESC, NATIVE_NAME, NATIVE_SUMDESC, OFFDATE, OFFDATEEXT, OFFMILLI, OFFTIME, OFFTIMEDATE, OFFUTC, OLD_DESC, ONDATE, ONDATEEXT, ONMILLI, ONTIME, ONTIMEDATE, ONUTC, PAGING, PAGINGGROUP, PRIORITY, PRIV, PSI_TYPE, RATE, RECEIPTLOCALTIMEDATE, RECEIPTDATE, RECEIPTDATEEXT, RECEIPTMILLISEC, RECEIPTTIME, RECEIPTTIMEINT, RECEIPTTIMETICKS, RESPONSE1…8, RESPONSENUM, SETPOINT, STATE, STATE_DESC, STATE_DESC0...7, SUMDESC, SUMSTATE, SUMTYPE, TAG, TAGEX, TAGGENLINK, TIME, TIMEDATE, TIMEINT, TIMETICKS, TSQUALITY, TYPE, TYPENUM, USERDESC, USERNAME, USERLOCATION, VALUE.

See Browse Function Field Reference for more information about these fields.

nVer:

The version of an alarm.

If an alarm has been triggered more than once in a given period, the version lets you distinguish between different instances of the alarm's activity.

The version is used in filtering alarms for display. A query function passes a value to this parameter in order to get field information for a particular alarm.

This parameter is not needed when you use AlarmGetFieldRec() for purposes other than filtering. It will default to 0 if omitted.

ClusterName:

Specifies the name of the cluster in which the Alarm Server resides. This is optional if you have one cluster or are resolving the alarm server via the current cluster context. The argument is enclosed in quotation marks "".

Return Value

The alarm field data (as a string) or empty string "".

AlarmFirstTagRec, AlarmNextTagRec,

Example


FUNCTION
GetNameFromTag(STRING sTag)

INT record;

STRING sName

record = AlarmFirstTagRec(sTag, "", "");

IF record <> -1 THEN

sName = AlarmGetFieldRec(record,"NAME");

ELSE

sName = "";

END

RETURN sName;

END

See Also

Alarm Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in