Developing code for different runtimes

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:

  1. Have a separate developer-machine for the different targets
  2. Have several virtual machines in my developer-machine, one for each target
  3. 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:

Different XAE installations

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”.

TwinCAT toolbars

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.

XAE Remote Manager

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.

  • Share on:

4 Comments, RSS

  1. Markus Säbel

    Thanks for your useful post! However I wasn’t able to make it work. I currently have XAE build 4024.7 installed, but need to develop for a machine that’s running 4022.30. I tried both installing only the older XAR and installing the full older XAE but in both cases got an error message saying that a newer version was already installed. What do I have to do to actually get both versions installed in parallel?

    • Hello Markus! You can only install a newer version of the TwinCAT XAE that you currently have. To solve this issue of being able to build for older versions of TwinCAT, Beckhoff are releasing special releases called remote manager versions. They seem to only have the 4022.32 version on that page, but you can contact Beckhoff support, and if 4022.30 is available as a remote manager version, I’m sure they will send it to you.

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.