Light Curtain Muting
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 light curtain guards a hazardous machine zone. Under normal operation, any beam break (LIGHT_CURTAIN_OK = false) stops the machine and latches SAFETY_FAULT_LATCH. However, a legitimate material-handling conveyor must be able to pass product through the curtain without tripping the fault. This is called "muting" — a temporary, validated bypass. Valid muting requires MUTE_A to assert first, then MUTE_B within 2 seconds, with at least 50 ms gap between them. Simultaneous assertion, reversed order (B before A), or exceeding the 2 s window are all invalid — they latch SAFETY_FAULT_LATCH. RESET_PB clears a latched fault once all conditions are safe.
Objectives
- MACHINE_ENABLE is on while LIGHT_CURTAIN_OK is true and no fault is latched
- Beam break (LIGHT_CURTAIN_OK = false) without valid muting → latch SAFETY_FAULT_LATCH
- Valid mute: MUTE_A then MUTE_B, ≥50 ms apart, within 2 s — MUTE_LAMP asserts during the muted window
- MUTE_LAMP stays on as long as both mute sensors are active and the sequence was valid
- Invalid mute (simultaneous, reversed, or timeout) → latch SAFETY_FAULT_LATCH
- RESET_PB clears SAFETY_FAULT_LATCH only when LIGHT_CURTAIN_OK is true and no mute is active
Hints
- Use R_TRIG on MUTE_A to detect its rising edge; latch MUTE_A_BIT
- Start a TON (2 s) on MUTE_A rising edge — if it expires before MUTE_B asserts, fault
- Check MUTE_A_BIT AND NOT MUTE_B_PREV on MUTE_B rising edge for reverse-order guard
- MUTE_VALID := MUTE_A_BIT AND MUTE_B (both asserted, valid sequence)
- MACHINE_ENABLE := LIGHT_CURTAIN_OK AND /SAFETY_FAULT_LATCH; or bypass OK when MUTE_VALID
I/O Table
Inputs
LIGHT_CURTAIN_OKLight curtain OK (true = clear, false = blocked)
BOOL · %I0.0
MUTE_AMute sensor A (first in sequence)
BOOL · %I0.1
MUTE_BMute sensor B (second in sequence, within 2 s)
BOOL · %I0.2
START_PBMachine start push-button
BOOL · %I0.3
RESET_PBFault reset push-button
BOOL · %I0.4
Outputs
MACHINE_ENABLEMachine run enable output
BOOL · %Q0.0
SAFETY_FAULT_LATCHSafety fault (latching)
BOOL · %Q0.1
MUTE_LAMPMute active indicator lamp
BOOL · %Q0.2
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Machine enables when curtain OK and started
With LC clear and START_PB, MACHINE_ENABLE asserts and no fault
- #2Beam break without muting latches SAFETY_FAULT_LATCH
LC blocked with no valid mute → fault latches; releasing LC does not clear
- #3Valid mute sequence allows curtain block without fault
MUTE_A then MUTE_B within 2s, then LC blocked — no fault, MUTE_LAMP on
- #4Simultaneous MUTE_A + MUTE_B latches fault
Both mute sensors asserted at same time is an invalid mute — fault latches
- #5MUTE_B before MUTE_A latches fault
Reversed order is an invalid mute — SAFETY_FAULT_LATCH must latch
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