Version Management using a VCS
PLCnext Engineer supports version management with two common version control systems (VCS): SVN (Apache Subversion) and Git. PLCnext Engineer acts as VCS client in each case. Both, SVN and Git can either be installed on a separate server or you can hire the services of a hoster.
General information on version control systems (VCS)
This topic contains the following sections:
- General information on version control systems (VCS)
- Security Considerations
- Versioning of a project in PLCnext Engineer
- Commands on the 'Tools' view
- Commands on the tabs 'Pending Changes' and 'History'
The purpose of a VCS is to archive files/documents and capture each modification made to them. In our context, these files are PLCnext Engineer solutions with all its contained data (code, variable, HMI, version information, device parameters etc.).
After adding a solution to a repository, you can send (commit) newer versions into this repository. VCS stores all versions with a time stamp and user name.
Background information: purposes and functions of a VCS
Further Info
For further details on SVN and Git please consult the respective VCS documentation. |
Security Considerations
The VCS used should be protected against unauthorized access and therefore manipulation. This applies to the communication between the VCS clients (PLCnext Engineer in our case) and the server where the repository is hosted as well as to the repository itself.The security measures should involve encryption, authentication, and authorization. Examples:
- Only establish secured connection channels between VCS client and repository.
- Encrypt the repository.
- Restrict the access to the server hosting the repository.
Further Info
Refer to the topic "Security in PLCnext Engineer" as well as to the "Phoenix Contact Industrial Cyber Security Guide" for further information. |
Versioning of a project in PLCnext Engineer
![]() | In PLCnext Engineer, the version management is completely implemented in the VERSION CONTROL window. This window is located in the Cross Function Area at the lower screen border. |
- In the VERSION CONTROL window, select the VCS to be used from the 'Version control' dropdown list.
- If necessary, create a new repository by clicking the 'Create repository' button. In the browse dialog, you have to select an empty folder. Here, the address of a VCS hoster on the Internet can be specified instead of a local or network folder.To use an already existing repository, skip this step and enter the path to the existing repository in the next step while getting the working copy.
- Create a so-called working copy in the working copy folder which is under VCS control.
What is a working copy (folder)?
- The 'Repository' into which the project should be integrated.
If you have created a new repository in step 2, this new repository is already preset.
To select an existing repository click the '...' browse button and set the desired path. - The 'Working Copy' folder where you want to store your local copy of the project in uncompressed format.
Note
The working copy folder must be empty.
The folder then contains an invisible subfolder (.svn/.git) which must not be deleted.The data already stored in the repository are copied to the working copy folder. This means, if the repository already contains PLCnext Engineer solutions or any files, these are copied to the working copy folder. - The 'Repository' into which the project should be integrated.
- Save the project to be put under VCS control into the working copy folder.
Select 'File > Save Project As...', set the file type '*.pcwef' and select the working copy folder as destination path.
With this step, the solution files are added to the repository.Note
The project must be saved in uncompressed (flat) format but not in compressed format (*.pcwex). In pcwex format the project cannot be versioned in a VCS. - After adding it to the repository in the previous step, you have to commit the current project version to the repository. This way, the current version of each single solution file is checked-in.
- Open the 'Pending Changes' tab in the VERSION CONTROL window.
- Click the 'Commit' button.
- Continue with the further editing of the project.After saving it the next time, the following occurs:
- PLCnext Engineer automatically makes a comparison with the latest version in the repository. Any modifications you made since you committed the version the last time are listed on the tab 'Pending changes'.Here, several commands are available in the toolbar which are described below.
- The 'History' tab shows which versions have been committed. For each version, the user is shown who has committed the version. Furthermore, the time stamp is visible as well as the comment which was entered while checking-in the data. When selecting an entry, the committed modifications of this version are listed in the 'Logical Items' column on the right.Several commands are available in the toolbar which are described below.
Commands on the 'Tools' view
If 'Tools' is selected on the left side of the VERSION CONTROL window, the following commands are visible on the right.
Commands on the tabs 'Pending Changes' and 'History'
If a working copy folder (repository) is selected on the left side of the VERSION CONTROL window, the tabs 'Pending Changes', 'History' and 'Info' are visible on the right.
The buttons that are available for executing VCS-related commands in the tabs 'Pending Changes' and 'History' depend on the VCS used.
'Pending Changes' tab
The list of pending changes is updated approx. 2 seconds after saving the project. Unsaved modifications cannot be listed here. Modifications on the project may also occur after clicking some VCS-related commands such as 'Update'/'Pull' or 'Revert'/'Revert to Revision'.
'History' tab