Skip to content

Alarm Management

The alarm system detects, records, and reports abnormal conditions on variable values. Alarms are organized into groups, and each group is bound to a project.

Alarm Groups

An alarm group organizes alarm definitions and defines common behavior (scan period, priority, trigger scripts, colors, printer settings).

FieldTypeRequiredDescription
nameString (≤100)YesGroup name
dscString (≤255)NoDescription
scanTimeInMillisInteger (≥100)YesAlarm check period (ms)
priorityShort (1-255)YesPriority level
projectIdStringYesOwning project

Script references that run automatically on alarm events — all optional:

FieldDescription
onScriptIdRepeatableScript that runs when the alarm fires
offScriptIdScript that runs when the alarm clears
ackScriptIdScript that runs when the alarm is acknowledged

Alarm monitor row background colors:

FieldState
onNoAckColorON + not acknowledged
onAckColorON + acknowledged
offNoAckColorOFF + not acknowledged
offAckColorOFF + acknowledged

Colors are stored as hex #RRGGBB.

Alarm events can be pushed directly to a network printer:

FieldDescription
printerIpPrinter IP
printerPortPrinter port (0-65535)
printWhenOnPrint on fire
printWhenOffPrint on clear
printWhenAckPrint on acknowledge
printWhenCommentPrint on comment

Each alarm row in the Alarm table carries a DiscriminatorValue selecting one of three subtypes.

FieldTypeDescription
nameString (≤100)Alarm name (unique within the project)
dscString (≤255)Description
groupIdStringOwning alarm group
delayInteger (ms, ≥0)Debounce — must hold condition this long before firing
isActiveBooleanWhether this definition is active
partString (≤100)Equipment / line code — used for filtering and reporting
onTimeVariableIdStringOptional variable that receives the ON timestamp
offTimeVariableIdStringOptional variable that receives the OFF timestamp

Threshold monitoring on numeric variables. Additional fields:

FieldDescription
variableIdMonitored variable
setPointValueReference value (for deviation computation)
highHighValueCritical-high threshold
highValueWarning-high threshold
lowValueWarning-low threshold
lowLowValueCritical-low threshold
deadbandHysteresis (absolute) — delta required before the alarm re-clears
deviationPercentagePercent deviation from setPoint
ThresholdExample
High-HighTemperature > 90 °C (critical)
HighTemperature > 70 °C (warning)
LowPressure < 2 bar (warning)
Low-LowPressure < 1 bar (critical)

Unused thresholds can be left null — they will not be checked. deadband prevents chattering.

Monitors boolean state changes.

ConditionBehavior
Value trueAlarm fires (ON)
Value falseAlarm clears (OFF)

Examples: motor fault contact, door-open contact, e-stop button.

Arbitrary alarm condition expressed as JavaScript. Truthy → ON, falsy → OFF.

// Alarm that depends on two variables
var power = ins.getVariableValue("ActivePower_kW").value;
var temp = ins.getVariableValue("Temperature_C").value;
return power > 500 && temp > 70;

The actual alarm status (FiredAlarmStatus enum) is two-valued:

ON (fired) → OFF (cleared)

Acknowledge, comment, and force-off are not part of the status — they are separate fields / operations:

Field / OperationMeaning
acknowledgeTime / acknowledgedBySet when an operator acknowledges; the alarm may still be ON
commentTime / comment / commentedBySet when an operator adds a comment
forceOff operationDrives the alarm OFF artificially, even if the condition still holds
offTimeSet when the condition naturally clears
ActionWhoChanges status?
AcknowledgeOperatorNo (acknowledgeTime fills in)
CommentOperatorNo (comment + commentTime fill in)
Force OffOperatorYes (ON → OFF)
Natural clearSystemYes (offTime fills in)
StatusAckTypical Color
ONNot ackedRed blinking (onNoAckColor)
ONAckedRed solid (onAckColor)
OFFNot ackedYellow (offNoAckColor)
OFFAckedNormal (offAckColor)

Alarm Monitor

Live view of active alarms. From this screen the operator can:

  • View alarms
  • Acknowledge
  • Comment
  • Force off

Historical alarm query by date range. Each FiredAlarm record has:

FieldDescription
alarmNameWhich alarm fired
onTimeFire timestamp
offTimeClear timestamp (null = still ON)
statusOn / Off
acknowledgedBy / acknowledgeTimeWho acknowledged, when
comment / commentedBy / commentTimeComment metadata
variableValueVariable value at fire time
partInherited from the definition — usable as a filter

// Last N fired alarms (exclude OFFs)
var last10 = ins.getFiredAlarms(0, 10);
// → [{ alarmName: "...", status: "On", onTime: ..., ... }, ...]
// Last N including OFFs
var last10Full = ins.getFiredAlarms(0, 10, true);
// History in date range (last 24h)
var end = ins.now();
var start = ins.getDate(end.getTime() - 86400000);
var history = ins.getFiredAlarmsByDate(start, end, true, 100);
// Currently-fired alarms
var current = ins.getCurrentAlarms(false);
// Disable an alarm group (maintenance mode)
ins.deactivateAlarmGroup("Temperature_Alarms");
// Re-enable after maintenance
ins.activateAlarmGroup("Temperature_Alarms");
// Operator actions — take a FiredAlarmDto
var latest = ins.getFiredAlarm(0);
if (latest) {
ins.acknowledgeAlarm(latest);
ins.commentAlarm(latest, "Maintenance team notified");
// ins.forceOffAlarm(latest); // to force clear
}
// Alarm / group status
var groupStatus = ins.getAlarmGroupStatus("Temperature_Alarms");
// → "Active" or "Not Active"

Details: Alarm API → | REST API Reference → (see Alarm Group, Analog Alarm, Digital Alarm, Custom Alarm, Fired Alarm, Alarm Controller Facade groups)