Tiza Group

Home / Guides / Industry and automation

Free PLC Simulation and Tools: OpenPLC

Practice and validate PLC programs without hardware: OpenPLC, manufacturer simulators, and test environments, and what they cannot replace.

By Shadai García, CEO and protection engineer at Tiza Group.

editorcompileST · LD · FBDruntimePC o RPithe same program, unchanged,runs in the simulator or on the real equipmentscan cycle in the runtime:read inputs → program → write outputsruntimePC o RPisimulated I/Omodelphysical I/Oprocesstesting without riskon the real installationsimulate first, then connect to the equipmentChainEditorCompilationRuntimeE/SProcess© tizagrp.comeditorcompileST · LD · FBDruntimePC o RPithe same program, unchanged,runs in the simulator or on the real equipmentscan cycle in the runtime:read inputs → program → write outputsruntimePC o RPisimulated I/Omodelphysical I/Oprocesstesting without riskon the real installationsimulate first, then connect to the equipmentChainEditorCompilationRuntimeE/SProcess© tizagrp.com
PLC simulation: editor, compilation, and runtime with simulated or physical I/O over a process model. Location in the system and operating principle. Illustrative: real values come from the nameplate and the manufacturer's manual.
Short answer

A PLC program can be written and tested without a physical controller using manufacturer simulators and open environments such as OpenPLC, which supports the five IEC 61131-3 languages and runs on Windows, Linux, Raspberry Pi, and several boards. Simulation validates the logic, not real time or wiring.

Short answer

You do not need a controller on the desk to learn to program or to validate a project’s logic. There are three paths: manufacturer simulators (which run the program of their own brand), software controllers such as the open-source OpenPLC, and plant models that reproduce the process to close the loop. None replaces testing with the real equipment, but they shorten commissioning time and avoid finding logic errors with the motor already wired.

OpenPLC

OpenPLC is an open-source project with two pieces:

  • Editor: a desktop application, available for Windows, Linux, and macOS, for writing programs in the five IEC 61131-3 languages.
  • Runtime: the program that executes the compiled code. It runs as a software controller on Windows or Linux, and on hardware such as the Raspberry Pi, some Arduino boards, the ESP8266 and ESP32, among other platforms the project mentions.

The license is open source, with no license fee for the software. Its authors declare version 3 of the main repository end of life and are developing a successor. Before basing a project on it, check the official repository to see which version is still maintained.

Reasonable uses: training, logic prototypes, demonstrations, test benches, and low-risk projects. For processes where a failure endangers people or production, an industrial controller with manufacturer support is used.

Manufacturer simulators

The major manufacturers offer a simulator that runs the program of their own controller on the computer, with a panel to activate inputs and watch outputs. Some also publish training courses and books with a registered account, such as Siemens educational material. Others offer the programming software as an evaluation version for a limited period. The terms change: check the manufacturer’s site and do not assume they can be used for commercial purposes.

OptionWhat it simulatesLimit
Manufacturer simulatorThe program of its brand, with manual inputs and outputsThat brand only; without the process
Software controller (OpenPLC and similar)Execution on a computer or boardLess support and fewer certifications than an industrial controller
Process modelA simulated tank, conveyor, or motor that responds to the outputsIt has to be built; its fidelity defines the value of the test
Real hardware on a benchReal controller, modules, and pushbutton panelsCosts more and requires assembly

What is validated in simulation and what is not

What can be tested without the real equipment?
  • Is it about the logic (interlocks, sequences, states)?
    • Yes: Simulation, activating inputs and verifying outputs
    • No: Is it response time, noise, or wiring?
      • Yes: It can only be tested with the real equipment
      • No: Evaluate with a process model if needed

What is validated well: interlock logic, sequences, alarms, scaling calculations, and mode logic. What is not validated: wiring, polarity, noise, real contactor and valve times, communication with external equipment, behavior on power loss. These verifications belong to field testing.

Illustrative example: testing the start-stop of the 15 kW motor

Assumed data: start-stop logic for the 15 kW, 400 V motor (see ladder), loaded into a simulator.

TestInputsExpected output
StartPress start with stop and overload healthyContactor output on
Seal-inRelease startThe output stays on
StopPress stopThe output drops
OverloadOpen the overload contact while runningThe output drops
Broken wireSimulate stop openThe motor does not start
RestartStop and restart the simulator with the output onThe motor does not start on its own

These six tests take minutes in simulation and avoid discovering an error with the motor running. The same table, run later on the real panel, becomes the commissioning test protocol.

A reasonable workflow

  1. Define the logic and the expected tests before programming.
  2. Program with symbols and blocks per piece of equipment.
  3. Simulate each block with its cases, including faults.
  4. Test the whole, with a simple process model if the loop matters.
  5. Load into the real controller, without the power load, and verify inputs and outputs point to point.
  6. Test with the process, gradually.
  7. Save the program backup and the final documentation.

What a process model provides

With the program under test, the model acts as a “virtual plant”: when the pump output turns on, the level of a simulated tank rises; when the level reaches the sensor, the corresponding input changes. This allows testing complete sequences, supervision times, and responses to simulated faults (stuck sensor, valve that does not open) without touching the equipment. The model does not need to be exact in its physics; it is enough that it reproduces the qualitative behavior and approximate times. If the model is too optimistic, the test gives false confidence: that is why it is checked against real times at commissioning.

Using simulation for training

For learning, the simplest route is to start with combinational logic (interlocks), continue with timers and counters (timers and counters), then sequences, and finally analog scaling and control. Each exercise comes with a test table like the one in the example. A good exercise is to program the same problem in two languages and compare the clarity of each solution.

Licenses and terms of use

Each tool has its own terms. Open-source software is governed by its license, which for OpenPLC is of the copyleft type: whoever distributes modifications must respect its terms. Manufacturers’ training material usually allows educational use, and its commercial use or redistribution depends on the terms the manufacturer publishes. Open books have their own licenses; for example, Hugh Jack’s PLC text is published under a license that requires attribution and excludes commercial use. Before integrating a tool into a client’s project, review the license and keep a record of the version used. Also verify that the final controller does not depend on evaluation software.

Common mistakes

  • Taking logic as correct just because it passed simulation.
  • Simulating only the happy path, without faults or simultaneous conditions.
  • Using evaluation versions for commercial purposes without checking the license.
  • Confusing a prototype with an industrial system.
  • Not backing up the project after testing.
  • Forgetting that the simulator does not reproduce the scan time of a physical controller.
  • Loading into the controller without verifying that the version matches the one tested.
  • Not documenting the tests that were done.

Checklist

  • Test list defined before programming.
  • Fault cases included (broken wire, trip, signal loss).
  • Restart after a power loss simulated.
  • Tool license reviewed for the intended use.
  • Test results recorded.
  • Final program backed up with date and version.
  • Field verification planned, not replaced by simulation.

Frequently asked technical questions

  • What is needed to get started with OpenPLC? A computer and the editor; for tests with physical signals, a compatible board.
  • Can a simulator be connected to an HMI? Many software controllers expose their data over industrial networks such as Modbus RTU and TCP, and an HMI can read them.
  • Are there process simulators? Modeling tools exist; a simple model can also be programmed in the PLC itself.
  • Is it useful for certifying a program? No. System certification or acceptance is done with formal tests.

How we help

Simulation reduces risk, but the system is accepted with field tests, protocols, and records. At Tiza Group we do the control design, the tests, and the commissioning with traceable documentation. See engineering design and studies and testing and commissioning, or write to us through contact.

References

  • OpenPLC, project repository on GitHub (GPL-3.0 license, version 3 marked end of life).
  • CNX Software, article on OpenPLC and its supported platforms (2022).
  • Siemens SCE, training documents (account required).
  • Hugh Jack, Automating Manufacturing Systems with PLCs (CC BY-NC-SA 3.0 US).

Frequently asked questions

What is OpenPLC?

An open-source project with a program editor and a runtime that runs on computers and boards such as the Raspberry Pi. It supports the five IEC 61131-3 languages. It is useful for training, prototypes, and non-critical projects.

Will a program that works in simulation work in the plant?

The logic will, if the simulator reproduces the signals well. Wiring, real scan time, electrical noise, and equipment behavior are not tested. Commissioning with the real equipment is still necessary.

Can OpenPLC be used in an industrial installation?

For critical applications, an industrial controller with support, certifications, and warranties is advisable. OpenPLC is used mainly to learn, simulate, and build prototypes.

Are manufacturer simulators free?

It depends. Some manufacturers offer time-limited evaluation versions, training material with a registered account, or paid-license software. The terms change and should be checked on the manufacturer's site.

WhatsApp