Just in case anyone wonders whether the OpenPLC runtime can be used at industrial scale — and equipped with serious industrial communications features — we’re here to say: it absolutely can.
A little over three years ago, we reached out to Thiago for some basic project guidance. Since then, we have taken the OpenPLC project — completely unmodified at its core — and evolved it into the fully-tested OpenSIM DCS platform, which continues to grow and expand.
Project Overview:
OpenSIM DCS (Distributed Control System) is an experimental synthetic plant control architecture, built atop the OpenPLC core, designed to simulate real-world industrial control environments.
Originating from the expansion of earlier OpenPLC project architectures, OpenSIM DCS pushes OpenPLC runtime capabilities into full DCS-scale operation, involving hundreds of mapped I/O points, synthetic device models, and scalable virtual plant instances.
I/O Mapping Summary:
256 Discrete Inputs (DI) — %IX0.0 through %IX31.7
256 Discrete Outputs (DO) — %QX0.0 through %QX31.7
128 Analog Inputs (IW) — %IW0 through %IW127
128 Analog Outputs (QW) — %QW0 through %QW127
128 Holding Registers (MW) — %MW0 through %MW127
OpenSIM DCS was created to stress-test synthetic field device simulation, memory allocation, modular system expansion, and (recently) Step 7 protocol compatibility under OpenPLC.
Project Goals:
Validate OpenPLC runtime behavior at high I/O density
Demonstrate scalable synthetic plant instance management
Explore hybrid integration with fieldbus protocols and soft/hardware hybrid simulation
Maintain full transparency of memory structures for SCADA/DCS modeling
PAC-LEVEL Inter-communications Using the OpenPLC PSM (Python Sub Module)
OpenSIM DCS is not just a controller program — it is a full synthetic Distributed Control System (DCS) built atop OpenPLC, designed to simulate both industrial field equipment and their associated process behaviors.
The project includes a universal library of Process Organization Units (POUs) representing simulated physical devices (pumps, transformers, rectifiers) as well as dynamic physics models (energy flow, dynamic loading, ramping, random process disturbances, etc.).
OpenSIM DCS leverages the OpenPLC runtime’s Python Sub Module (PSM) integration point to build a custom communication manager, supporting large synthetic DCS operations across distributed virtualized PLCs (VPLCs).
Why the Python Sub Module (PSM) Was Adapted:
While the OpenPLC OEM team provided the Python Sub Module feature to extend runtime capabilities, OpenSIM DCS adapted this hook to build a resilient peer-to-peer communication system, overcoming MODBUS address space limitations inherent in large-scale simulation projects.

In OpenSIM DCS, the PSM integration enables synthetic plant instances to connect, exchange data, and maintain synchronized runtime states across virtual PLCs — without corrupting or conflicting with OpenPLC’s internal I/O memory maps.
Key Features of OpenSIM DCS PSM Usage:
Connection Acceptance:
The OpenSIM DCS PSM accepts incoming TCP/IP connections from external clients seeking structured field data exchange.
Peer Connection Establishment:
The PSM also initiates outbound connections to peer controllers, creating resilient two-way data meshes across synthetic field systems.
Robust Re-connection Logic:
Designed for harsh simulation conditions, lost sessions are detected and restored automatically through simple but reliable recovery patterns.
Parallel Operation with OpenPLC Core:
The PSM operates alongside OpenPLC’s main runtime cycle, ensuring simulation communication does not block, interfere with, or compromise core I/O processing.
Scalability for Large Virtual Plants:
By managing sessions independently, OpenSIM DCS can scale across dozens of VPLCs without burdening the core OpenPLC process scheduling.

Examples of Current Simulation Blocks (POUs):
SIM_RECTIFIER – Models a DC rectifier energy block with full upstream/downstream partner connectivity
SIM_TRANSFORMER – Models a three-phase transformer with energy intensity and phase simulation
SIM_DYNAMIC_LOAD – Represents variable load conditions in mechanical or electrical systems
SIM_AC_TRACTION_MOTOR – Simulates an AC traction motor under changing operational parameters
SIM_CROWN_BLOCK – Synthetic hoisting and mechanical energy conversion dynamics
SIM_VFD – Simulates a Variable Frequency Drive controlling synthetic motors
SIM_PLUMBING, SIM_VESSEL, SIM_MUD_PUMP – Simulated fluid handling and pressure systems
Project Architecture and Scaling:
OpenSIM DCS operates by managing hundreds of I/O points mapped across virtualized PLC instances.
As the OpenPLC Editor was not originally designed for projects of this magnitude, a dedicated OpenSIM DCS Manager subsystem was developed to directly manipulate project files at the source level.

Key Tools Developed to Support Scaling:
Bulk I/O Insertion: Direct plc.xml editing to add or modify hundreds of I/O mappings efficiently for large plant instances.
External Code Editing: Structured Text (ST) blocks managed outside the OpenPLC Editor to allow large modular POUs to be maintained cleanly.
Parser Upgrades: With the move to JSON project formats in the new OpenPLC Editor, OpenSIM DCS Manager will be upgraded to parse, generate, and modify .json project structures cleanly, ensuring continued support for bulk editing and modular development.
Why a Simulated DCS is Necessary:
Synthetic Testing Environments: For educational, research, and pre-deployment testing where real plants or hardware are impractical or unsafe.
Control System Development: To validate complex control strategies, failover systems, or plant-wide operational procedures without requiring physical equipment.
Training Simulators: To create realistic training environments for control room operators or field technicians.
Cost Reduction: Enabling full cycle testing and procedural validation without the capital costs of building a dedicated hardware testbed.
OpenSIM DCS continues to expand, evolving into a platform capable of supporting synthetic plant models of increasing complexity —
integrating control, physics simulation, and modular scalability within an open-source control architecture.
Acknowledgments:
This project would not have been possible without the OpenPLC project itself.
Sincere thanks to the developers and contributors who made this exploration feasible.
Status:
OpenSIM DCS currently operates in a virtualized environment (ProxMox) using full resource-segmented VPLCs (Virtual PLCs) and OpenPLC runtime cores.
112 Simultaneous instances have been run on the ProxMox platform on a Dell R620, 32 Xeon Cores and 128 GB RAM without driving the load beyond 6%, and that's WITH two full-desktop Windows VMs running, Win 10, and Win 11.
Further expansion will test multi-agent integration and networked synthetic control meshes.

What you see above is barely the beginning, and the screens look the way they do because I have no idea what they will eventually need to look like. Suffice it to say that the GUI does flow nicely, and we have tear-off, dockable windows in case they become handy, but the other tabs to the right are a huge mess of QT Creator experimentation. Clicking on any of the icons does drill-down to their represented units, or clicking on any of them in the "Status and logs" list, but there is much work to be done on the drag-drop editors and toolbox.
Because the simulator projects running inside of the OpenPLC instances are "universal" and interconnectable, they present a multitude of challenges in connecting them together easily to form simulated systems. This is further complicated by each simulated system having multiple levels of user-selectible precision to enable varying levels of performance and accuracy, and to provide the opportunity to configure a responder to be "quick and dirty" when high precision is not demanded, but increasing levels of "dual entity bookkeeping" (yes, dual ENTITY) where systems dynamics are carefully accounted for along a chain of "physics-based" dynamic simulations. This allows loads to feedback to their drivers, to provide accurate representation of mass balanced against energy delivery.
ANYWAY, this is no small feat using the raw OpenPLC editor, the holy grail being to use the OpenSIM DCS Manager to write .st code representing entire OpenPLC projects "on the fly", meaning that the Manager must access the file system of the LXC hosing the instance, upload the project to it, then hijack the OpenPLC web-based DOM to login and force program update and compilation.
No pressure.
But if I can pull this off, a user should be able to connect one or more of the "SIM_GENERATOR" routines, to the "SIM_RECTIFIER", to the "SIM_VFD", to the "SIM_TRACTION_MOTOR", to the "SIM_GEARBOX", to the "SIM_DRAWWORKS_DRUM", to the "SIM_CROWN_BLOCK", to hoist a "SIM_LOAD", each of these logical entities defining their upstream and downstream partners, and each having bi-directional channels which account for energy transfer and losses throughout a chain of devices as a simulation runs.
There are "SIM" routines to cover every conceivable, common industrial scenario, including valve controllers, vessels, steam transfer, heat exchangers, piping and plumbing, flowmeters, level sensors, and the list goes on.
A drag and drop interface seems more than suitable, but is a large project which I will be returning to very soon.