The plant
A break tank T-101 (8 m³) is filled from the mains through valve XV-101; two speed-controlled pumps P-101 and P-102 keep the consumer header at 4 bar. Easy to understand, yet it has every pattern a FAT needs: PI pressure control, hysteresis, timers, latched alarms with acknowledge, emergency stop, operating modes, setpoint sets, duty/standby/assist with failover and sensor faults.
The PLC program (SCL) has 3 UDTs, 4 global DBs, 3 FCs, 6 FBs and OB1. The plant model — tank mass balance, valve travel and limit switches, pump drives with feedback delay, pump curves and header pressure — answers the PLC in PLCSIM, so the program is tested against something that behaves like the real station.
How it ran
One script drives TAIPilot's MCP tools; with Claude, the same steps are a handful of prompts.
Spec → requirements
The control specification is read into 35 numbered requirements with ids such as BPS-5.1-R01.
Project and program
TAIPilot creates the TIA Portal project, imports the PLC sources and the tag table, and compiles.
Virtual commissioning
The plant model is checked on its own, then the program goes to S7-PLCSIM Advanced with the model attached.
Acceptance tests
22 tests (23 runs) at 25× real time, each linked directly to requirements; 8 signals recorded as trajectories.
Fix and re-test
Three blocks are fixed; the change set shows the diff and could be rolled back. The suite runs again.
Report
HTML and Excel report with the verdict, the traceability matrix and a trajectory chart for every test.
What the tests caught in v1.0
Version 1.0 of the program contained three realistic defects. The suite found all three:
| Block | Defect | Caught by |
|---|---|---|
| FB_TankLevel | The dry-run lock is released at the low-low level instead of low-low + hysteresis: the pumps restart at 10 % and cycle. | T08 |
| FB_DutyStandby | Failover typo: when duty pump P-101 fails, duty goes to P-101 again instead of P-102. | T19 |
| FC_SelectDuty | Comparison inverted: the pump with the higher run hours becomes duty. | T16 (both matrix cases) |
Seeing the bug
Every test in the report has a chart of the recorded signals. Test T08, dry-run protection:
Results
| Round | PASS | FAIL | Other | Verdict |
|---|---|---|---|---|
| v1.0 — first FAT round | 17 | 4 | 1 XFAIL · 1 N/A | NOT PASSED |
| v1.1 — after the fix | 21 | 0 | 1 XFAIL · 1 N/A | PASSED WITH KNOWN DEVIATIONS |
The live run on S7-PLCSIM Advanced V8 matched the expected results test by test. T12 is a deliberate known deviation: the spec itself asks for a 10 s assist delay, so the pressure dips after a large consumption step; the report shows it as a known deviation instead of failing the FAT. The whole run — hidden TIA start, project, two compile/download rounds, two suite runs, cleanup — took 4.5 minutes.
Run it yourself
The demo package — specification, PLC sources, plant model, test suite, run script and the expected reports with charts — is free to download. Running it needs TIA Portal V21, S7-PLCSIM Advanced and a TAIPilot Pro license or the 72-hour demo trial.
Another, anonymised project from practice: cold-storage controller vs. its 5,000-line manual