Beckhoff Automation Blog

The Beckhoff Blog contains posts relating to Beckhoff Automation programming and technology. Select a post below to view the full story and details.


Go Back

Configuring Multiple PLC Runtimes in TwinCAT

The TwinCAT system allows you to run up to 4 PLC runtimes on 1 PC based controller. This is a very useful feature, for example, I have used this during development by implementing a separate PLC Simulator program that runs on its own run-time.

Variables from the second Simulator PLC project can be linked to the first, machine PLC project to act as inputs/outputs during development.

Adding a Second TwinCAT PLC Runtime

Right click on PLC configuration to add another PLC runtime. Up to 4 PLC run-times can be configured.

Append a second PLC runtime by right clicking on the TwinCAT PLC Configuration node.

Runtime system is used by another project!

However, when setting up a second runtime for the first time, you might get the above error, which can be frustrating. Below are the steps to setup multiple run-times in the TwinCAT System Manager and PLC Control.

The runtime in use error occurs when you try to add a second PLC project, but have not enabled multiple runtimes, or chosen the second runtime in the PLC editor.

Choose Number of Runtimes and Apply

Choose the number of runtimes on the PLC settings tab. After making the selection, you must hit Apply, then save the System Manager file and Activate the configuration.

Enable additional TwinCAT PLC runtimes on the PLC Settings tab. Hit the Apply button to activate the setting.

Choose Runtime System in TwinCAT PLC

From the Login > Choose Runtime System menu, select the second runtime for the simulator PLC project. After selecting the runtime, you must rebuild and save the PLC project before trying to add the project into System Manager.

In the TwinCAT PLC Editor, go to the Login > Choose Runtime System menu and select the second runtime. Rebuild the project and Save.

System Manager with Multiple Runtimes Configured

After making the necessary settings for multiple runtimes, you will have two items in the System Manager tree. Now you can link inputs/outputs from the simulator PLC project to the machine project for development purposes.

After making the changes, saving, and activating the configuration, a second PLC runtime can be successfully added to the system.

Facebook DZone It! Digg It! StumbleUpon Technorati Del.icio.us NewsVine Reddit Blinklist Furl it!

Comments  719