Skip to content

tommy-berg/SimplePLC

Repository files navigation

SimplePLC

CMake

SimplePLC is a lightweight, software-based PLC designed for educational use, simulations, and small-scale automation projects.


Features

  • Modbus TCP & OPC UA servers
  • Lua scripting for control logic
  • 100ms cyclic execution with hot-reload
  • Cross-platform (Linux, macOS, Windows)

Getting Started

Build

mkdir build && cd build
cmake ..
make

Dependencies

Linux

sudo apt install libmodbus lua open62541

macOS

brew install libmodbus lua open62541

Run

Ensure the following files are in the same folder (examples in scripts folder):

  • settings.ini
  • active.plc (optional) world.plc

Then run:

./SimplePLC

Download

Build it yourself or get pre-built binaries from GitHub Releases.


Credits