Having someone extend an existing PLC program is often more demanding than new development. The plant is running, production depends on it, and the program frequently comes from someone who is no longer available – a former employee, a machine builder that no longer exists or a service provider who was last on site years ago. Even so, a new station has to be added, a product introduced or a fault fixed.

This guide describes the typical starting situations, which documents and access are needed, how an assessment of the existing program works and how changes are backed up, tested and documented. Finally, it addresses the question of when an extension is enough and when migrating to a current platform is the better route.

Typical starting situations

Anyone taking over an existing program rarely finds ideal conditions. The starting situation determines the effort and should therefore be discussed openly before any quote. Often several of the following points apply at the same time.

  • Program without documentation: the project is available, but comments, symbols or a functional description are missing or outdated.
  • Third-party program: the program comes from the machine builder or another service provider and follows their structure and conventions; some blocks may be protected.
  • Only an upload from the controller: there is no project in the office, only the version in the running controller – with or without symbols and comments, depending on the platform.
  • Legacy controller: hardware and programming software have been discontinued, spare parts are getting scarce, and the matching development environment only runs on old computers.
  • Several versions: there are various backups, and nobody knows for certain which one matches the controller.

Which documents and access are needed

The more documents are available up front, the shorter the analysis. The list is rarely complete – what matters is being open about what is missing. With older plants, missing documents are the rule rather than the exception and can be planned for.

Usage rights and know-how protection are a sensitive point. Protected blocks indicate that their author has not released them for editing. Whether and how they may be opened or replaced should be clarified with the author or based on your contracts before anyone works on them – if in doubt, with your legal counsel. A reputable service provider does not simply bypass protection.

  • The control project in its latest known version, stating platform, programming software and version
  • Wiring diagrams, I/O list and hardware configuration
  • Documents for drives, operator panels and fieldbus devices, including their parameters
  • Operating manual and, if available, functional description
  • Knowledge of changes made since the last backup
  • Passwords for protected blocks or projects, and clarification of whether you may use them
  • Access to the controller: network port, IP address, IT approvals and, where applicable, an agreed remote connection

Assessment: understand before you change

Before the first change comes an assessment of the existing program. The aim is not to document the entire program in detail but to understand the parts affected by the extension and to know their dependencies. This includes understanding the structure and conventions of the program: how are operating modes, step sequences and faults implemented? Where are outputs written? Which data do the program parts exchange with each other and with other systems?

An important step is comparing the project with the controller. If a project exists in the office, it should be compared online with the running controller. Differences are not unusual, for example due to changes made during a service visit that never made it back into the project. Only once it is clear which version is actually running is there a reliable basis for changes.

The results are recorded: program structure, affected blocks, interfaces, anomalies and open questions. This document later becomes part of the documentation – and is often the first usable description of the program that has ever existed.

Back up before every change

Before anything is changed, a complete backup is made: control program, hardware configuration, data and parameter areas, recipes, the operator panel projects and the parameters of drives and field devices, insofar as they are not part of the control project. The backup is labeled with date and version and stored so that it can be restored without the service provider’s computer.

Just as important is the question of how to get back. Can the old version be restored quickly in an emergency? Would that overwrite current process data or counter values? A prepared way back takes pressure out of the changeover – for small extensions as much as for major conversions.

  • Program, hardware configuration and data areas of the controller
  • Operator panel projects and recipes
  • Parameters of drives, gateways and other field devices
  • Labeling with date, version and reason
  • A verified way back to the previous version

Planning and testing changes

An extension should follow the existing program, even if you would have structured it differently yourself. A program written in two styles is harder for maintenance to understand than one in a consistent, if not ideal, style. New functions are therefore implemented in separate, clearly named blocks wherever possible and connected to the existing code at a few traceable points.

Testing works in two directions: does the new part work as intended, and does the old part still work as before? The second part is often underestimated. A list of existing functions that could be affected by the change helps, followed by targeted testing of exactly these functions after the download. Whatever can be checked in a simulation beforehand is checked in the office; the rest follows at the plant.

Loading the change requires an agreed time slot. Some changes can be loaded during operation, others require the controller to be stopped. Which option is possible and sensible depends on the platform, the type of change and the process, and should be discussed beforehand. You can find more about the procedure at the plant in our guide to PLC commissioning.

Documentation after the change

After the extension, the documentation has to describe the new state – and ideally be better than before. This includes the current project with comments, a description of the change, updated diagrams and I/O lists as well as updated alarm texts and operating instructions. A change log in the program or in version control shows future engineers what was changed, when and why.

A clear handover is important: which version is now running on the controller, where is it stored, and who has access to it? If these questions can still be answered in five years, the next extension will be much easier. If you look after many similar machines, our guide to machine software customization explains how to keep program versions and variants in order over the long term.

Extend or migrate?

Not every legacy controller has to be replaced, and not every one can sensibly be extended further. An extension makes sense if the hardware is still available and supportable, the program is basically understandable and the change remains manageable. A migration makes sense if spare parts are becoming scarce, the programming software only runs on outdated computers, the controller is reaching its performance limits or major changes are coming up anyway.

An intermediate route is often sensible: the pending extension is still implemented on the existing platform, while the migration is prepared in parallel, for example for the next planned shutdown. In both cases, the same assessment comes first. For a migration, for example from S5 or STEP 7 to a current platform, it is the basis for ensuring that nothing that works today is lost during the conversion.

  • Availability of spare parts and programming software
  • Understandability and condition of the existing program
  • Scope of the planned changes, now and in the foreseeable future
  • Performance reserves of the controller
  • Available downtime windows for a conversion
FAQ

Good to know.

In many cases yes, but it takes more analysis time. Before the change, the affected program parts are traced and documented. If the project is missing entirely, an upload from the running controller is often still possible – although, depending on the platform, without comments.

Protected blocks are only edited if you have the authorization and credentials to do so. If not, a block can often continue to be used unchanged or – once the rights have been clarified – replaced by a new implementation.

That depends on the platform, the type of change and the process. Some changes can be loaded during operation, others require a stop. In any case, an agreed time slot, a complete backup and a prepared way back are part of it.

Yes. We extend, rebuild or migrate older control systems, including on TwinCAT 2 and 3, S5, STEP 7 and TIA Portal, CODESYS 2 and 3 and Studio 5000. We document the existing state first so that nothing that works today gets lost.
Next step

Extending an existing control system?

Send us what you have on the plant – project, diagrams, photos, even if the documents are incomplete. We usually get back to you within one business day and tell you which information is still missing.