I’m building a PLC at work right now. A Soft PLC that runs on a Raspberry Pi. Ladder and C# live in one program, with AI on top.

Development is far enough along now. So I figured it’s time to start writing down how it went.

An Old Annoyance

I’ve been doing industrial automation contract work for 18 years.

There was a stretch when smart factories were all the rage, and naturally the requests came in. Given how our company leans, I mostly built the part that analyzes a system and pulls signals out of it. My job was to grab data from the PLC and push it up to a server. Simple stuff.

Except it stopped being simple once it kept repeating. Every site collects different signals, speaks a different protocol, has a different memory map. The reporting format for the server is different, and of course so is the UI. Same kind of program, written differently every single time. What a waste.

Couldn’t the PLC just throw its data straight into a DB? Wouldn’t it be great if it could just call the server API itself? That thought never left my head.

I did toy with designing a shared schema, building a bridge module, making the collector generic. The numbers never work out, obviously. So I did what I’d always done: stick a Raspberry Pi next to the PLC, or stand up one more PC, and run the collection program there.

The usual two-layer setup - a Raspberry Pi or PC parked next to the PLC running the collection program

This comes up all the time. Putting middleware on the equipment side for signal conversion or some separate processing is incredibly common. And work this common gets old fast. It’s the kind of job that turns into pure grind.

It’s an annoyance I’ve carried around for years, and it came back every single time.

An Unfamiliar Convenience

Work is easier these days. Thanks to AI.

The first time I used it, my reaction was “huh, this actually works.” Then I kept getting surprised, over and over. Now AI writes better code than I do. A lot better.

Refactoring a library, writing an Arduino control program, putting together AI workflow docs. Completely different kinds of work, and AI beat my expectations every time. I started trusting it, bit by bit. Honestly, at this point I can’t picture developing without it.

I trust it, but if I’m being honest it still feels strange, and a little scary. Not that I can walk away from it. The times have changed, and you keep up or you don’t.

So lately I’ve been trying to bolt AI onto as much as I can. I’ve tried it on a few of the company’s products, on side projects and library work, and on contract jobs too, when the client agrees.

Then out of nowhere: wait, couldn’t I put AI on ladder too?

If it writes code this well, why not ladder? Ladder is logic in the end. It’s just a picture drawn with contacts and coils.

And I’ve actually built ladder from the ground up before. Years ago I wrote a ladder editor that turned what the user drew into Arduino code, and I’ve written a ladder engine in C# that ran the basics. So I knew. This isn’t some vague idea. It’s doable.

I wanted to give the PLC people around me a taste of this same unfamiliar convenience.

A Horrible Hybrid

So I threw it all in together. Raspberry Pi, ladder, C#, and AI. Old and new, industrial and web, humans and AI. A combination that has no business working together. A hybrid, a real mutt.

The four pillars of Senbrix - Raspberry Pi, Ladder, C#, AI

Raspberry Pi. Cheap, everywhere, stable. Instead of expensive, closed proprietary hardware, I picked a board you can get anywhere.

Ladder. Machine control stays with ladder. Exactly as it’s used on the floor. Contacts, coils, interlocks. There was no reason to mess with something that already ran fine.

C#. Ladder calls C# methods (functions), and C# shares the PLC memory. With that, the PLC grows wings and can go anywhere.

AI. And AI writes the ladder and the code. The human just says what they want. Design, implementation, verification, AI helps with all of it. That “couldn’t this work for ladder too” thought landed right here.

Whether this turns into a horrible hybrid or something actually usable, I still can’t tell, even this far into development. But I gave this thing of unknown origin a name anyway: Senbrix.


From Part 2 on, it’s the story of actually building it. Starting with how ladder and C# ended up in one program, and how I designed that with AI.