Floppy disk to modern C++: PLC code rewrite for a bottling line.
Automation — Bottling Plant
Pascal → C++ · State Machine Reconstruction · Dynamic Analysis
# The starting point:
"Code is on a floppy disk."
"The developer retired 10 years ago."
"The IDE only runs on Windows 98."
# Documentation: none. New system quote: €338,000
Our Approach: Behavior over Code
We didn't try to read the Pascal code directly — we observed what the system does. With oscilloscope and logic analyzer we connected to all relevant signal lines: digital I/O, serial interfaces, analog signals.
Over 5 days we reconstructed the complete state machine: 12 operating states and 34 transition conditions — including 7 safety conditions that were completely undocumented but active.
⚠️ Critical Finding: Undocumented Safety Logic
7 safety conditions were completely undocumented but active and essential. A rewrite without dynamic analysis would have lost this logic — potentially creating dangerous situations. This finding alone justified our approach.
Result: Modern C++ with Full Documentation
With the complete state machine documented, we rewrote the code in modern C++ for an industrial PC. The new system is fully documented, testable, and maintainable — a stark contrast to the original 2001 code.
Kosteneinsparung
Direktvergleich
New bottling line
€338,000
Solvetronix
€118,000
Sie sparen
€220,000
Einsparung
65%
ROI typisch: < 8 months