How to Run Multiple Devices Simultaneously in CODESYS Control Win?

Hi,

I am trying to set up a simulator on CODESYS Control Win to simulate multiple devices simultaneously.

Please refer to the attached image. As shown, I have successfully set up multiple Modbus Serial Devices within the Devices tree and configured individual applications for each.

However, despite being able to configure multiple devices in the setup, it appears that I can only run one device at a time in CODESYS Control Win.

Are there any suggestions or solutions to enable simultaneous execution of multiple devices?

Additionally, would switching to CODESYS Control Win RTE (Real-Time Environment) allow for running multiple devices concurrently?

Thank you for your insights!

Hello, I think the main problem is you only have one Codesys Control win on your PC. because of this you can only run 1 program at a time.
In that case, you could try to use docker for windows and see if you can run multiple instance of the codesys runtime for docker.
Use different port for each access and you should be fine.

Hi, thank you for your answer.

I’ve figured out how to achieve what I was looking for.

The solution is to use CODESYS Virtual Control SL.

It can be deployed on a Linux system (Ubuntu) using Docker, allowing you to run multiple controller instances simultaneously.

The instances are created and managed through the CODESYS IDE, which you also use to select and connect to the desired runtime.

Please see the attached screenshots for reference.

Below is what you need to learn — I recommend watching all videos available at the link:

https://www.codesys.com/products/runtime/virtual-control-sl/

  1. Connect to the ubuntu server running docker

You just need ubuntu and docker installed. Codesys will create all the necessary instances for you.

  1. You will need to use the deployment tool in order to load the necessary images.

  1. You will have at least two gateways (see below):

gateway0 is to your local machine

gateway1 is for your ubuntu server running docker (one gateway for all your instances)

  1. You need to create all the code you want to use using Codesys IDE. Then you need to login and run each of them.

1 Like

Hello,
It should also work with Codesys Control Win. The following video shows how it works. However, I haven’t tested it myself.

Codesys Tutorial : Running Multiple Instance of Codesys Win V3 PLC

2 Likes

I saw this video.

I started to implement it, but I do not think it is worth to do.

Windows has a big delay to run just one task.

I tried to run a maste and a slave in the same Windows computer.

The slave has a minimum answer time (in my case) of 1ms when you use the Modbus driver I/O. Thus the comunnication could not work as I intended. I just gave up using this solution for Windows. It does not pay off.

Actually this guy did a new one about the same subjet. But talkning about CODESYS Virtual PLC Control SL On.