Level Alarm Stack (First-Out)
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_HIGHLevel > 95% (HH)
BOOL · %I0.0
LEVEL_HIGHLevel > 80% (H)
BOOL · %I0.1
LEVEL_LOWLevel < 20% (L)
BOOL · %I0.2
LEVEL_LOW_LOWLevel < 5% (LL)
BOOL · %I0.3
ACK_PBAcknowledge push-button
BOOL · %I0.4
RESET_PBReset push-button
BOOL · %I0.5
Outputs
HH_LAMPHigh-High alarm lamp
BOOL · %Q0.0
H_LAMPHigh alarm lamp
BOOL · %Q0.1
L_LAMPLow alarm lamp
BOOL · %Q0.2
LL_LAMPLow-Low alarm lamp
BOOL · %Q0.3
HORNAudible alarm horn
BOOL · %Q0.4
SHUTDOWNEmergency 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.
- #1Level through HH threshold asserts HH_LAMP and SHUTDOWN
LEVEL_HIGH_HIGH trips — HH_LAMP, HORN and SHUTDOWN assert
- #2ACK_PB silences HORN but lamps stay on
Acknowledge active alarm — horn silences, lamps remain asserted
- #3LEVEL_HIGH asserts H_LAMP (independent of HH)
Manually trip H alarm — H_LAMP asserts without SHUTDOWN
- #4LEVEL_LOW_LOW asserts LL_LAMP and SHUTDOWN
Trip LL alarm — LL_LAMP latches and SHUTDOWN asserts
- #5RESET_PB clears all alarms when all level inputs are clear
Trip H alarm then clear level input and reset — lamp clears
Related scenarios
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