Warning: this CODESYS runtime is meant for demonstration purposes and has a limited time to run of 2 hours from the start of the container. See the section Licensing Information for more details.
Toradex partner 3S-Smart Software Solutions GmbH is the company that provides CODESYS: the leading manufacturer-independent IEC 61131-3 automation software for engineering control systems.
This article complies to the Typographic Conventions for Torizon Documentation.
CODESYS is a software PLC solution that can be deployed on our ARM-based System on Module families Colibri and Apalis in order to enable the module to work as a PLC. The software solutions provide a development environment and runtime.
See the list of Devices using CODESYS (you see some famous PLC brands like Beckhoff, Wago and Eaton).
In this Partner Demo Container, which consists of a Docker image meant to be run on Torizon, the CODESYS runtime and its dependencies can be deployed to Toradex modules easily. The image has the following CODESYS features enabled:
The following Computer on Modules are supported:
The following platform and configuration are supported:
CODESYS requires the Linux kernel with the PREEMPT_RT patch applied and configured to run fully preemptive. The support for PREEMPT_RT on Torizon is in an early stage and, for evaluation purposes, you may run this container using the default TorizonCore without PREEMPT_RT at your own discretion. Alternatively, you may install the nightly build of TorizonCore with PREEMPT_RT from our Toradex Easy Installer CI feeds, if available at all. Images from the CI feeds are not supported by Toradex and you may use them at your own discretion.
To follow-up on the PREEMPT_RT topic, subscribe for updates on the TorizonCore Release Roadmap.
For Apalis modules:
For Colibri modules:
While you can use a wide variety of displays and monitors, additional configuration may be required for a specific setup.
A section at the end of this guide provides instructions about the display and touch screen configuration.
This partner demo container is meant for the evaluation of the technology. It is not suitable for development or production.
This section provides instructions for you to quickly get started with the CODESYS Partner Container.
The CODESYS evaluation container is only available under NDA. Contact us to learn more and get the CODESYS Partner Demo Container forwarded to you.
Attention: the next instructions are only applicable after you have contacted us.
To create a container from the image pulled, use the following command:
# docker run --rm -dt --name codesys --network host --privileged torizonextras/codesys
Tip: running a container with the flags
--network host is easy for evaluation but they are a bad practice from a security standpoint. You should figure out which hardware interfaces require access to the container to replace the
--privileged and which ports must be exposed to replace the
--network host. Read our Torizon Best Practices Guide for some help.
Install the CODESYS Development System.
Go to the menu Tools > Device Repository:
On the Device Repository window, click in the Install... button and select the downloaded device descriptor file:
Create a new Standard project, give the project a name and click ok:
Select the device previously installed. In PLC_PRG select Ladder:
Now a new project is created. You will see a menu listed on the left-hand side of the project window.
Double click on Device. A new tab will open. Click on Scan network ...:
In the Select Device window make sure the device was found and then double click on it:
With the device connected to the development environment, we can start programming the logic. Click PLC_PRG in the project tree. In Toolbox drag and drop a Contact and a Coil to the Ladder area:
Add the INPUT_01 variable name in the Contact text box and select as type BOOL:
Add the OUTPUT_01 variable name in the Coil text box and select as type BOOL:
Add a Visualization to the project. In the project tree, right click on Application > Add Object > Visualization:
On Add Visualization window just click Add button:
On the Visualization tab, which can be opened with double click on Visualization in the project tree, select Visualization Toolbox > Lamps/Switches/Bitmaps one DipSwitch and one Lamp1, drag and drop one at a time for the Visualization tab:
Connect the elements of the visualization to the elements of the ladder.
Select DipSwitch and in Properties select Variable:
The DipSwitch must be connected to the Contact element of the Ladder. In the window Input Assist select Application > PLC_PRG > INPUT_01 (the variable which has been added to Contact):
Select Lamp1 and in Properties select Variable. In the window Input Assist select Application > PLC_PRG > OUTPUT_01 (the variable which has been added to Coil):
With the connections made, we expect that o toggling the input DipSwitch, the output Lamp1 also toggles. To test, download the project for the device. Click the Online menu and select Login (always choose download):
With the project downloaded and online, the following screen will be shown and the project will be in the STOP state:
To start the application, click on play:
At this point, the application will be in the RUN state. On the Visualization the elements can already be tested. Pressing the DipSwitch should light the Lamp1 on.
The Visualization feature also adds to the project the WebVisualization. Click on Visualization Manager -> WebVisualization on project tree. In the WebVisualization tab you can find the settings:
You can open your browser and remotely connect to the web visualization tool using the board IP address and port 8080:
Triggering the DipSwitch will act both on the WebVisualization of the browser as in development environment Visualization:
To complement this demo, you can also run a web browser in full screen (kiosk) mode for WebVisualization on a touch screen connected to the device. We use the Torizon base Weston container as the graphical backend and a container running Chromium to serve the WebVisualization locally.
A docker-compose.yaml file is provided to orchestrate the containers bring-up in Toradex GitHub:
Bring-up the three required containers - CODESYS, Weston, and Chromium - by running docker-compose in daemon mode:
Warning: stop any previously running CODESYS container before executing the command below.
# wget https://raw.githubusercontent.com/toradex/codesys/master/docker-compose.yaml # docker-compose up -d
See the collapsible section below if you want to bring-up each container manually, one at a time, instead of using docker-compose:
If you want to build the CODESYS demo container by yourself for any reason, the Dockerfile and related resources are publicly available in our GitHub:
This container is a demonstration meant solely for evaluation purposes. For more information and custom requests (for instance if you need a solution ready to deploy on the field) please contact one of our partners BE.services, 3S-Smart Software Solutions GmbH or neXo.
Displays and Monitors used in Embedded Systems are available in a myriad of configuration possibilities - resistive, capacitive or without touch, single or multi-touch, different resolution, density of pixels, pin-out and clock frequency are some examples.
To make things easy for you, Toradex provides specific instructions on how to use its display offerings as well as comprehensive information about how to interface your custom display or monitor to Toradex modules.
There are three tested and recommended displays by Toradex:
You can easily set-up and get them running with 3 steps explained on Setting up Recommended Displays with Torizon. If you prefer to configure a specific display, it is suggested the reading about the easy to use Torizon device tree overlays container on Device Tree Overlays. If you need to calibrate the touch screen, learn how on Touch Screen Calibration (Torizon).
These release notes are strictly related to the test of the CODESYS Partner Demo Container in Toradex hardware. They are not related to the CODESYS releases.