{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreia4qd53byoabrcjpa2ywcdzgyq3gdyapqan2okhkxr5of4qnnt4wq",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mm4norkdbqv2"
},
"path": "/t/jneopallium-apache-plc4x-safe-auditable-autonomy-for-legacy-industrial-plcs/176086#post_1",
"publishedAt": "2026-05-18T08:41:08.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"Apache PLC4X",
"https://github.com/rakovpublic/jneopallium",
"https://gitlab.com/rakovpublic/jneopallium"
],
"textContent": "Hey Hugging Face community!\n\nIf you’ve ever stared at a factory floor full of 20-year-old Siemens S7s, Modbus TCP pumps, and Beckhoff ADS controllers and thought, “How do I bring modern AI here without blowing up the plant?” — this post is for you.Jneopallium (the open-source Java framework for biologically-grounded neuron networks) now ships a production-ready PLC4X bridge. It lets you connect your typed-signal neuron models directly to real legacy fieldbus hardware using the battle-tested Apache PLC4X library — while inheriting the exact same safety ladder that powers Jneopallium’s industrial process control module.Whether you’re a controls engineer curious about AI, a neuro-AI researcher who wants real-world deployment, or a contributor who loves making industrial systems smarter, this bridge is your on-ramp.Why this matters (and why it’s different)Most factories run a “long tail” of controllers that pre-date OPC UA. Traditional SCADA/PLC programming is brittle. Deep-learning models are black boxes with zero safety guarantees.Jneopallium’s PLC4X bridge gives you the best of both worlds:\n\n * One unified Java PlcConnection API for S7, Modbus TCP, EtherNet/IP, ADS, Allen-Bradley, Profinet, and more.\n\n * The same safety invariants used in Jneopallium’s autonomous-AI architecture: interlocks → operator override → clamp → rate-limit → diff-suppress → audit.\n\n * Phased rollout (SHADOW → ADVISORY → AUTONOMOUS) so you can observe what the model would do before it ever touches a real actuator.\n\n * Full JSONL audit trail for every decision — perfect for regulatory compliance and post-incident review.\n\n * Zero compile-time dependency on PLC4X in the core bridge (you add only the drivers you need).\n\n\n\n\nResult? You can run a biologically-inspired neuron network (PIDLoopNeuron + SafetyGateNeuron + HarmDiscriminator, etc.) against a real PLC today — safely.Quickstart in under 10 minutes\n\n 1. Add the dependency (Maven)\n\n\n\nxml\n\n\n <repositories>\n <repository>\n <id>gitlab-jneopallium</id>\n <url>https://gitlab.com/api/v4/projects/44434192/packages/maven</url>\n </repository>\n </repositories>\n\n <dependencies>\n <dependency>\n <groupId>com.rakovpublic.jneopallium</groupId>\n <artifactId>worker</artifactId>\n <version>1.0-SNAPSHOT</version>\n </dependency>\n </dependencies>\n\n\n 2. Add PLC4X drivers (only what you need)\n\n\n\nxml\n\n\n <dependency>\n <groupId>org.apache.plc4x</groupId>\n <artifactId>plc4j-driver-s7</artifactId>\n <version>0.12.0</version>\n </dependency>\n <dependency>\n <groupId>org.apache.plc4x</groupId>\n <artifactId>plc4j-driver-modbus</artifactId>\n <version>0.12.0</version>\n </dependency>\n\n\n 3. Minimal YAML config (plc4x-bridge.yml)\n\n\n\nyaml\n\n\n connections:\n - id: \"OPENPLC\"\n connectionString: \"modbus-tcp://127.0.0.1:502?unit-identifier=1\"\n\n reads:\n - bindingId: \"DEMO-COIL\"\n connectionId: \"OPENPLC\"\n fieldAddress: \"coil:0\"\n signalTag: \"DEMO.COIL.0\"\n pollIntervalMs: 500\n\n writes: []\n events: []\n\n audit:\n localAuditFile: \"/tmp/jneopallium-plc4x-audit.jsonl\"\n writeRejectedToAudit: true\n\n perTagSafetyMode:\n DEMO-COIL: SHADOW\n\n tickInterval: \"PT0.5S\"\n\n\n 4. Bootstrap in Java (copy-paste ready)\n\n\n\njava\n\n\n Plc4xConfig cfg = Plc4xConfigLoader.load(Paths.get(\"plc4x-bridge.yml\"));\n\n try (var audit = new Plc4xAuditOutput(Paths.get(cfg.audit().localAuditFile()));\n var svc = new Plc4xClientService(new Plc4xRealDriver(), cfg)) {\n\n svc.connect(); // validates every address at startup\n\n var measIn = new Plc4xMeasurementInput(\"plc4x-meas\", svc, cfg.reads());\n var eventIn = new Plc4xEventInput(\"plc4x-events\", svc, cfg.events());\n var agg = new Plc4xCommandOutputAggregator(svc, cfg, audit);\n\n worker.registerInput(measIn);\n worker.registerInput(eventIn);\n worker.registerOutputAggregator(agg);\n\n worker.run();\n }\n\n\nThat’s it. You now have MeasurementSignals and AlarmSignals flowing into your neuron network, and ActuatorCommandSignals flowing back out — all protected by the full safety chain.Real-world safety ladder (you don’t have to implement this)Every write goes through:\n\n 1. InterlockSignal → immediate fail-safe value (non-overridable)\n\n 2. OperatorOverrideSignal check\n\n 3. SHADOW / ADVISORY / AUTONOMOUS mode enforcement\n\n 4. Clamp + rate-limit + diff-suppress\n\n 5. Full JSONL audit record (verdict + reason + evidenceNeurons)\n\n\n\n\nYou can literally watch the model learn in SHADOW mode for 24 h, promote to ADVISORY (needs operator confirmation), then AUTONOMOUS — all without touching a single line of bridge code.Want to contribute?We’re actively looking for:\n\n * More Plc4xDriver adapters (especially for less-common protocols or custom S7 PUT/GET wrappers)\n\n * Domain-specific neuron models for process control (oscillation detection, cascade-loop tuning, predictive maintenance)\n\n * Hugging Face Spaces demos — imagine a live OpenPLC + Jneopallium demo where you tweak safety parameters in the browser\n\n * Documentation & examples in other languages (we love community translations!)\n\n * Performance benchmarks on real PLC hardware\n\n\n\n\nThe bridge is deliberately thin (~1500 lines of core safety code you never touch). Your contribution can be as small as a new driver or as big as a full end-to-end use-case for a particular industry.Get involved today\n\n * Repo: https://github.com/rakovpublic/jneopallium\n\n * PLC4X bridge manual (full PDF in attachments): Jneopallium_PLC4X_Manual_EN.docx\n\n * Industrial process control module docs: see the full review paper (also attached)\n\n * OpenPLC smoke-test Docker: docker run -p 502:502 -p 8080:8080 openplc/openplc_v3\n\n\n\n\nDrop a comment below with:\n\n * What PLC brand/protocol you’re running\n\n * Whether you want a ready-made Hugging Face Space demo\n\n * Any specific safety or auditing feature you’d love to see next\n\n\n\n\nWe read every comment and ship contributor PRs fast.Let’s make legacy industrial control biologically smart — safely, audibly, and together.Ready to wire your first neuron to a real PLC?\nFork the repo, run the stub driver test, and tell us what you built. We can’t wait to see it!\n\n * GitHub: https://github.com/rakovpublic/jneopallium\n\n * GitLab mirror + Maven packages: https://gitlab.com/rakovpublic/jneopallium\n\n\n\n\n-– Dmytro Rakovskyi & the Jneopallium team\n(BSD 3-Clause — use it, fork it, ship it)",
"title": "Jneopallium + Apache PLC4X: Safe, Auditable Autonomy for Legacy Industrial PLCs"
}