inSCADA
Ver 2020 EN
Search…
⌃K

Alarm Functions

Alarm functions allow you to manage alarms on the inSCADA platform with script/expression. With these functions you can start, stop and check the status of alarms.

Get Alarm Status

ins.getAlarmStatus(String alarmName)

Provides information about the status of an alarm.
alarmName: The alarm name.
Return Value: Returns a string message about the status of the alarm.

Syntax

var status=ins.getAlarmStatus("ALM_01");
if (status==="Active") {
ins.notify("info","ALM_01","ALM_01 is Active");
}

Activate Alarm

ins.activateAlarm(String alarmName)

Activates the alarm.
alarmName: The alarm name.
Return Value: Does not return any value.

Syntax

ins.activateAlarm("ALM_01");

Deactivate Alarm

ins.deactivateAlarm(String alarmName)

Deactivates the alarm.
alarmName: The alarm name.
Return Value: Does not return any value.

Syntax

ins.deactivateAlarm("ALM_01");

Get a Alarm

ins.getLastFiredAlarm(Integer index)

Returns an alarm according to the index number of alarms that have turned ON.
index: Indicates the order in which the ON alarm arrives.
Return Value: Returns a JSON Alarm object.

Syntax

var alm_01=ins.getLastFiredAlarm(0);
if (alm_01!==null) {
return alm.name+" "+alm.status;
}
return -1;