Designing a Maintainable PLC System
Well, you’ve finally set up the PLC. The commissioning is done after a grueling 8-hour shift. Tomorrow, you think you’re just going to touch up the system. After 3 weeks, you get a call from the site: “Machine’s down, get here now!”
You only now realise — you’ve been called to commission other systems before implementing any documentation, comments, or testing edge cases.
You’re always going to be under pressure when designing and implementing PLC systems, especially during breakdowns. The company is losing thousands of rands per hour due to downtime. They need, and I mean it, need you to solve this NOW!
This typically leads to you building PLC systems that are “good enough” — they just need to work now. After the problem is solved, it’s solved.
Unfortunately, this leads to slip-ups, bugs, unmaintainable architecture, and most importantly, wasted time that could have been spent designing and implementing better features or systems. Now you’re stuck maintaining code that you can’t read, that doesn’t make sense, and often represents a cobbled-together system — not the actual representation of how the system works.
Factors Affecting Maintenance Costs
According to a 2020 study on software maintenance cost factors, maintenance activities account for a significant portion of software lifecycle effort and cost.
The main technical factors that affect the cost are:
- Software Complexity: The need to understand and extend software. In the case of PLCs, the harder it is to read and understand the code, the harder it is to extend and fix bugs. This adds costs.
- Developed Human Capacity: The expertise of a specific engineer, their experience in having solved multiple problems, and their understanding of the problem domain make it easier to maintain systems. In PLCs, competent engineers can more quickly perform troubleshooting and resolve use cases. This makes placing unskilled engineers in more difficult projects take longer to maintain, adding costs.
- Document Quality: Outlining system and maintenance documentation allows maintainers and extenders to easily add or fix bugs, reducing costs. In PLCs, a lack of documentation adds to software complexity and the need to understand the system from first principles, leading to engineers taking longer to troubleshoot the system and to fix the intended bugs, adding maintenance costs.
- Modern Programming Specifications: Good programming practices that aim at building modular systems, correct naming conventions, and documentation all affect the maintenance cost. Often in PLC systems, the system was written 5+ years ago. A lack of documentation, best practices, and creating coupled (dependent) components and subsystems make it harder to understand, extend, and troubleshoot – increasing costs.
Building Maintainable PLC Systems
To build maintainable PLC systems, you should aim to:
- Use clear and consistent naming conventions: Inputs, outputs, alarms, timers, and internal states should be named predictably and descriptively. This makes troubleshooting significantly easier during downtime situations.
- Keep logic modular and structured: Group related functionality together and avoid tightly coupling unrelated systems. A conveyor fault should not unexpectedly affect unrelated machine states.
- Document changes properly: Electrical drawings, PLC backups, I/O lists, and network configurations should always reflect the actual running system. Outdated documentation can make troubleshooting far more difficult than the fault itself.
- Write logic that reflects the physical process: PLC code should mirror how the machine actually operates. Engineers and technicians should be able to follow the sequence of operation logically.
- Avoid “temporary” fixes becoming permanent: Quick fixes made during breakdowns should later be reviewed and properly integrated into the system architecture.
- Implement diagnostics and alarming properly: Good fault messages and diagnostic bits reduce troubleshooting time and make failures easier to isolate.
- Test edge cases before deployment: Systems should not only work under ideal conditions, but also during sensor faults, communication loss, startup conditions, and unexpected operator actions.
Summary
Maintainable PLC systems are not built by accident. They come from engineers taking the time to structure logic properly, document systems, follow consistent standards, and think beyond just getting the machine running.
During breakdowns and commissioning, there will always be pressure to implement quick fixes and “good enough” solutions. Unfortunately, those shortcuts often become long-term maintenance problems that cost far more time and money later on.
A maintainable PLC system should not only work today, but it should still be understandable, extendable, and troubleshootable years later by another engineer standing on site during downtime.