Software

PlcGit Produkte, Arbeitsweise und Ziele

PlcGit bietet mehrere Funktionen

Die folgende Beschreibung ist ein Beispiel einem Siemens S7 1500 Modell. Programmiert wurde mit dem Siemens TIA Portal.

SPS Programm Sicherung und Zurückspielen

On the first run, a repository must be defined, usually by choosing a repository name. For the initial setup, a TIA project is required. This project defines the PLC program for one or multiple PLCs, and a single repository can handle multiple TIA projects.
Each PLC is defined with its name and TCP/IP address. During setup, PLCGit reads the TIA project and displays a list of PLCs with their IP addresses. One or more PLCs can then be selected for backup and restore. The backup time and backup rate can be configured — typically once per day at night.
Internally, the TIA project is read, decoded, and all program parts are stored in the repository in a human‑readable form. Additionally, the TIA project is checked in for security reasons.

Every night, the real PLC is checked for changes. If modifications are detected, the affected elements are read from the PLC and stored in the repository. This creates a tag, identified by the timestamp and the user who made the change.

If changes — often made over a weekend — impact production on any day, maintenance personnel review the recent backups in the browser. Shift management usually knows the last stable production state to select.
The restore process then begins:
PLCGit takes the existing TIA project, reads all PLC changes, copies the project, and updates it with the changes up to Tuesday. When finished, it is downloaded to a machine with TIA Portal installed, typically used by maintenance staff. TIA is started, the project is loaded, and the affected PLC is updated and restarted. The machine will run exactly as it did on Tuesday.

Some details about backup and restore. If a nightly backup cannot be performed — usually because the PLC is unavailable — an alarm is generated and written to the logging system. Email notifications can be configured. No backup is created that night.
During restore, PLCGit performs consistency checks between the TIA project and the PLC. If the PLC hardware configuration differs, the restore may fail. This is also checked during nightly backups, and a warning is issued if differences are detected. Normally, when PLC hardware changes, a new TIA project must be checked in.

Unterschiede zwischen den SPS-Programmversionen prüfen und zusammenführen

After an emergency restore — or for other reasons — maintenance personnel can check differences between detected versions or against the original TIA project. This is done in the browser.
The repository is selected from the list, then the PLC. A TIA‑like block view is shown, and changed blocks are marked. A changed block is selected, and its content is displayed in the browser in KOP/FUP/SCL/Graph, similar to TIA Portal. The block is shown twice, with both versions side by side, and detected changes are visibly highlighted. PLC program code is structured in rungs, and one rung is shown at a time. Changed rungs are marked in the rung list.

Merging allows the user to transfer complete blocks from one version to another, or merge entire rungs. Within a rung, individual elements or element groups can also be selected for merging.
Validation works the same way as a restore: Generate a TIA project, download it, open TIA Portal, load the project, and then load it into the PLC.

Verwalten Sie den SPS Programmcode in einem verteilten EntwicklungsteamVerwaltung von SPS-Programmcode in verteilten Softwareentwicklungsteams

Bei der Softwareentwicklung gibt es in der Regel keine SPS. Mehrere Personen im Team arbeiten an verschiedenen Teilen der SPS-Software. Es werden lediglich die SPS-Blockauswahl und die Zusammenführungsfunktionen benötigt.
In diesem Fall können mehrere TIA-Projekte vorhanden sein. Diese können in ein Repository eingecheckt werden. Um den Code zusammenzuführen, können die Blöcke ausgewählt und zu einem resultierenden TIA-Projekt zusammengeführt werden. Dies kann zu verschiedenen Zusammenführungskonflikten führen. Solche Elemente werden markiert. Anschließend können die Probleme durch manuelle Eingriffe gelöst werden, beispielsweise durch die Umbenennung einiger Variablen oder Blöcke oder die Neunummerierung von Blöcken. In der Regel unterscheiden sich die im verteilten Entwicklungsteam verwendeten Strukturen. Eine mögliche Lösung ist die Erstellung einer neuen Struktur in der Zusammenführung, die alle Variablen der Teammitglieder enthält. Es sind jedoch auch andere Lösungen möglich.
Unterschiedliche TIA-Versionen im Team stellen meist kein Problem dar. Die Zusammenführung von niedrigeren zu höheren TIA-Versionen funktioniert immer. Ein Downgrade ist möglich, wenn die betroffenen SPS-Blöcke keine speziellen Funktionen nutzen, die die ältere TIA nicht verarbeiten kann.
Das Einzige, was nicht zusammengeführt werden kann, sind Hardwarekonfigurationen. Diese sind