Basic
20 min

Chemical Dosing Control

dosingwaterproportionalalarmREAL

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

Chemical Dosing Control scenario preview

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). The dosing skid's VFD takes its speed reference directly from a proportional controller block in your program: declare DOSE_PID : PID and run it P-only so its CV equals (100 − TANK_LEVEL). 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 speed (DOSE_PID.CV, 0–100%) is proportional to (100 – TANK_LEVEL): emptier 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 drops and the dose speed parks at 0

Hints

  • DOSE_PUMP_RUN := FLOW_RUNNING AND DOSE_START AND NOT LOW_TANK_ALARM
  • Declare the controller instance exactly as DOSE_PID : PID; — the skid VFD (and the grader) read DOSE_PID.CV
  • P-only proportional maths: DOSE_PID(SP := 100.0, PV := TANK_LEVEL, Kp := 1.0, Ki := 0.0, Kd := 0.0, MIN := 0.0, MAX := 100.0, DT_MS := 50, ENABLE := DOSE_PUMP_RUN); gives CV = 100 − TANK_LEVEL
  • ENABLE := DOSE_PUMP_RUN parks the CV at MIN (0) whenever the pump permissive drops
  • LOW_TANK_LAMP := LOW_TANK_ALARM

I/O Table

Inputs

FLOW_RUNNING

Flow switch — water main active

BOOL · %I0.0

DOSE_START

Operator dose enable switch

BOOL · %I0.1

TANK_LEVEL

Chemical tank level 0–100%

REAL · %IW0

LOW_TANK_ALARM

Low tank float switch (<10%)

BOOL · %I0.2

Outputs

DOSE_PUMP_RUN

Dose pump run contactor

BOOL · %Q0.0

LOW_TANK_LAMP

Low 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.

  1. #1Dose pump starts when flow active and dose enabled

    FLOW_RUNNING + DOSE_START + tank at 50% -> pump runs at ~50% speed

  2. #2Dose pump stops when flow is lost

    FLOW_RUNNING goes false -> pump stops

  3. #3LOW_TANK_ALARM stops dosing and lights lamp

    LOW_TANK_ALARM while running -> pump stops, LOW_TANK_LAMP on

  4. #4Speed is inversely proportional to tank level

    Lower tank level -> higher pump speed

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

Runnable simulator field guide

Chemical-dosing PLC scenario: test checklist

Direct answer

The learner can separate recipe demand from equipment permission, command and measured result, stop on missing evidence and recover without silently repeating a dose.

Written for process-control learners programming a dosing pump, valves, tank conditions and measured addition under a declared safe training recipe.

a guarded water-based process training skid used to test dosing, heating, flushing, valve, pump and instrument sequence evidence while studying bounded dosing sequence, permissives, measurement and recovery
System map / 02

NODE 01observable

Scenario setup

Training recipe, source and destination identity, level permissives, route, pump or valve capacity, requested quantity, flow or weight evidence, timeout, hold, abort and restart policy.

NODE 02observable

I/O and state map

Batch request through route confirmation, dosing output, measured transfer, totalized amount, stop command, residual motion, completion record and next state.

NODE 03observable

Normal run

One declared dose starts only with valid permissives and stops once at the target with coherent equipment feedback.

NODE 04observable

Boundary run

Empty source, full destination, no flow, leaking valve, pump trip, noisy measurement, overshoot, pause, abort, controller restart and power return.

NODE 05observable

Injected fault

A recipe, permissive, route, command, pump, valve, instrument, totalizer, timeout, completion or restart mismatch.

NODE 06observable

Target check

The production design reviewed against current process, chemical, equipment, environmental and safety requirements and validated on target.

Answer surface / 07

What should a PLC chemical-dosing sequence prove?

It should prove the correct source, destination and route, confirm equipment response, measure the addition, stop at the bounded target and retain fault and completion evidence.

How should a dosing sequence recover after interruption?

Preserve how much was delivered, establish the physical state and require a deliberate rule for resume, abort or manual disposition instead of starting the dose again.

Real plc chemical dosing control footage

See this exact skill in the working simulator.

Watch the real browser product respond to the task on this page, then try the same practical workflow yourself. No slides, concept mockups, install, or credit card.

Try this in the browser
PLC Chemical Dosing — Proportional Control and Alarms