Back to examples

Program notes

Level Alarm Latch

OR logic for level faults, a latched alarm, and manual operator reset.

1. What the Program Does

This example combines two level-fault conditions. An active Level_High or Level_Low sets a latched alarm. Even after the sensor clears, the alarm stays active until the operator requests reset.

Level_High OR Level_Low → Alarm_Latch → Level_Alarm

2. Example Signals

SignalTypePurpose
Level_HighInputHigh-level fault
Level_LowInputLow-level fault
Manual_ResetInputManual alarm reset
Alarm_ORBlockCombines fault conditions
Alarm_LatchBlockRetains the alarm state
Level_AlarmOutputFinal level alarm

3. Main Logic

OR activates when either fault sensor is active. Its result enters Set on an SR latch; Manual_Reset enters Reset:

Alarm_Request = Level_High OR Level_Low
Level_Alarm = SR(Alarm_Request, Manual_Reset)

4. Testing in the Simulator

  • Activate Level_High: Level_Alarm becomes TRUE.
  • Clear Level_High: Level_Alarm stays TRUE because it is latched.
  • Activate Manual_Reset: the alarm clears if no fault is active.
  • Repeat with Level_Low.
  • Activate Level_High and Manual_Reset together to observe SR's Set priority: the alarm remains TRUE.

5. What to Watch For

The latch separates the occurrence of a fault from the current sensor state. Even a brief level excursion remains visible to the operator.

A real program usually permits reset only after the cause has been removed. This learning diagram keeps reset as a separate input so latch behaviour is easy to test.

Check in editor

Open the ready-made FBD diagram, toggle inputs, and compare the simulation behavior with the program notes. The JSON is also available as a direct download.