Case study · public demo

From a 35-requirement spec to a FAT report — three bugs caught on the way

BPS-1 is a small but complete plant built to show TAIPilot end to end: specification, PLC program, virtual commissioning with a plant model, acceptance tests in PLCSIM and a FAT report with trajectory charts and requirements traceability.

S7-PLCSIM Advanced Plant model Requirements traceability FAT report
35
requirements, each linked to a test
23
test runs at 25× real time
3
defects found in v1.0
4.5
minutes for the whole run

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.

tia_requirements

Spec → requirements

The control specification is read into 35 numbered requirements with ids such as BPS-5.1-R01.

tia_create_project · tia_import_program · tia_compile

Project and program

TAIPilot creates the TIA Portal project, imports the PLC sources and the tag table, and compiles.

tia_plant_model · tia_download

Virtual commissioning

The plant model is checked on its own, then the program goes to S7-PLCSIM Advanced with the model attached.

tia_test_suite

Acceptance tests

22 tests (23 runs) at 25× real time, each linked directly to requirements; 8 signals recorded as trajectories.

tia_changes

Fix and re-test

Three blocks are fixed; the change set shows the diff and could be rolled back. The suite runs again.

FAT report

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:

BlockDefectCaught by
FB_TankLevelThe dry-run lock is released at the low-low level instead of low-low + hysteresis: the pumps restart at 10 % and cycle.T08
FB_DutyStandbyFailover typo: when duty pump P-101 fails, duty goes to P-101 again instead of P-102.T19
FC_SelectDutyComparison 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:

v1.0 — FAIL: at 10 % the pump restarts at once and keeps running at the dry-run limit.
v1.0 — FAIL: at 10 % the pump restarts at once and keeps running at the dry-run limit.
v1.1 — PASS: the pump stops at 10 %, the alarm lamp latches, and the station restarts only when the tank is back above 20 %.
v1.1 — PASS: the pump stops at 10 %, the alarm lamp latches, and the station restarts only when the tank is back above 20 %.

Results

RoundPASSFAILOtherVerdict
v1.0 — first FAT round1741 XFAIL · 1 N/ANOT PASSED
v1.1 — after the fix2101 XFAIL · 1 N/APASSED 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