Two-Hand Control (Safety)
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
Two-hand control is a Type-III safety device used on presses and stamping machines. Both BUTTON_A and BUTTON_B must be pressed within 500 ms of each other and held simultaneously for at least 200 ms, with GUARD_OK also active. If only one hand is pressed and 500 ms elapse before the other, a fault latches. Releasing either button immediately drops CYCLE_START. The fault latches until both buttons are released.
Objectives
- Both buttons pressed within 500 ms window (with GUARD_OK) → CYCLE_START after both held 200 ms
- Releasing either button immediately drops CYCLE_START
- One button pressed and held >500 ms without the other → FAULT_LAMP latches
- FAULT_LAMP clears automatically when both buttons are released
- GUARD_OK must be true throughout; opening guard drops CYCLE_START and latches fault
Hints
- Use TON timers: T_WINDOW for the 500 ms anti-tie-down window, T_HOLD for the 200 ms both-held requirement
- FAULT_BIT: SET when T_WINDOW.Q fires (only one hand pressed); R= when /BUTTON_A AND /BUTTON_B
- CYCLE_START: only true when both hands held AND /FAULT_BIT AND GUARD_OK
- Restart window timer whenever only one (not both, not neither) button is pressed
I/O Table
Inputs
BUTTON_ALeft-hand button (momentary, held)
BOOL · %I0.0
BUTTON_BRight-hand button (momentary, held)
BOOL · %I0.1
GUARD_OKGuard / barrier confirmed closed
BOOL · %I0.2
Outputs
CYCLE_STARTCycle start permissive output
BOOL · %Q0.0
FAULT_LAMPAnti-tie-down fault indicator lamp
BOOL · %Q0.1
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Both buttons pressed together triggers CYCLE_START
Press both buttons simultaneously with GUARD_OK — CYCLE_START after 200 ms hold
- #2Releasing either button drops CYCLE_START immediately
While CYCLE_START is active, release one button — output drops
- #3Single button held >500 ms without second button latches fault
Press BUTTON_A only — after 500 ms window expires FAULT_LAMP latches
- #4Fault auto-clears when both buttons released
After a tie-down fault, releasing all buttons resets the fault
- #5GUARD_OK must be true for CYCLE_START
Both buttons held but GUARD_OK false — CYCLE_START stays off
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