Changes the threshold (that is High High, Low etc.) of analog alarms by the alarm record number. You can call this function only on an Alarms Server for alarms on that server, or on the redundant server (if a redundant server is configured). If calling this function from a remote client, use the MsgRPC() function.
Threshold changes made using this function are permanent (that is they are saved to the project). The display format currently specified for the record (in the Analog Alarms form) will be applied to these values.
Note: Record numbers obtained from AlarmGetDsp are not valid for this function.
When the Alarm Server is not in the calling process, this function will become blocking and cannot be called from a foreground task. In this case, the return value will be undefined and a Cicode hardware alarm will be raised.
AlarmSetThresholdRec(Record, Type, Value)
The alarm record number, returned from any of the following alarm functions:
To store this value, use data type Int in Cicode or Long for variable tags (Long needs 4 bytes).
The type of threshold:
0 - High high
1 - High
2 - Low
3 - Low low
4 - Deadband
5 - Deviation
6 - Rate of change
The new value of the threshold. Enter a blank value "" to remove the threshold.
0 (zero) if successful, otherwise an error is returned.