This project demonstrates the convergence of IT (Linux) and OT (Industrial Control) by transforming a high-performance Raspberry Pi 5 into a PLC.
Using the CODESYS Control Runtime, this system executes real-time logic for sensor data processing and provides a web-based Human-Machine Interface (HMI) for operator control.
Traditionally, industrial automation requires two separate hardware devices: a PLC for logic and a dedicated HMI panel for visualization.
This project demonstrates the modern PC-based automation approach (similar to Beckhoff CX or WAGO PFC architectures), where a single multicore processor handles both tasks:
- Core Logic: The CODESYS Runtime executes IEC 61131-3 logic in real-time.
- Visualization: The WebVisu server hosts the HMI, accessible via any HTML5-compliant browser (tablets, phones, desktops).
By virtualizing these functions on a Raspberry Pi 5, we achieve a high-performance, cost-effective Industrial Edge Controller that bridges the gap between IT and OT.
Figure 1: Real-time WebVisu HMI controlling logic on the Raspberry Pi.
- 🧠 Structured Logic: Implements
Sensor_Data.projectusing Structured Text (ST) to simulate and process analog signal data. - 📊 Integrated HMI: Features a WebVisu dashboard accessible via any browser on the local network.
- ⚡ High-Performance: Leverages the Raspberry Pi 5 (16GB RAM).
| Category | Specification |
|---|---|
| Controller | Raspberry Pi 5 (16GB RAM) |
| OS | Raspberry Pi OS (Debian Bookworm) |
| IDE | CODESYS Development System V3.5 |
| Runtime | CODESYS Control for Raspberry Pi SL |
Ensure you have the CODESYS Development System installed on your PC. You also need to install the Raspberry Pi package:
- Open CODESYS Installer.
- Search for and install: "CODESYS Control for Raspberry Pi SL".
- Clone this repository:
https://github.com/FlameAutomation/CODESYS-for-Raspberry-Pi-PLC.git
- Open
src/Sensor_Data.projectin CODESYS. - Update Gateway: Double-click the "Device" node and scan for your Pi's IP address.
- Login & Download: Press
Alt+F8to login and load the runtime. - Start: Press
F5to run the PLC.
Open your web browser and navigate to:
http://<YOUR_PI_IP>:8080/webvisu.htm
