AlarmGetThresholdRec
- Last UpdatedApr 15, 2024
- 1 minute read
Gets the threshold of analog alarms by the alarm record number.
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
REAL AlarmGetThresholdRec(LONG Record, INT Type [, 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).
Type:
The type of threshold:
0 - High high
1 - High
2 - Low
3 - Low low
4 - Deadband
5 - Deviation
6 - Rate of change
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 threshold or 0.0.
Related Functions
AlarmFirstCatRec, AlarmNextCatRec, AlarmFirstPriRec, AlarmNextPriRec, AlarmFirstTagRec, AlarmNextTagRec, AlarmGetThreshold, AlarmSetThreshold, AlarmSetThresholdRec