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

How prevalent is ladder logic for new industrial systems?

Over two decades ago I was programming a Foxboro PLC in their SALL language, which was compiled down to C. Variables and control structures! And you could hack the C if you wanted your state transitions to go faster.




For Boolean logic ladder is still a good visual representation that can be animated to make it obvious which inputs are determining the output.

In Allen Bradley rslogix it can be entered quickly using the keyboard.

In my opinion the ladder paradigm is poor when dealing with numeric values, and function block better serves the purpose there


I work for a subsidiary of a large industrial equipment manufacturing company, ladder logic is ubiquitous. At least across our partners and the plants we operate within. It's usually written by former electricians called "controls engineers", not software engineers, because it mimics relay diagrams. Controls engineers tend to live completely within the software ecosystem. I've known few who were comfortable with even "structured text" routines. One of the major advantages my company has is that they hire software engineers to produce custom featured HMIs for customers, and train on ladder logic.


In my opinion Ladder logic is easiest to troubleshoot, as cause and effect can be easily followed, especially when being connected online and seeing the signaling. Unless events are too quick. Then no language has the advantage. Then data trace is helpful.

Structured Text is superior when it comes to calculations, bit manipulation and code flow (loops, conditionals etc). Sequences diagrams are advantageous for abstracting sequences. Function Block Diagrams are good for connecting abstractions. They all have their place imo, except Instruction List, which I can’t think of having a single advantage.


It's sadly bread and butter, if you order a typical PLC program made-to-measure you'll get ladders. Anyway custom languages are certainly not the way to go, IEC 61131-3 languages are virtually always used, LD being most popular and SFC also gets its share.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: