Portada » Implementing CODESYS on a Raspberry Pi

Implementing CODESYS on a Raspberry Pi

by admin
49 views

This thesis project illustrated a Raspberry Pi microcontroller being used as a replacement for an industrial-grade programmable logic controller (PLC) in a data-collection application. The application, Inspector, is a tool for factory production monitoring provided by a Finnish automation company InSolution Oy, which was the commissioning party of the thesis project.

Inspector is comprised of a PLC application collecting real-time data and a web application. The PLC data-collection application normally uses PLCs manufactured by Beckhoff, whereas in this project a program with the same functionality was implemented on a Raspberry Pi in CODESYS programming environment.

In the implementation part of the project, changes were made to the original program to transfer it from TwinCAT to CODESYS environment.

Most of the modifications were related to reference libraries, communication to the web client application over TCP/IP and the date and time interface. This part of the project also included the configuration of the inputs and outputs using Raspberry Pi GPIO and Horter I2C input modules.

CODESYS runtime system was installed and programmed on a Raspberry PI microcontroller using CODESYS Control for Raspberry Pi SL extension. The package supports multiple communication interfaces of Raspberry Pi, such as I2C, GPIO, One-wire, etc., as well as CODESYS WebVisu visualisation, and several fieldbus protocols. (CODESYS Control for Raspberry Pi SL, 2019).

On the computer side CODESYS software was installed, version 3.5 SP14 Patch 2. In addition to that, “CODESYS Control for Raspberry Pi SL” module was downloaded from official CODESYS store and installed. The functionality of this package allows to connect to the Raspberry Pi from PC and install CODESYS runtime on it. With this package installed, the PLC code written in the software on the computer can be downloaded to the microcontroller and executed, the same way as on common PLCs.

Add

Related News