Safety Mat Monitor
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 safety mat system protects two hazardous zones. When a worker steps onto a mat (MAT_ZONE_1 or MAT_ZONE_2 goes true), the corresponding zone lamp latches on, HORN sounds, and MACHINE_STOP is asserted. The SILENCE_PB quiets the HORN without clearing the zone lamp. The RESET_PB clears the zone lamp and releases MACHINE_STOP — but only while the corresponding mat is unoccupied. Both mats can be tripped simultaneously.
Objectives
- MAT_ZONE_1 pressed latches ZONE_1_LAMP and asserts MACHINE_STOP + HORN
- MAT_ZONE_2 pressed latches ZONE_2_LAMP and asserts MACHINE_STOP + HORN
- SILENCE_PB silences HORN but zone lamps remain on
- RESET_PB clears zone lamp only when the corresponding mat is released
- MACHINE_STOP de-energises only when both zone lamps are cleared
- Both mats pressed simultaneously latches both zone lamps
Hints
- Use separate latch bits (ZONE1_BIT, ZONE2_BIT): S= on mat press, R= on RESET_PB AND mat released
- HORN: S= on any mat press, R= on SILENCE_PB OR when both lamps clear
- MACHINE_STOP := ZONE1_BIT OR ZONE2_BIT
- ZONE_1_LAMP := ZONE1_BIT; ZONE_2_LAMP := ZONE2_BIT
- Mat inputs default FALSE (no one on mat). TRUE = person present.
I/O Table
Inputs
MAT_ZONE_1Safety mat zone 1 (true = pressed)
BOOL · %I0.0
MAT_ZONE_2Safety mat zone 2 (true = pressed)
BOOL · %I0.1
RESET_PBReset push-button (momentary)
BOOL · %I0.2
SILENCE_PBHorn silence push-button (momentary)
BOOL · %I0.3
Outputs
ZONE_1_LAMPZone 1 fault indicator lamp
BOOL · %Q0.0
ZONE_2_LAMPZone 2 fault indicator lamp
BOOL · %Q0.1
HORNAudible alarm horn
BOOL · %Q0.2
MACHINE_STOPMachine stop relay (energised = stop)
BOOL · %Q0.3
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1MAT_ZONE_1 pressed latches ZONE_1_LAMP and asserts MACHINE_STOP
Step on mat 1 — lamp latches, horn sounds, machine stops
- #2ZONE_1_LAMP stays latched after mat released (no reset)
Mat released without reset — lamp must stay on, stop must stay asserted
- #3SILENCE_PB mutes HORN but zone lamp stays on
Press SILENCE_PB — horn silences, zone lamp stays latched
- #4RESET_PB clears lamp only when mat is released
Release mat then press RESET_PB — lamp clears and machine stop releases
- #5Both mats pressed latch both zone lamps independently
Trip both mats; release mat 1 and reset clears only zone 1 lamp
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