Conveyor Sorting Cell โ a virtual PLC commissioning rig
A narrow, demo-ready, technically credible digital twin of a single conveyor sorting cell: real industrial protocols, a deterministic plant model, and a soft-PLC you can swap for OpenPLC. Built for PLC training and virtual commissioning โ not a generic factory sim.
The HMI and demo report are regenerated from the scenario suite on every push to main.
A zero-install, high-performance operator console: replays deterministic traces, or goes live over a stdlib WebSocket to drive the running twin.
Hand-rolled, standards-compliant Modbus TCP server/client (+ pymodbus), real OPC UA (asyncua), and MQTT telemetry.
Fixed-dt lock-step plant model. Scenarios are bit-reproducible โ same input,
same result, every run.
Swappable soft-PLC with a sample IEC 61131-3 Structured Text program for OpenPLC. A tag registry is the single source of truth.
An 8-slot destination ring sorts dense streams correctly where a single-register cell mis-routes them.
Every cycle, sort, fault and state change logged to SQLite with CSV/JSON export and an optional live MQTT sink.
112 tests pass (7 skip without optional deps) across 32 dual-mode test files; CI matrix across Python 3.9โ3.13 on Ubuntu & Windows. The core needs zero third-party packages.
pip install git+https://github.com/aydogandagidir/conveyor-sorting-twin
openlogitwin # โถ launch the web HMI (replay + live)
# or from a clone โ no install:
git clone https://github.com/aydogandagidir/conveyor-sorting-twin
cd conveyor-sorting-twin
python -m openlogitwin # the web HMI
python -m openlogitwin test # full suite โ SUITE GREEN
python -m openlogitwin demo # every scenario โ demo report