Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

This tutorial series aims to transform the Raspberry Pi into an industrial controller using CODESYS. The previous article introduced how to boot the Raspberry Pi and start an SSH connection. Today, we will discuss how to install CODESYS Runtime on the Raspberry Pi.

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

CODESYS Runtime is a software system that can transform the current operating system into an industrial controller, thus also known as a soft PLC. To install CODESYS Runtime on the Raspberry Pi, the following conditions need to be prepared:

  1. CODESYS Integrated Development Environment. I am using CODESYS V3.5 SP17 (64bit), which can be downloaded from the CODESYS website;

  2. CODESYS Raspberry Pi installation package: CODESYS Control for Raspberry Pi SL (single-core Raspberry Pi), which can be downloaded from the CODESYS store or by replying with the keyword ‘Raspberry Pi package’ on the bottom of the ‘Fangzheng Zhixin’ WeChat official account;

Note: The CODESYS Raspberry Pi installation package comes in single-core and multi-core versions, both require authorization. The unauthorized version can run for two hours before needing a restart. CODESYS Runtime will automatically run each time the Raspberry Pi is restarted.

Next, we will introduce how to install the CODESYS Raspberry Pi software package.

First, start the CODESYS Integrated Development Environment – CODESYS V3.5, click on [Tools] – [Package Manager], and in the pop-up dialog, click [Install], browse to locate the downloaded Raspberry Pi installation package (CODESYS Control for Raspberry Pi SL), as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

Next, just click [Next] all the way, and soon you will see the following dialog:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

On the surface, it seems the installation is finished, but it actually requires closing the CODESYS development environment to continue. At this point, you need to click the [Finish] button, then close CODESYS V3.5, and you will see a new installation interface, as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

Wait for it to finish installing, then restart CODESYS V3.5. You will notice that a new menu [Update Raspberry Pi] has been added under the [Tools] menu. Click it, and a device control window will appear on the left side, as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

Enter your Raspberry Pi username and password in the Username and Password fields, enter the Raspberry Pi’s static IP address, and click the [Install] button under [CODESYS Runtime Package] to start the installation of CODESYS Runtime. The installation process is quick, and once completed, you can click the [System Info] button to see the relevant information.

At the bottom of the control window, there are [Runtime] start and stop buttons. By default, the runtime starts automatically upon installation, and you can control it to stop. Click the [Configure] button to configure the runtime mode: standard mode or multi-core mode; currently, I choose standard mode.

Next, let’s test it.

Create an empty project in CODESYS V3.5, add the device [CODESYS Control for Raspberry Pi SL], scan the network, and find the Raspberry Pi, as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

Click the [OK] button, and you will see that the device is in an active state, as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

Click the [Login] menu, and the device can go online successfully, indicating that the Raspberry Pi CODESYS Runtime has been successfully installed and is running, as shown in the figure below:

Building a Raspberry Pi Industrial Controller with CODESYS: Installation Guide

So far, we have successfully transformed the Raspberry Pi into a controller. Next, we can write PLC programs that comply with IEC 61131-3 and experience the fun of programming with CODESYS. My Raspberry Pi has been online for nearly two hours without any disconnection, and it is still very stable.

My WeChat video account shares industrial control knowledge, welcome to watch:

Leave a Comment

Your email address will not be published. Required fields are marked *