CIP Sequence Controller
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
Clean-in-Place (CIP) is a fully automated cleaning sequence used in food and beverage processing. Your controller must step a vessel through five cleaning stages — Pre-Rinse, Caustic wash, Intermediate Rinse, Acid wash, and Final Rinse — each timed precisely. The pump and heater must be managed correctly per stage, and the FLOW_OK and TEMP_OK process interlocks must be satisfied before the cycle is considered healthy. Pressing STOP_PB at any time aborts the sequence and returns to IDLE.
Objectives
- START_PB begins the sequence from IDLE
- PRE_RINSE (3 s): open VALVE_RINSE + run PUMP_RUN
- CAUSTIC (6 s): open VALVE_CAUSTIC + run PUMP_RUN + HEATER_ON
- INTERMEDIATE_RINSE (3 s): open VALVE_RINSE + run PUMP_RUN
- ACID (4.5 s): open VALVE_ACID + run PUMP_RUN + HEATER_ON
- FINAL_RINSE (3 s): open VALVE_RINSE + run PUMP_RUN, then assert CYCLE_COMPLETE_LAMP
- STOP_PB aborts the sequence at any stage and closes all outputs
- FAULT_LAMP asserts if pump stops unexpectedly during an active stage
Hints
- Use a step counter (INT) or a chain of latching bits: STEP_PRE_RINSE, STEP_CAUSTIC …
- Use TON timers — one per step, chained so the Q output advances to the next step
- VALVE_RINSE := STEP_PRE_RINSE OR STEP_INTERMEDIATE_RINSE OR STEP_FINAL_RINSE
- HEATER_ON := STEP_CAUSTIC OR STEP_ACID; only these steps need TEMP_OK satisfied
- CYCLE_COMPLETE_LAMP latches SET at the end of FINAL_RINSE; R= on START_PB
I/O Table
Inputs
START_PBStart push-button
BOOL · %I0.0
STOP_PBStop / abort push-button
BOOL · %I0.1
FLOW_OKFlow switch (asserts ~0.5 s after pump+valve)
BOOL · %I0.2
TEMP_OKTemperature at setpoint (asserts ~1 s after heater on)
BOOL · %I0.3
Outputs
VALVE_RINSERinse water supply valve
BOOL · %Q0.0
VALVE_CAUSTICCaustic solution valve
BOOL · %Q0.1
VALVE_ACIDAcid solution valve
BOOL · %Q0.2
PUMP_RUNCirculation pump
BOOL · %Q0.3
HEATER_ONTank heater (caustic + acid stages)
BOOL · %Q0.4
CYCLE_COMPLETE_LAMPCycle complete indicator lamp
BOOL · %Q0.5
FAULT_LAMPFault indicator lamp
BOOL · %Q0.6
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1START_PB opens VALVE_RINSE and runs pump (PRE_RINSE)
Press START_PB; VALVE_RINSE and PUMP_RUN must assert; no caustic or acid valve
- #2CAUSTIC step opens VALVE_CAUSTIC + HEATER_ON
After PRE_RINSE completes, VALVE_CAUSTIC and HEATER_ON must be on
- #3CYCLE_COMPLETE_LAMP asserts after all steps finish
Run the full sequence; CYCLE_COMPLETE_LAMP should assert at end
- #4STOP_PB aborts mid-sequence and closes all outputs
Start the sequence, press STOP during PRE_RINSE; all outputs must go off
- #5ACID step opens VALVE_ACID and runs heater
After pre-rinse + caustic + intermediate rinse, VALVE_ACID and HEATER_ON must be on
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