Codesys#Let’s use CODESYS VIRTUAL CONTROL SL

On 3 July 2024, the CODESYS VIRTUAL CONTROL SL from Codesys was released. Using that SL, multiple Codesys Runtimes can be run simultaneously on a single PC. This article describes the setup procedure from Zero.

Let’s enjoy Factory Automation!

Reference Link

http://soup01.com/en/category/codesys_en/

CODESYS VIRTUAL CONTROL SL

CODESYS VIRTUAL CONTROL SL has been released! This IEC 61131-3 compatible runtime system CODESYS Virtual Control SL can be installed on any architecture with a container or hypervisor/VM, as and when needed, with scalable performance.

This makes it easy to implement programmable virtual controls in the CODESYS development system in the IEC 61131-3 language with all available CODESYS functions.

CODESYS users can choose a computer architecture, such as an industrial device, server or cloud platform, to deploy or or orchestrate the CODESYS Virtual Control SL.

This way, the virtual controllers required for the application can be implemented precisely and performance can be scaled accurately. All control instances can be set up via Linux commands or scripts using appropriate tools (Kubernetes, Open Shift, etc.) or directly from CODESYS Automation Server (to be released)。 

Access to the field level is also provided by a high-performance virtual LAN.

Advantages 

Compared to the Classic PLC, the Virtual Control System has the following advantages

  • Reduce hardware procurement, wiring, operation and maintenance.
  • Machine and plant operators can provide and manage their own hardware platforms, freeing them from hardware bindings.
  • Allows independence from hardware and hardware manufacturers.
  • Allows control instances to be created dynamically and hardware to be extended independently of the software, facilitating expansion.
  • Provides design security by distributing tasks across multiple independent control instances.
  • Interoperability with other services
  • Simplified deployment of updates

Cost Savings

Replace n physical PLCs with a single platform containing n virtual controllers.

Scalability

With CODESYS Virtual Control, both can be implemented on the appropriate device with a simple mouse click. With the appropriate license, the whole thing can be turned into a small controller or a motion controller. It can accommodate small logic tasks as well as full-scale motion controllers.

Reduced space and wiring requirements

When adding Instance to CODESYS Virtual Control, no new cables or additional power supply is required for the central computer. The I/Os can also be connected via industrial Ethernet. So you no longer have to worry about control cabinet space or 24 VDC power supply limitations.

Flexible orchestration

You can set up CODESYS Virtual Control using Linux scripts and tools such as Kubernetes/OpenShift, or you can use the CODESYS Automation Server management platform CODESYS Automation Server is fully operational without any Linux knowledge. Furthermore, it is also available on the latest Intel platforms with Intel® TCC Cache Allocation Technology. This means that the real-time functionality of the CODESYS Virtual Control PLC is guaranteed.

Security-by-Design

It protects the control system by properly partitioning the application parts and encapsulating them in containers. In the event of an update or attack, the affected parts can be easily shut down and restarted without compromising the entire system – CODESYS Virtual Control makes it as easy as microservices in IT.

Maintenance made easy

When a security vulnerability is discovered, hundreds of PLCs are affected in the worst case. Firmware and applications need to be updated as soon as possible on the production floor. Problems caused by security vulnerabilities can take days, weeks or even months to recover from.

But not if the PLC is running as a virtual system on a central computer. In that case, it takes only a few seconds to perform an update.

Flexibility

Until now, adding new features to a machine has often involved adding new hardware – CODESYS Virtual Control relieves the pressure to use new hardware to implement new features. All we do is add a new virtual PLC and use it to implement new functionality.

SoftSafety

Various encodings enable virtual safety controllers to comply with IEC 61508 SIL3.

CODESYS Virtual Safe Control

With regard to Safety both channels are executed sequentially on one CPU core in one process on the virtual PLC. While doing so, they check each other all the time.

Diversified encoding distributes the safe inputs to both channels and, conversely, merges the outputs of both channels into safe outputs. Data streams generated by secure networks and fieldbus protocols are also included.The safety concept of SIListra Systems GmbH is approved by TÜV SÜD。

Release and certification of CODESYS Virtual Safe Control as a hardware-independent solution is planned for the first half of 2024.

As in the past, safety applications can be configured in the Safety IEC 61131-3 editor as part of a certified add-on module that extends the pure functional part of the CODESYS development system.

With CODESYS Virtual Safe Control, any containerised platform can be used as a safety controller, including safety certification.

The software solution enables dual-channel functionality through “Diversified Encoding” based on “Coded Processing”. The application processing is split into two logical software channels:

  • The first channel runs the implemented safety application as it is.
  • The second channel uses the same application, but runs on the ‘Coded Processing’ algorithm, which can already detect errors.

Download

CODESYS Virtual Control SL can be downloaded at the following Link.

https://store.codesys.com/en/codesys-virtual-control.html

Configuration Example

This is an example application using CODESYS VIRTUAL CONTROL.

vPLC

This configuration uses five Codesys applications to implement real-time control.

  • 2 x CODESYS Virtual Control SL
  • 2 x CODESYS Virtual Safe Control SL
  • 1 x CODESYS Edge Gateway SL

Container

Use Podman to run several different applications on one hardware.

Operating system

This application uses Red Hat Enterprise Linux for Real Time.

Hardware

Use multi-core IPC with Intel® TCC (Time Coordinated Computing).

(Intel® Core(TM) i7-1185GRE Tiger Lake UP3)

Network

Although not mentioned in the application diagram, Cisco Catalyst industrial Ethernet switches are used to ensure stable and secure real-time access to I/O between machines and systems and automation.

I/O System and I/O Devices

EtherCAT Safety (FSoE), protocol stack as CODESYS library.

AI-Application / workload consolidation

Live Stream object segmentation with the OpenVINO™ YOLOv8 AI container has been implemented and also allows software to be implemented alongside real applications.

Use case

April 2024, AUDI AG plans to operate its production lines with server-based control systems in the future. The aim is to utilize the many advantages of control virtualisation with CODESYS for functional and safe controllers.

Source:

https://www.codesys.com/news-events/news/article/audi-uses-virtual-codesys-control-1.html

Implementation

This is the configuration in this example.

Codesys Version

CODESYS V3.5 SP20 will be used in this article.

Installation

Start CODESYS and open Tools>CODESYS Installer.

The CODESYS Installer starts up.

Click Install File(s).

Open the Virutial Control PL that you have just downloaded from CODESYS HP.

OK to proceed.

Accept the licence and proceed with Continue.

Close CODESYS once.

Please wait a moment…

Done!

Linux PC Setup

The next step is to set up a Linux PC to run the CODESYS PLC. This time, we install Ubuntu on VMware.

Then use the following command to set up an ssh server on Ubuntu.

sudo apt update
sudo apt install openssh-server

sudo systemctl status ssh

sudo ufw allow ssh

Setup the Virtual PLC

Set up the Virtual PLC from now on – click Tools>Deploy Control SL.

The Communication screen is displayed.

Enter the IP address of the Ubuntu OS and use Connect to connect the CODESYS IDE to the OS.

Done!

Deployment

The next step is to install the Codesys Runtime Image on Ubuntu OS from the Deployment Tab.Select Install from local files>Docker_Codesyscontrol.

Click Install.

Done!Codesys Control Images has been installed.

Use the same operation as before to add a Gateway as well.

Configuration

Now open the Configuration Tab, click the + button and add a Runtime Instance.

Enter the Instance name in Name, select >Runtime and set Codesyscontrol_virtuallinux… in the Image section.

Done!Instance is added.

Click the Configure button to configure the Instance settings.

This is the Instance settings screen.

Configure the Network Adapter in Nic.

Use the ip a command on Ubuntu to see which Network Adapters are available.

Add a Gateway Instance using the same operation as before.

Status/Command

Use this Tab to start and stop Instance and to check the current Instance status.

Start>Start All starts all Instances.

Done!

New Project

Now that you have started Instance, the next step is to create a simple project – click on File>New Project.

Since you have just installed CODESYS Virutial Control PL, new Targets such as CODESYS Virtual Control for Linux SL have been added to the Device list.

In this article, the Ubuntu OS was installed inside VMware, so select Linux SL > OK to add a new project.

Done!

Configure Gatway

To connect the PC to the CODESYS PLC in Virtual Control, the Gateway must be set up – click on Communication Settings>Gateway>Add New Gateway.

Set the IP address of the Ubuntu OS to IP-Address.

Done!

You could search for myCodesys1, which you have just added.

After that, use the usual Codesys operations to set the Username and Password.

Done!

Result

You are also running the progrom successfully.

Add More Instances!

Next, add more Instances. That’s the best thing about Virtual PLCs.

Done!Multiple Codesys could be searched and accessed simultaneously.

Add Devices

Finally, to create a second Codesys Runtime project, add a Target System in Add Devices.

Set the application you want to Login from the Drop-List.

Done!

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする