inSCADA
EN
EN
  • Introduction
  • Getting started
  • User Interface
    • Home
    • Development
      • Projects
      • Connections
      • Devices
      • Animations
        • Get
        • Color
        • Rotate
        • Move
        • Opacity
        • Bar
        • Click
        • Tooltip
      • Alarm Groups
      • Alarms
      • Scripts
      • Expressions
      • Variables
      • Reports
      • Processes
      • Mail
      • Import/Export
    • Wizards
      • Gas Metering
      • HPP Unit
      • Device Library
    • Visiualisation
    • Processes
    • Control Panel
    • Project Map
    • Variable History
    • Alarm History
    • Alarm Monitor
    • Trend Graphics
    • Reports
    • Logs
    • Auth Logs
    • Jobs
    • Users
    • Help
    • About
    • License
  • Mimic Design
  • Communication Protocols
    • MODBUS
      • Modbus TCP
      • Modbus UDP
      • Modbus RTU Over TCP
      • Modbus TCP Server
      • Modbus RTU Slave Over TCP
    • DNP3
      • DNP3 Master
      • DNP3 Outstation
    • PROFINET
    • IEC-104
    • SNMP
    • OPC
      • OPC UA Client
  • Programing
    • APIs
      • Variable Functions
      • Connection Functions
      • Project Functions
      • Alarm Functions
      • Script Functions
      • In-Memory DB Functions
      • System Functions
      • User Functions
      • Date-Time Functions
      • String Functions
      • Notification Functions
      • Confirmation Functions
      • Database Functions
      • Other Functions
  • Database
  • Usefull Features
  • Update Logs
  • Architectures and Applications
  • Development Roadmap
  • Migration to inSCADA
  • Licensing Policies
  • FAQ
  • Screenshots
  • Auxiliary Tools
  • Installations
    • Requirements
    • Installation on Linux
Powered by GitBook
On this page
  • Get Alarm Status
  • Activate Alarm
  • Deactivate Alarm
  • Get a Alarm
  1. Programing
  2. APIs

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;
PreviousProject FunctionsNextScript Functions

Last updated 5 years ago