Flushing Valve Sequence
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 pipeline flushing system opens valves and runs a pump in a timed sequence to purge a pipe section. The sequence is: open inlet valve (5s), start pump (10s), open outlet valve + close inlet, drain through drain valve (3s), then close all. Each step uses a timed transition. ABORT immediately drops all outputs. An internal FAULT latches if the sequence takes too long.
Objectives
- START_PB begins the flush sequence from IDLE
- Sequence: VALVE_INLET open 5s → PUMP_RUN 10s → VALVE_OUTLET open + VALVE_INLET close → VALVE_DRAIN 3s → all closed
- SEQ_COMPLETE_LAMP lights for 2s when sequence finishes successfully
- ABORT_PB or STOP_PB at any time drops all outputs and returns to IDLE
- FAULT_LAMP latches if sequence does not complete within 30s
Hints
- Use a step variable (IDLE, FILL, PUMP, FLUSH, DRAIN, DONE) with a TON per step
- Each step timer resets on entry; transition fires on Q output of the TON
- ABORT := ABORT_PB; on ABORT set all outputs false and step := IDLE
- For simplicity: STOP_PB also aborts mid-sequence
I/O Table
Inputs
START_PBStart push-button (momentary)
BOOL · %I0.0
STOP_PBStop push-button (momentary)
BOOL · %I0.1
ABORT_PBAbort push-button (drops all)
BOOL · %I0.2
Outputs
VALVE_INLETInlet solenoid valve
BOOL · %Q0.0
VALVE_OUTLETOutlet solenoid valve
BOOL · %Q0.1
VALVE_DRAINDrain solenoid valve
BOOL · %Q0.2
PUMP_RUNFlush pump run contactor
BOOL · %Q0.3
SEQ_COMPLETE_LAMPSequence complete indicator
BOOL · %Q0.4
FAULT_LAMPFault indicator lamp
BOOL · %Q0.5
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1VALVE_INLET opens when START_PB pressed
START_PB -> VALVE_INLET energises in step FILL
- #2Pump runs after inlet step (5s)
After 5s in FILL, PUMP_RUN energises
- #3ABORT_PB drops all outputs immediately
Mid-sequence abort clears all valves and pump
- #4Full sequence completes and lights SEQ_COMPLETE_LAMP
Run full sequence: FILL(5s)+PUMP(10s)+FLUSH(0s)+DRAIN(3s) -> SEQ_COMPLETE_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