Phase Template: tank-ph-adjust¶
Measure pH and selectively dose acid or base in a single pass to
reach a target range. Use this phase for straightforward pH trims
where a single dose is expected to land within tolerance, e.g. a
known buffer addition or a small in-range correction. It reads
ph_sensor.PV, decides whether to dose acid (via wfi_valve) or base
(via inlet_valve), runs the dose for a configured time, and
verifies the final pH and conductivity.
For multi-dose correction with feedback between doses, use tank-iterative-dose instead.
Where to find it¶
System endpoint → Equipment Library → Phases → select tank-ph-adjust.
graph TD
Start([initial]) --> RP[read_ph]
RP --> SC{safety_check}
SC -->|"pH safe — pass through"| EV{evaluate}
SC -.->|"pH extreme<br/>COMMAND('Hold')"| SC2[held for review]
EV -->|"pH > target + tol<br/>priority 0"| DA[dose_acid]
EV -->|"pH < target - tol<br/>priority 1"| DB[dose_base]
EV -->|"pH in range<br/>priority 2"| IR[ph_in_range]
DA -->|"wfi.FB"| AH[acid_hold]
AH -->|"T >= dose_time"| AC[acid_close]
DB -->|"inlet.FB"| BH[base_hold]
BH -->|"T >= dose_time"| BC[base_close]
AC --> SE[settle]
BC --> SE
IR --> SE
SE -->|"T >= 10s"| VE[verify]
VE -->|"operator ack AND<br/>pH in tolerance AND<br/>conductivity OK"| CP[complete]
CP --> Done([done])
style SC2 fill:#ffe0b2,stroke:#e65100,stroke-width:2px,color:#000
See Phases for the diagram conventions.
What you see when it runs¶
| Element | Meaning |
|---|---|
| Active step | Which branch fired — dose_acid, dose_base, or ph_in_range |
| Shared variables | initial_ph, final_pH, and final_conductivity captured in the step actions |
| Prompt | The phase parks on verify until the operator acknowledges the final pH reading |
HMI screenshot pending
An annotated capture of a running tank-ph-adjust phase on the
verify prompt will be added here.
Parameters¶
| Parameter | Type | Unit | Range | Default | Required |
|---|---|---|---|---|---|
target_ph |
REAL | pH | 2.0-12.0 | — | yes |
ph_tolerance |
REAL | pH | 0.1-2.0 | 0.5 |
no |
dose_time |
TIME | — | 5s-2m |
— | yes |
agitator_speed |
REAL | % | 20-100 | 50 |
no |
max_conductivity |
REAL | µS/cm | 100-1500 | 500 |
no |
safety_ph_limit |
REAL | pH | 1.0-5.0 | 3.0 |
no |
TIME parameters take duration strings ("45s", "1m30s", "5m"),
not bare numbers.
Required control modules¶
| Role | Module type | Description |
|---|---|---|
ph_sensor |
analog-sensor | Tank pH measurement |
conductivity_sensor |
analog-sensor | Tank conductivity measurement |
wfi_valve |
discrete-valve | WFI/acid addition valve (on/off) |
inlet_valve |
discrete-valve | Base addition valve (on/off) |
agitator |
analog-control | Tank agitator for mixing reagents |
Capability: mixing.
How it works¶
Each scan the SFC engine:
read_phcapturesinitial_phand starts the agitator.safety_checkevaluates whether the initial pH is outside the safety envelope (initial_ph < safety_ph_limitor> 14 - safety_ph_limit). If so, the step self-issuesCOMMAND('Hold'). The phase parks in the ISA-88 Held state and an operator must investigate beforeRestart.evaluatediverges three ways by priority:priority 0(acid path) ifpH > target_ph + ph_tolerancepriority 1(base path) ifpH < target_ph - ph_tolerancepriority 2(in-range pass-through) if the pH is within tolerance already
- The active dose branch opens its valve, waits for feedback, holds
for
dose_time, and closes. - All three branches converge on
settle, a fixed 10-second hold for mixing. verifyreads the final pH and conductivity and parks on aPROMPT(). The exit guard is a four-way AND: operator ack non-empty, final pH within tolerance (high and low), and conductivity withinmax_conductivity.
This is a PV-endpoint phase. The termination condition is a
process measurement. If the sensor fails, the phase hangs. Pair with
hardware-limit alarms on pH at the safe-handling boundaries and a
timeoutSeconds backstop. See
Phases § PV-endpoint phase.
Used in recipes¶
Try it¶
- HMI endpoint → Batch Execution → + New →
sim-ph-adjust-m1→ Start - Expand the procedural tree until the pH-adjust phase is active on
mix-tank-1 - Watch which branch fires based on the simulated initial pH
- When the phase parks on
verify, respond to the prompt to complete the phase - Open Data endpoint → Trends to chart
ph_sensor.PVandconductivity_sensor.PVthrough the dose and settle