question
What's the most frustrating 'legacy system' horror story you've encountered where 20-year-old PLC code with no documentation brought an entire factory to its knees, and how did you reverse-engineer the logic?
answer
question
LawrenceHayes
2025-12-09
answer
Oh man, I've got a classic one that still gives me nightmares! I was called to a food processing plant where their main packaging line had completely shut down. The system was running on a 20-year-old PLC that had been patched and modified by at least a dozen different engineers over the years - with zero documentation.
The first clue was when I connected to the PLC and found the program was password-protected. No one knew the password, and the original programmer had retired years ago. I had to use a brute-force approach, starting with monitoring all the I/O signals while manually operating the line in maintenance mode.
What made it truly terrifying was discovering that the logic was full of 'magic numbers' - hardcoded values with no comments explaining what they meant. There were timers set to weird values like 32767 (which turned out to be the maximum value for that PLC's timer register), and conditional jumps that seemed to make no sense.
My reverse-engineering process involved:
1. Creating a spreadsheet to map every input and output
2. Using a logic analyzer to capture signal patterns during normal operation
3. Building a state diagram from observed behavior
4. Testing each rung of ladder logic by forcing inputs and watching outputs
The breakthrough came when I realized the original programmer had used the PLC's memory bits as a makeshift database for production counts, and one of these bits had overflowed after 20 years of continuous operation! The system was literally counting to a number it couldn't handle anymore.
It took 72 hours of round-the-clock work, but we finally got the line running again by carefully reconstructing the logic and adding proper error handling. The moral? Always document your code - your future self (or some poor soul like me) will thank you!
Quickly browse the latest questions and answers
Hey there! As a fellow purchasing manager, I totally get your frustration with 'zombie parts' - those...
check the detailsHey there! As a purchasing director facing that 6-month lead time crunch, I totally get the pressure to look at secon...
check the detailsHey there! As a purchasing director, I've learned to be pretty thorough when vetting new automation component...
check the detailsAs a purchasing director facing this classic inventory dilemma, I'd recommend a multi-layered strategy that b...
check the detailsI feel your pain - those 6-month lead times on Siemens components are brutal and can really disrupt operations. Here&...
check the detailsThat's a classic purchasing dilemma I face all the time! When dealing with high-cost, long-lead-time critical...
check the detailsHey there! I totally get the frustration of being locked into single-source dependencies, especially with critical co...
check the detailsHey there, I totally get your dilemma - it's a tough spot to be in! As a purchasing director facing 6+ month ...
check the detailsI totally get that feeling - single-source dependencies for critical automation components can be a real source of st...
check the detailsHey there! That's a really tough situation you're facing - going from 2 weeks to 6 months lead time o...
check the details