Hacker News new | past | comments | ask | show | jobs | submit login

Those schematics look surprisingly similar to ladder logic. I always thought that ladder logic for programming PLCs makes absolutely no sense compared to a proper programming language, but now I see that it does make quite a lot of sense if you're trying to get electrical engineers who used to design actual physical logic circuits into programming PLCs.



Wikipedia says:

> The motivation for representing sequential control logic in a ladder diagram was to allow factory engineers and technicians to develop software without additional training to learn a language such as FORTRAN or other general-purpose computer language.

> Ladder logic can be thought of as a rule-based language rather than a procedural language. A "rung" in the ladder represents a rule. When implemented with relays and other electromechanical devices, the various rules execute simultaneously and immediately.

(from https://en.wikipedia.org/wiki/Ladder_logic)

The combination of both statements entertains me, because while defenders of imperative languages might even admit that they are worse languages, they still cling on to the notion that imperative is easier to teach or understand and that other approaches requires genius level intellect. When it's mostly about what you are familiar with that determines what approach feels easy.

(Different approaches still differ in how well they can express or maintain your program whilst making errors harder to make, of course.)


> I see that it does make quite a lot of sense if you're trying to get electrical engineers who used to design actual physical logic circuits into programming PLCs

It was specifically designed for electricians (sparkies), not electrical engineers. And indeed, it’s intuitive with that background. Junior engineers struggle at first, but ladder logic is an elegant language for the problem domain.


Tim Hunkin did a video on PLCs and the like, and talks about precisely that, as memory serves. His videos are also a treasure.


Not so much the EEs, but the techs who are troubleshooting/tweaking in the field




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: