Cicode Programming Reference > Cicode Function Categories > Alarm Functions Introduction > AlarmSetThreshold

AlarmSetThreshold

Changes the thresholds (that is High High, Low etc.) of analog alarms. This function acts on the analog alarm where the cursor is positioned. Use this function to change (at run time) the threshold values that were specified in the Analog Alarms database. 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.

Syntax

AlarmSetThreshold(Type, Value)

Type:

The type of threshold:

0 - High high

1 - High

2 - Low

3 - Low low

4 - Deadband

5 - Deviation

6 - Rate of change

Value:

The new value of the threshold. Enter a blank value "" to remove the threshold.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

AlarmSetThresholdRec

Example

System Keyboard

Key Sequence

SetHighHigh ### Enter

Command

AlarmSetThreshold(0, Arg1)

Comment

Change the threshold of a high high alarm

System Keyboard

Key Sequence

SetHigh ### Enter

Command

AlarmSetThreshold(1, Arg1)

Comment

Change the threshold of a high alarm

System Keyboard

Key Sequence

SetLow ### Enter

Command

AlarmSetThreshold(2, Arg1)

Comment

Change the threshold of a low alarm

System Keyboard

Key Sequence

SetlowLow ### Enter

Command

AlarmSetThreshold(3, Arg1)

Comment

Change the threshold of a low low alarm

See Also

Alarm Functions