How to open a program of lower version in TwinCAT 3 ?

 Executive Summary

After the successful development of TwinCAT 3 projects, several devices have been sold to end-user sites.However, the TwinCAT 3 development environment for development engineers and after-sales service personnel may be upgraded to a higher version for various reasons. When it is necessary to upgrade and maintain the original PLC program, if the PLC project developed under the lower version is directly opened, there may be several compilation errors. What is the correct approach to avoid this problem?

1. Fix TwinCAT version and Library version before backup

2 Use TwinCAT Remote Manager to load the PLC program of the lower version

Methodology

1. Use Remote Manager to load the low-version program

TwinCAT3 Remote Manager (RM) is specifically designed to open and edit low-version PLC programs.Prior to the introduction of RM, the XAE version must be consistent with the TC Runtime version of the controller.With RM, multiple low-version RM installations can be installed on a high-version XAE to facilitate maintenance of TwinCAT projects developed in different eras and periods.

You can download different versions of Remote Manager from Http://www.beckhoff.com, as shown in the figure below:

The second-to-last section of the Version column in the image above is called the Major Build, such as 4016, 4018, 4020, 4022. The last section is called the Minor Build, such as 30, 56, 57, 28 in the image above.The official website only provides the final Minor Build of each Major Build for the Remote Manager. Typically, this RM can be compatible with all minor PLC programs under the same Major Build.In case of failure, please contact the original Beckhoff factory for a RM with identical major and minor versions.

2. Two settings before TwinCAT 3 project backup

In order to provide after-sales service or for future use by developers, it is necessary to back up TwinCAT projects.In order to ensure that future versions of TwinCAT can successfully open the backed up TwinCAT projects, two settings should be noted before the backup:

1) Check Pin Version to fix TwinCAT version

By default, the TwinCAT3 development environment always uses the version of XAE to load when opening a project.If the project version is found to be different, it will be asked whether to upgrade to the current version.If the answer is No, it will exit and manually select the RM version to open the project. However, many users will habitually answer Yes, and then load and compile the low-version program with the high version, which may result in dozens or hundreds of compilation errors.Unless you are sure you intend to upgrade the program, do not waste time and effort troubleshooting these errors, because TwinCAT provides a simpler option "Pin Version" to fix the load version, as shown in the figure:



After selecting "PinVersion" in the above figure, the project version will be automatically identified and loaded with TwinCAT3.1 Build 4022.30 RM, regardless of whether the project is packaged or copied to any higher version of TwinCAT XAE on other computers, avoiding compilation issues caused by incompatible versions.

2) Set to Effective Version, fix the Library version

By default, when opening any TwinCAT project in TwinCAT XAE, all referenced libraries will automatically be compiled using the highest version of the library.However, the libraries on different engineers' computers or the same engineer's computers at different times may have different versions. If a library is changed to a higher version but the related library does not have a matching version, compilation may fail.Therefore, TwinCAT provides an option for each library in Reference to "Set to Effective Version" to fix the current version of the library, as shown in the figure:

Click the right-click menu "Set to Effective Version" in Library, and multiple versions will pop up for selection:


Select the appropriate version.Usually, choose the highest version that can compile successfully, such as Tc2_MC2,3.3.31.0 in the image above.

Conclusion:

Finally, according to feedback from peers in other countries, many large enterprises use virtual machines to back up the exact version of TC3 XAE and backup the controller's IMAGE to ensure that there is always a matching programming environment and running environment.This is the most original, resource-consuming, and of course the safest backup method, suitable for program backup of devices that have already been shipped.For engineers to purely share programs or for daily program maintenance, it is recommended to use TwinCAT Remote Manager.