Siemens Step7 TIA Portal
Last updated
Last updated
Copia provides support for Siemens Step7 TIA Portal v14.1 sp1 - v19, with advanced feature support for the following:
Siemens Step7 TIA Portal v14 sp1 & v15.0 have been discontinued. Due to this, Copia may be limited in its ability to support these versions going forward. Feature development for v15.1 and later is ongoing.
To get set up, Copia will need your project data (in Folder or Archive format), as well as the add-on's or GSD files used in the project.
If your project uses mutually exclusive add-on's (such as including components from both WinCC Pro and WinCC Unified), Copia will not be able to provide advanced functions. This is due to limitations related to the Openness API.
If your project contains add-on's or GSD files, they will initially need to be installed on the Copia server to provide a graphical display of the project and differences. Copia will alert you about this during your initial commit, and provide instructions for pushing your data and authorizing access to the project to install the required add-on's and GSD files to our servers.
While Copia manages TIA Portal files in archive form, we give users the option of saving the unarchived project or global library folders in the repository. This opens doors to two storage possibilities:
Storing the Project or Global Library Folder
Copia allows the user to store a project or global library folder into the repository. We will auto-archive the project or library for the user, making for a more streamlined and user-friendly workflow.
Storing the Project or Global Library Archive File
Users can manually create and store their own project or library archive files in Copia. It will be required to manually create and extract the archives as needed.
Neither of these workflows affect the use of the Version Control Interface (VCI) in Step7 TIA Portal with Copia. If you are using the VCI, it will still require a manual export of the XML files into the repository.
When the Auto-Archive feature is enabled, Copia allows users to store a project folder or a global library folder into the repository. This will automatically archive the project or global library for the user.
Auto-archive will create a .zap##
file based on the folder name. See the Auto-Archive section below for more information about this feature and instructions for its setup.
All project or library contents must be placed inside a folder (directory), which is REQUIRED to be named the same as the S7 TIA Portal project (i.e. matching the .ap##
filename).
Adding the contents of a project or global library folder (the .ap##
or .al##
file and respective subfolders) at the repository root is not supported.
Users can also manually generate and place their project or global library archives into Copia. It will be necessary to manually create and extract the archive files when working with the project.
To generate a project archive file, navigate to the Project dropdown and click the Archive button.
Save your .zap##
file to your repository to store it in the Copia system. You can either create an archive and drop it into the repository folder using Windows, or you can save it directly into the target path. Click the Archive button to continue.
To reduce file size, you can check the Archive as Compressed File and Discard Restorable Data options. The date and time are not necessary in the file name.
If you have already saved an archive to your repository, you may get a warning about overwriting the file. Git saves every commit in the repository's history, so as long as you commit your changes it is safe to overwrite by selecting Yes in the screen below:
Copia provides support the the Anonymous user authentication feature for Siemens Step7 TIA Portal V17-V19. If a project is configured with anonymous user support, Copia will utilize this authentication for read access to the project for advanced features.
The anonymous user must be defined with a role that has at least read access rights, for this feature to work as expected.
Auto-Archive allows users to store project folders and global libraries within a repository in the original .ap##
or .al##
file format. Prior to committing, Copia will automatically archive the data into the corresponding .zap##
or .zal##
format respectively. This not only saves storage space and transfer times, but also allows a single file to be selected in the Copia client, which provides all display and difference details.
Auto-archive will create a .zap##
file based on the folder name, and not the .ap## file name. As such, Copia recommends the project folder be named the same as the project for consistency.
To enable this feature in the Desktop App, click on the Options button under the File dropdown. Choose the Advanced section and check the Enable Auto-Archiving feature. Press the Save button to exit.
With Auto-Archive enabled, any project or global library folder added to a local repository will be auto-archived when the Desktop App is in a focus state (when it becomes the primary app open on the screen).
It is critical that your project folder is stored in the repository. To review this step, check out the Project or Global Library Folder section above.
Renaming and Deleting a Project
To rename a project, use the Save As function in TIA Portal to save as another project in the repository. Then, delete the old project directory.
When a project directory is deleted, the associated archived zap file will also be deleted from the repository.
There are a few things to understand when using Auto-Archive:
When saving a project or library folder (which contains the .ap##
or .al##
file and subfolders) in a repository, Copia will automatically archive the project and store the .zap##
or .zal##
file. As a result, when either the Web App or Desktop App is selected, you will only see the resulting .zap##
or .zal##
file.
The files outputted from Auto Archive are hidden from the Windows File Explorer by default to reduce confusion. If Windows is set to display hidden files, you will see these files appear in your repository folder.
Cloning, pulling, or creating and switching branches will automatically extract the contents of the archive files in the repository.
When utilizing Auto Archive, you might see a warning that the Step7 TIA Portal project needs to be closed. This occurs when the project is open and you're attempting to do one of the following:
Switching branches
Pulling from a remote repository (app.copia.io)
Committing after adding or upgrading a new TIA project or library
Subsequent commits can take place with the software open
When the exported project file is selected in the Web App or Desktop App, Copia displays the project tree structure in a way that's familiar to users of the Siemens IDE. This way, you can easily navigate to a project item or identify differences.
The following types are currently supported for graphical or enhanced viewing:
Copia is currently unable to render Password Protected projects, Know-How Protected blocks, F-type System Blocks and Device Proxies
OB, FB, and FC Blocks are supported in the following languages:
Ladder (LAD and F-LAD)
Structured Control Language (SCL)
This corresponds to the Structured Text (ST) language defined in the standard IEC 61131-3.
Statement List (STL)
Function Block Diagram (FBD and F-FBD)
Project Libraries
Global Libraries (v15.1 or later, only)
Data Blocks (DB)
Instance DB's
PLC Tags and Tag Tables
**WinCC HMI's in XML including:
Screens
Screen Templates
HMI Tag Tables
Tech Objects
UDT (Data Types)
Devices
Device Configuration/Properties
Software Units
Technology Objects*
Siemens continues to improve Openness support for Tech Objects. Some failures may be expected for older versions or certain objects not yet supported. For example, Sinamics objects fail in v17, but succeed in v18.
** Rendering for projects including WinCC are supported, as follows:
- v15-16: includes WinCC Adv/Prof for TIA Portal.
- v17: includes WinCC Adv/Prof/Unified for TIA Portal.
- v18: includes WinCC Adv/Prof/Unified for TIA Portal.
- v19: includes WinCC Adv/Prof/Unified for TIA Portal.
NOTE: Since WinCC Unified is not supported for export by the Siemens TIA Openness API, WinCC Unified HMI details are not supported for display/differences.
Copia supports rung commenting for Siemens files for both Ladder and Structured Text.
Rung Commenting enhances the Code Review process once someone generates a Pull Request to merge a Branch. During the review process, users can add comments directly to the supported parts of the code.
You can watch an overview of rung commenting in the video below.
The product version in the video may be older than the current release, but the process is still applicable.
While Copia provides the standard Git-based approach to merging branches and conflict resolution, it offers advanced, block-level merge capabilities for Siemens files.
You can watch an overview of Advanced Merge for Siemens Step7 TIA Portal in the video below.
The product version in the video may be older than the current release, but the process is still applicable.
Before using the Advanced Merge Tool for your TIA Portal projects, it's important to be aware of its capabilities, requirements, and limitations. There are some known cases that prevent Advanced Merge from operating as expected.
Due to limitations of the software or API, the Advanced Merge Tool sometimes cannot be used. We recommend you review these below.
For Siemens, the Advanced Merge function is currently only supported in the Web App. It works at the block level for OB, FB, and FC blocks of LAD, FBD, Graph, SCL or STL. It has the capability to resolve conflicted Data Blocks: Global DBs, Array DBs, and Instance DBs. It also can resolve conflicting Tag Tables: Tags and User Constants.
The AMT must be accessed via the Web App via the Pull Request flow
Project items and dependencies must compile without error
Adding an HMI to a branch may cause a conflict that cannot be merged
If a project is renamed in one of the branches, a proper merge will not occur
Projects with password protected content cannot be merged
Initially adding the project in both branches will cause a merge problem (since there is no "base" to compare against). This is rare, and would only happen if you branched prior to adding the project.
Libraries are not supported for merge operations
Know-how protected blocks cannot be merged
Instance DBs (IDBs) are not allowed to be merged if their source files are also in conflict
Most of these issues are due to software or API limitations. If any of these cases are applicable, please perform a manual merge outside of Copia.
Advanced Merge is available to resolve a conflict during the merging of one branch into another. If two people worked in the same block after the branch was created, a conflict will occur.
When a Pull request has been made and it is ready to be merged, you will notice in the Web App that there is a conflict and that the Advanced Merge tool option will appear. You can either overwrite the target branch, or take advantage of Advanced Merge. Click Open Merge Tool to continue.
Advanced Merge will list the conflicted items on the left side of the screen, in a manner similar to the programming software. You can click into each item in the project tree to review changes. The number of conflicts are listed at the top of the merge tool.
Changes will be highlighted with an Edit badge, while conflicts will be highlighted with a Conflict badge.
View Options provides additional viewing options for the data provided.
Select the conflicted item by clicking on it in the left side of the merge tool. You will be be presented with the changes that exist in the selected branch.
To review the changes in the alternate branch, toggle over to the other branch. You can choose the changes in this branch by clicking the Select to use changes in... option.
If you need more context for the review, you can enable the Show Unmodified Networks toggle.
After the desired branch is selected, the previously conflicted banner should update to a "resolved" state. If there are several conflicts to resolve, perform the same process by clicking into each project item, reviewing each branch, and making a selection. To accept the changes, press the teal Perform Merge button about the project tree.
After completing the Advanced Merge, you'll be placed back into the standard merge process. Copia presents you with multiple opportunities to provide details and feedback, and to confirm that the merge is desired. Continue through these final screens and add any additional details. Press the Merge Pull Request to complete the process.
Once the Pull Request is merged, you will be given the opportunity to delete the branch by clicking the Delete Branch button. This is an optional step that will only delete the branch in the remote repository -- the local branch will remain unless it is deleted locally.
If you want to accept all changes from a certain branch, you can click on the Bulk Resolve button and choose a specific branch. This applies to all conflicted project items, including FBs, DBs, Tag Tables, etc..
There are certain types of conflicts in which only one branch can be selected. These most often occur with items that are not user-modifiable and not renderable by Copia. If your project contains these conflicts, your Bulk Resolve action may not result in a conflict-free project until you change that branch selection to the required branch.
The Advanced Merge Tool allows you the resolve conflicted DBs at an individual element level. This means that if a DB was modified in both the source and target branch, you can make selections such that you include both sets of changes. Support DB types are:
Global DBs
Array DBs
Instance DBs
When resolving Data Block conflicts, there are three primary sections to consider: Base Project Selection, Remanence Selection, and Tag Selection. These are covered in detail below.
While the Advanced Merge Tool is able to resolve individual tag elements within DBs, there are other pieces of information that are stored within the DB that the AMT does not allow you to resolve at an individual level. For example, DBs store the Author data. Since the AMT can't resolve these, it requires that you select a branch to use as the Base Project for the merge. This will use the "metadata" of the block from this branch, but does not affect the individual tag selections that you make. Note that this will discard any of the "metadata" that may be different in the unselected branch's DB.
Data Block tags have a Remanence or "Retain" property that marks them as Retentive or not. This property can be be set at the individual tag level in certain cases, meaning you can have some tags that have the "Retain" checkbox checked and others that have it unchecked. However, depending on factors such as the processor type or optimized access settings, these cannot be set at the individual tag level and instead are set as all-or-none within the DB.
Due to this, the AMT will detect when there is potential for you to make selections that the IDE will not accept as valid. In this case, you will see a selection like the one seen in the picture below. It requires you to specify when or not you you want to select "Retain" values individually with the Use individual tag "Remanence" values toggle, or if you want to set all values as Retain or NonRetain. Note that your selections in the DB table will be superseded by your selection of these toggles.
Unless you have a specific purpose for selecting individual Retain values per tag, Copia recommends setting each tag to the same Retain value for the best chance of the AMT generating a project without error.
Once you've made your Base Project and Remanence selections, you can make your individual tag selections. As seen in the image below, tags are broken up by section. The AMT will only show conflicted tags by default. If you want to see the other unconflicted tags in the DB, enable the "Show unconflicted tags" toggle in the upper right section.
You must select either the left or right version of a tag for all tags in order for the DB to be marked as "Resolved". You may select the top-most checkbox to bulk-select all tags for that branch.
Note that you may not see all of the tag's property columns. This may result in conflicting columns not being visible. Scroll horizontally to view the rest.app
The Advanced Merge Tool allows you the resolve conflicted Tag Tables at an individual element level. This means that if a Tag Table was modified in both the source and target branch, you can make selections such that you include both sets of changes. Support Tag Table types are:
Tags
User Constants
While the Advanced Merge Tool is able to resolve individual tag elements within Tag Tables, there are other pieces of information that are stored within the Tag Table that the AMT does not allow you to resolve at an individual level. For example, Tag Tables store the Author data. Since the AMT can't resolve these, it requires that you select a branch to use as the Base Project for the merge. This will use the "metadata" of the block from this branch, but does not affect the individual tag selections that you make. Note that this will discard any of the "metadata" that may be different in the unselected branch's Tag Table.
Once you've made your Base Project selection, you can make your individual tag selections. As seen in the animation below, tags are broken up by section: Tags and User Constants. The AMT will only show conflicted tags by default. If you want to see the other unconflicted tags in the Tag Table, enable the "Show unconflicted tags" toggle in the upper right section.
You must select either the left or right version of a tag for all tags in order for the Tag Table to be marked as "Resolved". You may select the top-most checkbox to bulk-select all tags for that branch.
Note that you may not see all of the tag's property columns. This may result in conflicting columns not being visible. Scroll horizontally to view the rest.