CODESYS Software PLC¶
CODESYS* is the leading manufacturer-independent IEC 61131-3 automation software for engineering control systems. It is used in Intel® Edge Controls for Industrial (Intel® ECI or ECI) to provide a software programmable logic controller (PLC) for executing real-time control applications. The CODESYS Runtime is capable of performing complex tasks and communicating with industrial communication protocols such as PLCopen OPC UA Transport Layer, Profinet, and EtherCAT. For more details, refer to the CODESYS global website.
CODESYS Linux Runtime¶
The following section is applicable to:

CODESYS provides a Linux* runtime that allows control applications to execute on Linux-based systems. The CODESYS Linux runtime is free to use without a license, however it will automatically stop execution after two hours. If you want to use CODESYS Linux runtime beyond the two-hour limit, purchase and install it. For information on licensing CODESYS, refer to License CODESYS Linux Runtime.
Install CODESYS Linux Runtime¶
You can install this component from the ECI APT repository. Setup the ECI APT repository, then perform either of the following commands to install this component:
- Install from meta-package
$ sudo apt install eci-softplc-codesys
- Install from individual Deb packages
$ sudo apt install codesyscontrol codemeter
License CODESYS Linux Runtime¶
See also
For information on licensing CODESYS, refer to Licensing.
There are two primary licensing methods for the CODESYS Linux runtime:
License Method |
---|
USB Dongle
|
License Soft Container
|
Restart CODESYS Linux Runtime¶
The CODESYS Linux runtime will continue to run without a license for up to two hours. If the CODESYS Linux runtime stops running after the two-hour time limit, run the following command to restart:
$ sudo systemctl restart codesyscontrol
Verify that the CODESYS Linux runtime is active (running):
$ sudo systemctl status codesyscontrol
The output should report active (running)
:
● codesyscontrol.service - LSB: Prepares and starts codesyscontrol
Loaded: loaded (/etc/init.d/codesyscontrol; generated)
Drop-In: /usr/lib/systemd/system/service.d
└─10-override-protect-proc.conf
Active: active (running) since Thu 2022-09-01 01:50:45 UTC; 2s ago
If the output does not report active (running)
, then repeat the process of restarting and checking the runtime.
Tip
Isolated incidences of compatibility issues with +12th generation CPUs and CODESYS have been observed. See Limitation #6 - Cannot start CODESYS Linux runtime for potential mitigation actions.
CODESYS IDE¶
The following section is applicable to:

CODESYS provides an integrated development environment (IDE) for Windows*. Using the CODESYS IDE, control applications can be developed, tested, and compiled for the CODESYS Linux runtime. The following figure shows a typical IDE project environment.
For instructions on installing the CODESYS IDE to a Windows PC, refer to Install CODESYS IDE.
Install CODESYS IDE¶
Setup a PC with a 64-bit version of Windows [ 7 (Service Pack 1 or higher) / 8 / 10 ] installed.
On the Windows PC, open a web browser and download the 64 bit version of CODESYS from the following website:
For US based customers: https://us.store.codesys.com/codesys.html
For non-US based customers: https://store.codesys.com/codesys.html
Note: You need to create a free account for the download to be available.
Download the CODESYS Control for Linux SL package (
CODESYS Control for Linux SL x.x.x.x.package
) from the following website:For US based customers: https://us.store.codesys.com/codesys-control-for-linux-sl-bundle.html
For non-US based customers: https://store.codesys.com/codesys-control-for-linux-sl-bundle.html
Note: CODESYS Control for Linux SL package is free to download and evaluate. The price listed on the website is for a License Key, which is not required for evaluation purposes. Without the License Key, the CODESYS Linux runtime will operate for up to 2 hours before requiring a restart.
Download the CODESYS Edge Gateway for Linux (
CODESYS Edge Gateway for Linux x.x.x.x.package
) from the following website:For US based customers: https://us.store.codesys.com/en/codesys-edge-gateway-for-linux.html
for non-US based customers: https://store.codesys.com/en/codesys-edge-gateway-for-linux.html
Run the installer, downloaded earlier (name format should be: CODESYS 64 #.#.#.#.exe), to install CODESYS.
Make sure that CODESYS Control for Linux SL x.x.x.x.package and CODESYS Edge Gateway for Linux x.x.x.x.package are in the same directory. Double-click CODESYS Control for Linux SL #.#.#.#.package. This will initiate the CODESYS package manager.
The prompt should show both CODESYS Control for Linux SL and CODESYS Edge Gateway for Linux packages queued for installation. Follow the installation prompts to install these packages.
Open the CODESYS Package Manager (available in the Start Menu under the CODESYS group), and verify whether both CODESYS Control for Linux SL and CODESYS Edge Gateway for Linux packages are successfully installed.
CODESYS Linux Runtime Optimizations¶
The following section is applicable to:

ECI provides a number of useful scripts for improving the real-time performance of the CODESYS Linux runtime. Do the following to start using these scripts:
On the target system, install the
codesys-benchmark-scripts
Deb package from the ECI APT repository. Setup the ECI APT repository, then perform the following command to install this component:$ sudo apt install codesys-benchmark-scripts
Navigate to
/opt/benchmarking/codesys
to find the applicable scripts.The scripts available at
/opt/benchmarking/codesys
include:start_codesys_native.sh
: Optimizes the system (see the list below), stops non-essential services, and restarts the CODESYS runtimestart_codesys_container.sh
: Optimizes the system (see the list below) and starts the containerized CODESYS Linux runtime with RT priority
Note: The
start_codesys_container.sh
script assumes that you have completed the CODESYS Containerization section: Microservice: CODESYS Linux Runtime and CODESYS Edge Gatewaytaskset_CODESYS.sh
: Optimizes the system (see the list below)
The provided scripts also perform the following runtime optimizations:
Uses Cache Allocation Technology (CAT) to isolate CPU cache for CPU 1 & 3
Assigns CODESYS task affinity to cores 1,3
Assigns non-CODESYS task affinity to core 0
Disables kernel machine check interrupt
Increases thread runtime utilization to infinity
CODESYS Example Applications¶
ECI is bundled with CODESYS example applications:
OPC UA Publish/Subscribe Example¶
The OPC UA Publish/Subscribe Example makes use of CODESYS and the ECI Edge Control Protocol Bridge to showcase bridging OPC UA Client/Server Model to OPC UA Publish/Subscribe Model. In this example topology, the EC Protocol Bridge establishes a connection as an OPC UA client to the CODESYS Linux Runtime OPC UA server. Data on this OPC UA client/server protocol is bridged to an OPC UA publish/subscribe protocol, which the EC Protocol Bridge makes available.
CODESYS Benchmarking Applications¶
The CODESYS benchmark is an example application that allows deterministic control and test of the CODESYS SoftPLC. The application is defined such that a main task occurs every 250us. Within the main task is a configurable workload which iterates a number of user defined times. The specific workload is configurable to either: “floating point”, “arithmetic”, or “boolean” operations. Cycle execution times are measured from which minimum, maximum, and jitter measurements are derived. These measurements allow performance characterization of the CODESYS SoftPLC on the target system.
Explore more tutorials to learn more with CODESYS :
Section |
Description |
---|---|
Tutorial demonstrating how to setup, configure, and control a PROFINET device using CODESYS. |