Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to work on GE's programmable logic controller product on the realtime OS side. PLCs are primarily programmed in ladder logic (https://en.wikipedia.org/wiki/Ladder_logic) and we had a full graphical UI to do that. IIRC (its been nearly 30 years) we also had a parser that parsed text based ladder logic diagrams to drive the OS tests.


Ladder logic is sort of a similar case right? Supposedly it derives from notation for documenting relay racks in factory automation that could very well date to the 1800s. And it's a pretty brilliant implementation - you don't need a degreed engineer or C programmer to set up fairly sophisticated concurrent system with it.


The idea behind that is neat. And well, the conversion from the ladder diagram to PLC bytecode is intentionally so trivial that it can be done by hand if the ladder diagram is drawn in certain way (which is the way the first PLCs were programmed).

Then there is the reality: every single one of Simatic projects I have seen was done by “PLC programmers” and had this peculiar feature of using the abstractions the wrong way around. Straightforward logic written as Instruction Lists (ie. assembly that produces the bytecode) and things that were straightforward sequential programming built from ridiculously complex schematic diagrams.


Heh. It figures. Sometimes when I see things like that I wonder if it's featherbedding and gatekeeping. If it looks too straightforward, people might not think what you do is very hard. See the schematic discussion elsewhere in this thread for another example


Yes it is very similar and as you say the notation lets you define really complex concurrent logic.


Any Ladder logic editor would have two views: the block view and the text view. I used to work on Siemens PLCs. I started using only the block view, but over time migrated to only using the text view. Now, I understand that the text view is basically a kind of Assembler. I liked it because I was able to think and visualize things in my head much better using text. But for simple flows, and people not versed in programming, the only option, really, is the block view.




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

Search: