Basic
10 min

Level Alarm Stack (First-Out)

alarmlevelfirst-outlatchingshutdown
Level Alarm Stack (First-Out) scenario preview

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in

Briefing

A tank level alarm stack monitors four setpoints: High-High (>95%), High (>80%), Low (<20%), and Low-Low (<5%). Each alarm latches its indicator lamp. The lamp blinks until acknowledged (ACK_PB), then stays solid. HH and LL alarms also assert SHUTDOWN. The HORN sounds on any unacknowledged alarm and is silenced by ACK_PB. RESET_PB clears all latched alarms once all process conditions have cleared.

Objectives

  • LEVEL_HIGH_HIGH asserts HH_LAMP (blinking until ACK) and SHUTDOWN
  • LEVEL_HIGH asserts H_LAMP (blinking until ACK)
  • LEVEL_LOW asserts L_LAMP (blinking until ACK)
  • LEVEL_LOW_LOW asserts LL_LAMP (blinking until ACK) and SHUTDOWN
  • ACK_PB silences HORN and transitions all blinking lamps to steady
  • RESET_PB clears all latched alarms when all level inputs are clear

Hints

  • Use separate latch bits for each alarm: HH_BIT, H_BIT, L_BIT, LL_BIT
  • Use ACK_BIT to track whether the operator has acknowledged (SET by ACK_PB)
  • HORN: on when any alarm is latched AND ACK_BIT is false
  • SHUTDOWN := HH_BIT OR LL_BIT
  • RESET_PB clears all latches only when all four level inputs are false
  • Lamp blinking is handled by the render layer; the ladder just drives the latch bit

I/O Table

Inputs

LEVEL_HIGH_HIGH

Level > 95% (HH)

BOOL · %I0.0

LEVEL_HIGH

Level > 80% (H)

BOOL · %I0.1

LEVEL_LOW

Level < 20% (L)

BOOL · %I0.2

LEVEL_LOW_LOW

Level < 5% (LL)

BOOL · %I0.3

ACK_PB

Acknowledge push-button

BOOL · %I0.4

RESET_PB

Reset push-button

BOOL · %I0.5

Outputs

HH_LAMP

High-High alarm lamp

BOOL · %Q0.0

H_LAMP

High alarm lamp

BOOL · %Q0.1

L_LAMP

Low alarm lamp

BOOL · %Q0.2

LL_LAMP

Low-Low alarm lamp

BOOL · %Q0.3

HORN

Audible alarm horn

BOOL · %Q0.4

SHUTDOWN

Emergency shutdown relay

BOOL · %Q0.5

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1Level through HH threshold asserts HH_LAMP and SHUTDOWN

    LEVEL_HIGH_HIGH trips — HH_LAMP, HORN and SHUTDOWN assert

  2. #2ACK_PB silences HORN but lamps stay on

    Acknowledge active alarm — horn silences, lamps remain asserted

  3. #3LEVEL_HIGH asserts H_LAMP (independent of HH)

    Manually trip H alarm — H_LAMP asserts without SHUTDOWN

  4. #4LEVEL_LOW_LOW asserts LL_LAMP and SHUTDOWN

    Trip LL alarm — LL_LAMP latches and SHUTDOWN asserts

  5. #5RESET_PB clears all alarms when all level inputs are clear

    Trip H alarm then clear level input and reset — lamp clears

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in