Products PlcGit, the working and goals
PlcGit has multiple functionalities
- PLC program backup and restore
- Check and merge differences between versions of the PLC software
- Manage PLC program code in a distributed development team
The following description is an example for the Siemens S7 1500 PLC series using the Siemene TIA Portal PLC programming software
PLC 程序的备份与恢复
在第一次运行时,需要定义一个仓库。通常这只是仓库的名称。
然后,在初始设置中,需要一个 TIA 项目。该项目定义一个或多个 PLC 的程序。
一个仓库可以管理多个 TIA 项目。
每个 PLC 都通过其名称和 TCP/IP 地址来定义。
初始设置会读取 TIA 项目,并提供带有 IP 地址的 PLC 列表。
可以选择一个或多个 PLC 来启用备份和恢复功能。
然后可以定义备份的时间和频率。通常是每天晚上执行一次。
TIA 项目会被读取、解码,所有程序部分都会以可读的形式发送到仓库中。
此外,TIA 项目会因安全原因被登记存档。
现在,每天夜里都会检查实际的 PLC 是否有更改。 如果检测到更改,相关的元素将从 PLC 中读取并发送到仓库。 这称为标签(tag),通过时间戳和执行更改的人员来标识。
如果某些更改(通常在周末进行)可能在周一或之后干扰生产,维护人员会检查最近几天的可用备份列表。 这是通过浏览器完成的。 通常,班组管理人员知道最后一次稳定生产的日期。因此,他们会选择例如上周二的版本。 然后启动恢复功能。它会获取现有的 TIA 项目,读取 PLC 中的所有更改,复制 TIA 项目, 并更新至周二之前的更改。完成后,该项目会下载到一台安装了 TIA Portal 的机器上 —— 通常是维护人员的电脑。 然后启动 TIA,加载已下载的项目,再更新并重启受影响的 PLC。 机器将像周二一样运行。
有关备份和恢复的一些细节。
如果在夜间无法执行备份,通常是因为 PLC 不可用,则会生成一个报警。
该报警会被写入日志记录站点。在这种情况下,还可以配置发送电子邮件通知。
那么这晚将无法进行备份。
在恢复过程中,会执行 TIA 项目与 PLC 一致性的检查。 如果 PLC 的硬件配置不同,恢复通常将无法正常工作。
在夜间备份中也会进行检查,如果 PLC 硬件配置不同,将会发送警告。
通常情况下,如果更改了 PLC 硬件配置,就需要重新登记一个新的 TIA 项目。
Check Differences Between PLC Program Versions and Merge
After an emergency restore or for other reasons the maintenance personnel can check for changes between different detected changes or against the
original TIA project content. This is also done in a browser.
So the repository is chosen from the list, then a PLC. The view is similar to the TIA Portal with a list of the PLC blocks. Changed blocks are marked.
Then a (changed) block will be chosen. The block content will be displayed in the browser similar to TIA Portal as KOP/FUP/SCL/Graph.
The block is shown twice, one and the other block. Detected changes are marked visibly.
PLC program code is programmed in rungs, one rung only is shown. Changed rungs are marked in the list of rungs.
Merging means that the user can now take complete blocks from one version to another, or complete rungs.
Or in a rung, individual elements or element groups can be used for merging.
Testing this is done as in restores: Generate TIA project, download the project, open TIA, load the project in TIA, and afterwards into the PLC.
Manage PLC Program Code in Distributed Software Development Teams
For software development, normally no PLC exists. Multiple persons in the team are working on different parts of the PLC software.
The PLC block selections and merge functions are needed only.
In this case multiple TIA projects can exist. They can be checked into a repository.
For combining the code the blocks can be chosen and merged into one resulting TIA project.
This can generate various merge conflicts. Such elements are marked. Then some manual work can solve the issues such as
renaming some variables or blocks, or renumbering blocks. Typically the structures used in the distributed development team are different.
A possible solution is the creation of a new structure in the merge containing all of the variables from the team members.
But other solutions are possible also.
Different TIA versions in the team are mostly no problem. The merge from lower to higher TIA versions will always work.
Stepping down can be possible if the affected PLC blocks do not use special functionality the older TIA cannot handle.
The only thing which cannot be merged is hardware configurations. They are always incompatible.