Alarms Engine (Reference) manages the execution, evaluation, and lifecycle of all alarm conditions within the FrameworX runtime environment. The Alarms Engine orchestrates:
The Alarms Engine orchestrates:
Understanding the engine helps when:
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
Each alarm item follows this state progression:
csharp
// State transition events
OnActive() // Normal → Active
OnAcknowledge() // Active → Acknowledged
OnNormalize() // Active → Normalized
OnReturn() // Any → Normal
The engine evaluates alarms in cycles:
Thread pool size: Min(CPU cores * 2, Active alarm count / 100)
For each scan cycle:
IF (EvaluateCondition(TagValue, Limit))
AND (NOT InDeadband())
AND (EnableCondition == True)
AND (Group.Enabled == True)
THEN
TriggerAlarm()
Special handling for RateOfChange:
CurrentRate = (CurrentValue - PreviousValue) / TimeDelta
IF (CurrentRate >= Limit)
TriggerAlarm()
Sampling: Every 100ms for RateOfChange conditions
Deviation = ABS(TagValue - Setpoint)
IF (Deviation > Limit + SetpointDeadband)
TriggerAlarm()
Prevents re-triggering within time window:
Hysteresis to prevent chattering:
Both time AND value must be satisfied:
CanRetrigger = (TimeSinceLastAlarm > TimeDeadband)
AND (ValueChange > ValueDeadband)
Asynchronous database writes:
sql
AlarmEvents (
EventID BIGINT PRIMARY KEY,
Timestamp DATETIME,
TagName VARCHAR(255),
AlarmGroup VARCHAR(100),
AlarmArea VARCHAR(255),
EventType INT,
Value FLOAT,
Limit FLOAT,
Message TEXT,
UserName VARCHAR(100),
AckTime DATETIME
)
High-priority alarms bypass queue:
Priority >= 900: Immediate dispatch
Priority 500-899: High priority queue
Priority 100-499: Normal queue
Priority < 100: Low priority queue
Lazy Evaluation:
Batch Processing:
Access via configuration file:
xml
<AlarmEngine>
<ThreadPoolSize>16</ThreadPoolSize>
<EvaluationInterval>100</EvaluationInterval>
<DatabaseBatchSize>100</DatabaseBatchSize>
<QueueSize>10000</QueueSize>
<CacheSize>1000</CacheSize>
<UseParallelEvaluation>true</UseParallelEvaluation>
</AlarmEngine>
Monitor engine performance:
csharp
var metrics = @Alarm.Engine.Metrics;
int evaluationsPerSec = metrics.EvaluationRate;
int queueDepth = metrics.QueueDepth;
double avgEvalTime = metrics.AverageEvaluationTime;
int activeThreads = metrics.ActiveThreadCount;
High CPU Usage:
Database Lag:
Memory Growth:
Missed Alarms:
Page Tree | ||
---|---|---|
|
The alarm process starts when a monitored tag or expression violates a set condition. It triggers an alarm event and sends notifications (visual, audible, email, etc.) based on the alarm group's settings. Operators acknowledge the alarm and begin troubleshooting the root cause. Once addressed, the alarm condition clears, and the system may automatically clear or require manual alarm clearing. Optionally, an auto-acknowledgment timeout may be in place. All alarm events, state changes, and user actions can be logged within the system, providing a robust audit trail for analysis, troubleshooting, and compliance.
On this page:
Table of Contents | ||||
---|---|---|---|---|
|
Triggering
An alarm workflow begins when a monitored tag or expression meets a defined alarm condition. This condition might signal a value exceeding a limit, a rapid rate of change, or another system event. The system detects the condition and generates an alarm event.
Notification
The system sends out notifications based on the configuration of the associated AlarmGroup. These notifications can include visual alerts on operator screens, audible alarms, emails, text messages, or integration with external systems. Notifications target the appropriate personnel based on alarm priority and area.
Acknowledgment
Operators acknowledge alarms, indicating awareness of the issue. The AlarmGroup might require acknowledgment before certain actions occur or to silence audible notifications. Acknowledgment status is tracked within the system.
Resolution
Operators investigate and address the root cause of the alarm. This might involve corrective action, system adjustments, or equipment maintenance. Once the underlying issue is resolved, the alarm condition clears.
Clearing and Auto-Acknowledgment
When the alarm condition no longer exists, the alarm clears. Some alarms might clear automatically, while others might require manual clearing by an operator. The Alarms Module can also employ auto-acknowledgment timeouts, where an alarm automatically transitions to an acknowledged state after a set period if the operator has not taken action.
Logging and Audit Trails
The Alarms Module logs alarm events, acknowledgments, state changes, and any associated user actions. This log creates a comprehensive audit trail. It assists in troubleshooting, analyzing system performance, and ensuring compliance with any required standards or regulations.
Once the AlarmGroup and items have been configured, the Alarms Module can be executed to start monitoring the specified tags and conditions. During Runtime, the Alarms Module continuously evaluates the conditions of the AlarmItem and generates alarms when the conditions are met. The alarms are then added to the alarm database and can be visualized and acknowledged by the operators. The runtime behavior of the Alarms Module can be controlled through runtime attributes such as alarm logging level, acknowledge timeout, and alarm retention time.
In this section: