Chemical Dosing Control
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 chemical dosing system injects reagent into a water main proportionally. When flow is active and the operator enables dosing, the dose pump runs at a speed inversely proportional to the chemical tank level (smaller tank = more concentrated injection needed = faster pump speed). A LOW_TANK_ALARM input cuts off dosing immediately and activates the LOW_TANK_LAMP warning.
Objectives
- DOSE_PUMP_RUN energises only when FLOW_RUNNING AND DOSE_START AND NOT LOW_TANK_ALARM
- DOSE_PUMP_SPEED (REAL 0–100%) is proportional to (100 – TANK_LEVEL): empty tank runs faster
- LOW_TANK_ALARM stops the dose pump and lights LOW_TANK_LAMP
- LOW_TANK_LAMP stays ON while LOW_TANK_ALARM is asserted
- When dosing is disabled or flow stops, DOSE_PUMP_RUN and DOSE_PUMP_SPEED go to 0
Hints
- DOSE_PUMP_RUN := FLOW_RUNNING AND DOSE_START AND NOT LOW_TANK_ALARM
- DOSE_PUMP_SPEED := DOSE_PUMP_RUN * (100.0 - TANK_LEVEL)
- LOW_TANK_LAMP := LOW_TANK_ALARM
- Clamp DOSE_PUMP_SPEED between 0.0 and 100.0
I/O Table
Inputs
FLOW_RUNNINGFlow switch — water main active
BOOL · %I0.0
DOSE_STARTOperator dose enable switch
BOOL · %I0.1
TANK_LEVELChemical tank level 0–100%
REAL · %IW0
LOW_TANK_ALARMLow tank float switch (<10%)
BOOL · %I0.2
Outputs
DOSE_PUMP_RUNDose pump run contactor
BOOL · %Q0.0
DOSE_PUMP_SPEEDDose pump speed 0–100%
REAL · %QW0
LOW_TANK_LAMPLow tank alarm lamp
BOOL · %Q0.1
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Dose pump starts when flow active and dose enabled
FLOW_RUNNING + DOSE_START + tank at 50% -> pump runs at ~50% speed
- #2Dose pump stops when flow is lost
FLOW_RUNNING goes false -> pump stops
- #3LOW_TANK_ALARM stops dosing and lights lamp
LOW_TANK_ALARM while running -> pump stops, LOW_TANK_LAMP on
- #4Speed is inversely proportional to tank level
Lower tank level -> higher pump speed
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