I guess you’ve seen the news, TwinCAT 3.1.4022.0 has been released. At one point or another, when developing TwinCAT software you eventually end up in wanting to write code for the latest runtime, but still being able to do software bug fixes/releases for code running on older TwinCAT runtimes. I thought it would be good to quickly share with you how you can work and develop multiple projects developed for different runtime versions but from the same developer machine!
As an example, we’re currently in a phase in a project so that we have several TwinCAT projects running an older version of the TwinCAT runtime (3.1.4020.28). At the same time, we’ve started with some new smaller projects, and here it of course makes sense to run the latest version of TwinCAT. The machines running 3.1.4020.28 have been running stable for months, and there is no reason for upgrading. But maybe at some point in the future I might want to go back to do some smaller bug fixes in the machines running older version of TwinCAT, but at the same time be able to develop completely new code for new projects for the baseline of the latest TwinCAT runtime.
To develop projects for these different runtimes you have three options:
- Have a separate developer-machine for the different targets
- Have several virtual machines in my developer-machine, one for each target
- Use the built-in support in TwinCAT XAE
Even though alternative (1) feels like the safest bet, it’s old school and just adds tons of overhead. Alternative (2) feels like getting all the advantages of alternative (1), but without the drawbacks of having to have separate machines. Still however, running and maintaining several virtual machines is not optimal. And finally, alternative 3 which I guess is the reason you are reading the post is the most attractive option as TwinCAT3 provides built-in support to solve this problem.
It is possible to have several TwinCAT XAE (eXtended Automation Engineering) installed simultaneously. In order for you to develop projects for different runtimes you need to install XAEs for those particular versions.
In my developer machine it looks like this:
So, once 4022.0 (latest and greatest) is installed, open visual studio so you get the TwinCAT3 start screen. Right-click in the top menu-bar and select “TwinCAT XAE Remote Manager”.
Now you have the possibility to select for which target runtime your project should be opened for. Now, prior to opening your project you can select whether you want to open it for the latest runtime (4022.0) or any other version that you have installed in your system.
As a final tip it’s good to know that it’s also possible to convert a TwinCAT project for a older version into the latest version if you want to. All you need to do is to make sure that you have the latest build select in the XAE Remote Manager prior to opening the project. TwinCAT will then automatically (with some input from the user) convert the project.