External Publication
Visit Post

Jneopallium + Apache PLC4X: Safe, Auditable Autonomy for Legacy Industrial PLCs

Hugging Face Forums [Unofficial] May 18, 2026
Source

Hey Hugging Face community!

If 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:

  • One unified Java PlcConnection API for S7, Modbus TCP, EtherNet/IP, ADS, Allen-Bradley, Profinet, and more.

  • The same safety invariants used in Jneopallium’s autonomous-AI architecture: interlocks → operator override → clamp → rate-limit → diff-suppress → audit.

  • Phased rollout (SHADOW → ADVISORY → AUTONOMOUS) so you can observe what the model would do before it ever touches a real actuator.

  • Full JSONL audit trail for every decision — perfect for regulatory compliance and post-incident review.

  • Zero compile-time dependency on PLC4X in the core bridge (you add only the drivers you need).

Result? You can run a biologically-inspired neuron network (PIDLoopNeuron + SafetyGateNeuron + HarmDiscriminator, etc.) against a real PLC today — safely.Quickstart in under 10 minutes

  1. Add the dependency (Maven)

xml

<repositories>
  <repository>
    <id>gitlab-jneopallium</id>
    <url>https://gitlab.com/api/v4/projects/44434192/packages/maven</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.rakovpublic.jneopallium</groupId>
    <artifactId>worker</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>
  1. Add PLC4X drivers (only what you need)

xml

<dependency>
  <groupId>org.apache.plc4x</groupId>
  <artifactId>plc4j-driver-s7</artifactId>
  <version>0.12.0</version>
</dependency>
<dependency>
  <groupId>org.apache.plc4x</groupId>
  <artifactId>plc4j-driver-modbus</artifactId>
  <version>0.12.0</version>
</dependency>
  1. Minimal YAML config (plc4x-bridge.yml)

yaml

connections:
  - id: "OPENPLC"
    connectionString: "modbus-tcp://127.0.0.1:502?unit-identifier=1"

reads:
  - bindingId: "DEMO-COIL"
    connectionId: "OPENPLC"
    fieldAddress: "coil:0"
    signalTag: "DEMO.COIL.0"
    pollIntervalMs: 500

writes: []
events: []

audit:
  localAuditFile: "/tmp/jneopallium-plc4x-audit.jsonl"
  writeRejectedToAudit: true

perTagSafetyMode:
  DEMO-COIL: SHADOW

tickInterval: "PT0.5S"
  1. Bootstrap in Java (copy-paste ready)

java

Plc4xConfig cfg = Plc4xConfigLoader.load(Paths.get("plc4x-bridge.yml"));

try (var audit = new Plc4xAuditOutput(Paths.get(cfg.audit().localAuditFile()));
     var svc = new Plc4xClientService(new Plc4xRealDriver(), cfg)) {

    svc.connect(); // validates every address at startup

    var measIn = new Plc4xMeasurementInput("plc4x-meas", svc, cfg.reads());
    var eventIn = new Plc4xEventInput("plc4x-events", svc, cfg.events());
    var agg = new Plc4xCommandOutputAggregator(svc, cfg, audit);

    worker.registerInput(measIn);
    worker.registerInput(eventIn);
    worker.registerOutputAggregator(agg);

    worker.run();
}

That’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:

  1. InterlockSignal → immediate fail-safe value (non-overridable)

  2. OperatorOverrideSignal check

  3. SHADOW / ADVISORY / AUTONOMOUS mode enforcement

  4. Clamp + rate-limit + diff-suppress

  5. Full JSONL audit record (verdict + reason + evidenceNeurons)

You 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:

  • More Plc4xDriver adapters (especially for less-common protocols or custom S7 PUT/GET wrappers)

  • Domain-specific neuron models for process control (oscillation detection, cascade-loop tuning, predictive maintenance)

  • Hugging Face Spaces demos — imagine a live OpenPLC + Jneopallium demo where you tweak safety parameters in the browser

  • Documentation & examples in other languages (we love community translations!)

  • Performance benchmarks on real PLC hardware

The 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

  • Repo: https://github.com/rakovpublic/jneopallium

  • PLC4X bridge manual (full PDF in attachments): Jneopallium_PLC4X_Manual_EN.docx

  • Industrial process control module docs: see the full review paper (also attached)

  • OpenPLC smoke-test Docker: docker run -p 502:502 -p 8080:8080 openplc/openplc_v3

Drop a comment below with:

  • What PLC brand/protocol you’re running

  • Whether you want a ready-made Hugging Face Space demo

  • Any specific safety or auditing feature you’d love to see next

We 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? Fork the repo, run the stub driver test, and tell us what you built. We can’t wait to see it!

-– Dmytro Rakovskyi & the Jneopallium team (BSD 3-Clause — use it, fork it, ship it)

Discussion in the ATmosphere

Loading comments...