Skip to main content
Szymon "Dagryl" Palczynski
Automation Software Engineer
View all authors

Why Gemma-4-31B is a gem for PLC logic — and why I couldn't ship it

· 17 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

Relay, the AI assistant inside Rungs Studio, runs on Google's Gemini-3-Flash. It's currently free, I want to keep it free, and every message sent costs me about a cent. That sounds trivial until you multiply it by a user base that keeps growing — so I went looking for a model that was just as good at PLC code but cheaper to run.

Relay is a tutor — it won't write a student's program for them, it nudges one step at a time. So why benchmark raw code generation at all? Because of a failure mode I kept watching. When a student is stuck on an exercise, Relay sometimes reasons its way to a wrong first answer and only corrects itself a few turns later, once the compiler and the unit tests push back. For a patient student that detour can build real understanding. More often it misleads and wears them out. The fix is a model good enough to one-shot the solution to every exercise on learn.rungs.dev — because one-shotting is the closest proxy I have for actually understands the problem, and a model that understands the problem is far less likely to walk a student into a wall. So I benchmarked models on three things: tutoring conversations, generating Structured Text, and generating Ladder Logic.

What I found was a model that writes Ladder Logic as well as Gemini for roughly a tenth of the price. And then I couldn't use it. This is the story of both halves.

Why Relay reads your PLC logic better than ChatGPT

· 4 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

A user was building cylinder-control logic in Studio. A cylinder is a piston that extends and retracts; a limit switch is a small sensor at the end of its travel that turns on once the cylinder gets there. His program kept raising an extending-timeout fault — after he gave the extend command, the logic waited for that "I've arrived" signal, never got it, and assumed the cylinder had jammed. The only way to clear the fault was to switch the limit switch on by hand in the simulator. He couldn't understand why he had to fake a signal like that.

AI-assisted PLC learning

· 4 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

Relay is the AI tutor built into Rungs Studio — the chat panel on the right side of the editor. It looks like every other AI chatbot, but every turn it sees your actual rungs and tag definitions. When you ask "is it correct?", it isn't guessing — it's reading the code you just wrote.

Rungs Studio 0.7.0

· 4 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

0.7.0 is the biggest ladder release since the editor shipped, and most of the changes bring Rungs Studio a step closer to Studio 5000 Logix Designer®. You can edit tag defaults straight from the rung, use math inside array indexes, print a full AOI from the toolbar, and arithmetic now matches what a real Logix controller would do.

Ladder Logic Editor

· 3 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

Ladder Logic was always planned as the main language at rungs.dev (hence the name). It wasn't my first choice for the MVP because building such an editor takes a lot of effort, and Monaco is readily available. Structured Text was a reasonable choice to ship quickly.

rungs.dev Manifesto

· 5 min read
Szymon "Dagryl" Palczynski
Automation Software Engineer

rungs.dev is a tool we're building to make PLC programming easier, especially for people who write AOIs (Add-On Instructions), teach automation, or just want to test and share logic without hardware or expensive licenses. It's early in development - most features are still missing - but the core idea is simple: isolate logic, test it fast, and document it automatically.