Home/PLC Solution Library/OpenPLC
OpenPLC with industrial PLCs
OpenPLC is open source PLC software. You write the program in the OpenPLC Editor with IEC 61131-3 languages such as Ladder Diagram and Structured Text, and run it on the OpenPLC Runtime on a Linux computer or upload it as firmware to an Arduino or ESP32 based board, including M-Duino, Ardbox and ESP32 PLC controllers.
Open source·Editor v4.2.11 is the latest release (checked October 2026)·M-Duino, Ardbox and ESP32 PLC mapped by Industrial Shields
What OpenPLC is made of
OpenPLC has two main parts. The Editor is where you write and simulate the program; the Runtime is what executes it. For microcontroller boards, the Editor compiles the program and uploads it to the board, so the board itself becomes the PLC.
OpenPLC Editor
Desktop application to write the program in Ladder Diagram, Structured Text and other IEC 61131-3 languages, simulate it and debug it live. It also transfers the program to the target.
OpenPLC Runtime
The Runtime v4 runs IEC 61131-3 programs on Linux computers and in Docker, and the Editor controls it remotely. The Runtime v3 repository is archived.
IEC 61131-3 addressing
Every input and output has an IEC address: %IX and %QX for digital signals (two indexes, as in %QX1.0), %IW and %QW for analog ones (one index). Analog values go from 0 to 65535.
When OpenPLC makes sense, and when it does not
The same Industrial Shields PLC can be programmed with OpenPLC, with the Arduino IDE or, on the Raspberry PLC, with CODESYS. The right tool depends on your team and on what the project needs.
| Criterion | OpenPLC | Arduino IDE | CODESYS |
|---|---|---|---|
| Languages | OpenPLCLadder, Structured Text and other IEC 61131-3 languages | Arduino IDEC++ (Arduino) | CODESYSIEC 61131-3 languages |
| Industrial Shields families in our guides | OpenPLCM-Duino, Ardbox, ESP32 PLC | Arduino IDEArduino and ESP32 based PLCs, with the Industrial Shields boards package | CODESYSRaspberry PLC |
| Licence | OpenPLCOpen source | Arduino IDEOpen source | CODESYSCommercial, the runtime needs a licence |
| Strong point | OpenPLCPLC style programming, simulation and Modbus without writing C++ | Arduino IDEDirect access to every library and communication port of the PLC | CODESYSStandard environment that many integrators already use |
| Watch out for | OpenPLCHTTP and other protocols need Arduino extensions in C++; analog values must be scaled | Arduino IDENo Ladder: you write the scan logic yourself | CODESYSNot documented by Industrial Shields for Arduino or ESP32 based PLCs |
Choose OpenPLC if
- Your team already thinks in Ladder or Structured Text and does not want to write C++.
- The logic is mainly digital inputs and outputs, timers, counters and sequences.
- You need the PLC as a Modbus RTU or Modbus TCP slave.
- You are teaching, prototyping or starting a DIY PLC project that will move to DIN rail hardware.
Choose another tool if
- The project depends on Wi-Fi, Bluetooth, LoRa, 4G, SD cards or OTA updates: the Arduino IDE gives direct access to them.
- The customer or the integrator works with CODESYS: use it on the Raspberry PLC.
- You need a safety function such as an emergency stop: use safety rated devices, whatever the software.
- You need vendor support for the software itself: OpenPLC is community supported.
Not sure which controller fits? Read Arduino PLC vs ESP32 PLC vs Raspberry Pi PLC.
How OpenPLC works with Industrial Shields PLCs
Four guides cover the whole path, from a first Ladder program on an Arduino Mega to C++ code running next to the Ladder diagram on an M-Duino, Ardbox or ESP32 PLC. Each card sums up the guide; open it for the full steps and screenshots.
First steps with OpenPLC and Arduino Mega
Starts from the Blink example, explains why the built-in LED (PWM pin 13) is the analog output %QW11, adds a MOVE block, simulates the program and transfers it to the board.
Using Modbus on Arduino Mega with OpenPLC
Turns the board into a Modbus RTU slave from the Communications tab and shows how IEC addresses become coils (%QX1.1 is coil 9), tested with a master simulator.
Using ESP32 PLC, M-Duino and Ardbox with OpenPLC
Installs the Industrial Shields mod, explains the default I/O mapping (%IX1.4 matches I1_4), how to switch an analog output to digital and how to add an Arduino extension.
External variables in OpenPLC for Arduino extensions
Shares BOOL, UINT and STRING variables between the Ladder diagram and C++ code, with the analog scaling factors for each PLC family.
More OpenPLC guides
- Live debugging with OpenPLCDebug a remote PLC while it runs.
- MQTT on M-Duino with OpenPLCPublish an input value to an MQTT broker.
- MQTT on M-Duino with OpenPLC and Raspberry PLCThe Raspberry PLC runs Mosquitto as the broker.
- HTTP on M-Duino with OpenPLCOpenPLC has no native HTTP, so an Arduino extension does it.
- OpenPLC on M-Duino 42+Written before M-Duino was officially supported; kept for reference.
- Mapping any M-Duino PLC for OpenPLCManual mapping from before the official support.
OpenPLC compatibility by PLC family
Only what our guides and the official OpenPLC documentation state. The scaling factors apply to values read or written from an Arduino extension, because OpenPLC uses 0 to 65535 for analog signals.
| Family | Based on | Status in OpenPLC | Analog scaling in Arduino extensions | Guide |
|---|---|---|---|---|
| M-Duino | Based onArduino Mega | Status in OpenPLCSelectable board with the Industrial Shields mod. Digital addresses follow the PLC names (%IX1.4 is I1_4); relays are digital outputs; switchable outputs start as analog. | Analog scaling in Arduino extensionsanalogRead × 64, analogWrite ÷ 256 | GuideESP32 PLC, M-Duino and Ardbox |
| Ardbox | Based onArduino Leonardo | Status in OpenPLCSelectable board with the Industrial Shields mod. | Analog scaling in Arduino extensionsanalogRead × 64, analogWrite ÷ 256 | GuideESP32 PLC, M-Duino and Ardbox |
| ESP32 PLC (all models except the 14) | Based onESP32 | Status in OpenPLCSelectable board with the Industrial Shields mod. | Analog scaling in Arduino extensionsanalogRead × 32, analogWrite ÷ 16 | GuideExternal variables |
| ESP32 PLC 14 | Based onESP32 | Status in OpenPLCSelectable board with the Industrial Shields mod. | Analog scaling in Arduino extensionsanalogRead × 16, analogWrite ÷ 16 | GuideExternal variables |
| Raspberry PLC | Based onRaspberry Pi | Status in OpenPLCNo OpenPLC I/O mapping published by Industrial Shields. The OpenPLC Runtime v4 runs on Linux, but the PLC inputs and outputs would need a hardware layer we do not provide. Our guides use it as the MQTT broker for an M-Duino running OpenPLC. | Analog scaling in Arduino extensionsNot applicable | GuideMQTT with Raspberry PLC |
| Arduino Mega (maker board) | Based onArduino Mega | Status in OpenPLCSupported by OpenPLC. The built-in LED on PWM pin 13 is %QW11. | Analog scaling in Arduino extensionsNot covered in our guides | GuideFirst steps |
The Industrial Shields mod was published in 2024 for the OpenPLC Editor of that time. OpenPLC Editor v4 is a new application: before you start a project, check that your model appears in its board list, or ask us. For the Raspberry PLC, see CODESYS on the Raspberry PLC.
How to start with OpenPLC on an industrial PLC
- Install the OpenPLC Editor.Download it from the official site, autonomylogic.com, and open it once before adding anything to it.
- Add the Industrial Shields boards.Install the Industrial Shields mod in the OpenPLC Editor folder, as explained in the M-Duino, Ardbox and ESP32 PLC guide, and check that your model is in the board list.
- Start from an example and simulate it.Open the Blink example, run the simulation and watch the variables change before you touch the hardware, as in the first steps guide.
- Map your variables to the PLC inputs and outputs.Give each variable its IEC address and check the exact mapping of your model in the I/O Config menu of "Transfer Program to PLC".
- Transfer the program to the PLC.Select the board and the port and click "Transfer to PLC". If you need Modbus RTU or Modbus TCP, enable it in the Communications tab first, as in the Modbus guide.
- Add C++ only where you need it.Use an Arduino extension with the Industrial Shields libraries for what Ladder cannot do, and share data with external variables, as in the external variables guide.
Prefer C++? Follow how to install the Industrial Shields boards in the Arduino IDE and browse the PLC Solution Library for working code by function.
See this kind of logic working
Sequences, conveyors and Modbus networks on the same PLC families. These projects are not necessarily programmed with OpenPLC; they show what the logic has to do.
Case studies
Frequently asked questions about OpenPLC
What is OpenPLC?
OpenPLC is an open source PLC software suite. The OpenPLC Editor is used to write programs in IEC 61131-3 languages such as Ladder Diagram and Structured Text. The OpenPLC Runtime runs those programs on Linux computers, and the Editor can also compile them and upload them to microcontroller boards such as Arduino and ESP32.
Can I use OpenPLC with Arduino?
Yes. The OpenPLC Editor compiles the program and transfers it to the board over USB. Our first guide does it with an Arduino Mega. Industrial Shields M-Duino (Arduino Mega based) and Ardbox (Arduino Leonardo based) PLCs can be selected as boards after installing the Industrial Shields mod for the OpenPLC Editor.
Does OpenPLC work on the ESP32?
Yes, OpenPLC can compile programs for ESP32 boards. The Industrial Shields ESP32 PLC family is included in the Industrial Shields mod, together with M-Duino and Ardbox.
In Arduino extensions, analogRead values are multiplied by 32 (by 16 on the ESP32 PLC 14) and analogWrite values are divided by 16 to match the OpenPLC range of 0 to 65535.
What is the current version of OpenPLC?
The current generation is OpenPLC Editor v4 and OpenPLC Runtime v4, published by Autonomy Logic. When we checked in October 2026, the latest Editor release on GitHub was v4.2.11.
The OpenPLC Runtime v3 repository is archived. Our Industrial Shields mod was published in 2024 for the Editor available then, so check that your model appears in the board list of the Editor you install.
Is OpenPLC free and open source?
Yes. The OpenPLC Editor is published under the GPL-3.0 licence and the OpenPLC Runtime v4 under the MIT licence, both on the Autonomy Logic GitHub account. There is no runtime licence to buy for the controller.
Should I use OpenPLC or CODESYS?
Both use IEC 61131-3 languages. OpenPLC is open source and runs on Arduino and ESP32 based PLCs such as M-Duino, Ardbox and ESP32 PLC.
CODESYS is a commercial environment used by many integrators; its runtime needs a licence, and Industrial Shields documents it on the Raspberry PLC. Choose by the hardware you need and by what your team already knows.
Can I build a DIY PLC with OpenPLC?
Yes. An Arduino Mega or an ESP32 board with OpenPLC is a common way to learn PLC programming. For a real machine, the inputs and outputs must handle 24 V signals, noise and DIN rail mounting, which is why the same program is usually moved to an industrial controller such as an M-Duino, Ardbox or ESP32 PLC.
Is OpenPLC suitable for industrial use?
It can run control logic on industrial hardware, but you have to validate the application yourself: OpenPLC is community supported, and it is not a safety controller. Emergency stops and other safety functions must use safety rated devices, whatever software runs the rest of the machine.
What open source PLC software is there?
OpenPLC is the best known open source suite that covers both programming (Editor) and execution (Runtime) with IEC 61131-3 languages. Beremiz is another open source IEC 61131-3 environment. If you prefer C++ instead of PLC languages, the Arduino IDE and the Industrial Shields boards package are also open source.