ContentHub
EdgeComp_virtuelle_Runtime_installieren_20260617_916_EN.mp4
11 views
View transcript
Hello, in this WAGO tutorial we show how to install CODESYS on a WAGO Edge Computer. WAGO Edge Computers are initially supplied with a Linux Debian operating system. In addition to many other options, it is also possible to install CODESYS in the form of a virtual runtime on the Edge Computer and use it as a high-performance PLC. For this purpose, CODESYS provides its own version called “CODESYS Virtual Control for Linux”. In principle, the virtual runtime is installed on the Edge Computer via the CODESYS development environment using the plug-in “Deploy Control SL”. The plug-in can be found under Tools and is usually included in the standard installation. If “Deploy Control SL” does not appear in this menu, it can be added later via the CODESYS Installer. From a technical perspective, a Docker container is installed on the Edge Computer in which the virtual runtime runs. To do this, we first need to prepare the CODESYS development environment. Although the virtual runtime is also available in the WAGO Download Center and on the CODESYS website, we require it as an extension within the development environment, so we can install it directly using the CODESYS Installer. At present, the latest version used by WAGO is SP21 Patch 5. Unlike with PFCs, however, the CODESYS version of a virtual runtime is not directly dependent on the hardware or firmware version. The important point is that the version of the virtual runtime matches the version of the development environment. In our case, this is CODESYS 3.5 SP21 Patch 5. Click on “Change” to open the window for installing additional add-ons. In the Browse tab, search for “Virtual”, and the add-on CODESYS Virtual Control for Linux will appear, in version 4.21.0.0. Tick the checkbox and select the version on the right-hand side. Unfortunately, the latest version is always selected by default, rather than the version compatible with the installed CODESYS version. Therefore, we check the release notes for Virtual Control for Linux SL. We can see that version 4.21.0.0 is already based on a newer CODESYS version, SP22 Patch 2. Further down, version 4.19.0. based on SP21 Patch 4. There are no runtime updates in between version 4.20.0.0 only introduced redundancy bug fixes and improvements. Therefore, the latest compatible version for our setup with SP21 Patch 5 is 4.20.0.0, which we select in the CODESYS Installer and install. For productive operation, we also require a CODESYS licence. This can be activated, for example, using the add-on CODESYS License Server for Linux SL via the Edge Computer’s web-based management interface. This add-on also enables licence management via a licence server on the network. A brief background note: using CODESYS always requires a paid licence. This also applies to WAGO PFCs; however, for PFCs, the licence cost for a wide range of applications is already included in the purchase price. Since the Edge Computer, with its Linux operating system, can be used far more flexibly and often without CODESYS, the licence cost is not included and must be purchased separately. So again, go to Browse, search for “License Server”, check the release notes, and install version 4.20.0.0 here as well. Without a licence, the virtual runtime runs in demo mode for 2 hours, after which it stops and must be restarted. Now start the CODESYS development environment and create a new standard project. At the bottom of the controller list, you will find Virtual Control for Linux SL. This is also available for Arm architectures, but the 9412 used here has an Intel Atom processor. As mentioned earlier, installation of CODESYS on the Edge Computer is carried out using Deploy Control SL. First, enter the login credentials and connect to the Edge Computer. In the Deployment menu, select CODESYS Virtual Control for Linux SL as the product, choose version 4.20.0.0, and install the virtual runtime. We also require the package CODESYS License Server for Linux SL, which we install as well. Unlike the virtual runtime, the licence server does not run in Docker—it runs natively on the system, as it requires direct interaction with the hardware. Next, switch to the Operation menu. The licence server has already started automatically; we only need to start the virtual PLC. The designation “VPLCs” highlights a major advantage of virtual runtimes: multiple instances can run in parallel on a single device. Use the plus symbol to add a new instance. Since multiple instances can run simultaneously, we must assign a unique name and confirm with OK. The runtime is added but still stopped. We can repeat this process to add a second instance—for now, we will focus on VPLC01. Select this instance to configure it in the right-hand panel. Four settings are particularly important: Autostart should be set to Yes so that the CODESYS instance starts automatically after a reboot or shutdown. Licence Server: in our case, this is the Edge Computer itself, so we enter its IP address. The licence can also be provided via another network participant; in this case, the corresponding IP address would be entered here. Mounts: since the runtime runs in a Docker container, we specify a directory outside the container. This is where CODESYS configuration, persistent variables, runtime data, log files, etc. are stored so they remain available even after container restarts. The path shown is the CODESYS path inside the container, so we must map it to a directory on the host system—typically a temporary directory. We therefore prepend the temporary directory path. Network: set this to run via the host system. Alternatively, you can specify a dedicated Ethernet interface IP address, meaning the instance communicates exclusively via that interface—particularly useful when running multiple instances. In that case, the port must also be specified. Save the configuration, and the CODESYS runtime is now fully installed and configured. Next, we want to use the WAGO libraries on the Edge Computer. In principle, WAGO libraries can only be used on WAGO devices. Although they are installed in the development environment via the device description— and appear under “Installed” in the CODESYS Installer—they cannot yet be used in the virtual runtime. This is because the runtime runs virtually in Docker and has no direct connection to the hardware. To establish this connection, we use the Vendor Check tool. A link to this tool and installation instructions can be found in the video description. Installation is mainly done via the Linux terminal, which can be accessed through the Edge Computer’s web-based management interface. Simply copy and execute the provided commands. If the command does not work due to lack of internet connectivity, an alternative approach using an SCP client can be used. Note that the mount to the temporary directory is also required for the vendor check. Using the link in the video description, download the file WagoSysEdgeComputer.compiled-library. Open the Library Repository via Tools and install this library. This creates a bridge between the virtual runtime and the WAGO Edge Computer, enabling the use of WAGO libraries. Now let’s verify that the runtime is running. Start the VPLC01 instance. In the PLC PRG, declair an integer variable and increment it in every cycle. Next, connect to the runtime via the development environment. Open the device and scan the network. Depending on firmware version or configuration, this may or may not work—as in our case. Here, we can connect to the Docker container via Deploy Control SL and access the Edge Computer through the browser, but not through CODESYS. This indicates a firewall issue. Opening the firewall settings shows that the CODESYS TCP port 11740 is not enabled. We add a new service to allow TCP port 11740. This is sufficient for manual connection via IP address. To ensure the runtime is also discoverable during network scans, we must additionally enable UDP ports 1740–1743. Returning to CODESYS, the virtual runtime is now visible and we can connect as usual. When logging in for the first time, a pop-up appears prompting us to create a username and password. Now we can download and start the program, and the integer variable begins counting up. As mentioned earlier, a full system requires a valid CODESYS licence. The logs also indicate that the runtime is operating in demo mode. Different licensing options and how to install them will be covered in a separate video. That brings us to the end of this tutorial on installing a virtual CODESYS runtime on a WAGO Edge Computer. If you found this video helpful, please give it a thumbs up, subscribe to the channel, and contact the WAGO Support Center if you have any questions.