News for hackers. Stuff that matters.

Ask HN: Is there a high level language option for PLC programming

I'm looking at refreshing in ladder logic to support some PLC programming. After years of programming on the PC ladder logic feels like a steep backwards. Are there any more high level options? I'm hoping that there might be a tool that compiles to ladder logic. I'm also suspecting that this is far too niche.
( 5 comments | 2 points | on HN )
Re:Ask HN: Is there a high level language option for PLC pro... by the_only_law on Monday November 22, 2021 @10:06PM (#29314177)
There’s a Pascal like language called structured text[0], but that may not be exactly what you’re working for. I hear it’s not used much in production and the tooling for the cheaper hobbyist-tier PLCs don’t tend to support it.

[0]https://en.m.wikipedia.org/wiki/Structured_text

Re:Ask HN: Is there a high level language option for PLC pro... by slopdo on Tuesday November 23, 2021 @06:37AM (#29316656)
Structured Text is one of the programming languages at Part 3 of the International Standard IEC 61131 for Programmable Logic Controllers [0]. In my (european) experience it is commonly used in production.

Later, IEC 61499 for Distributed Systems [1] extended the IEC 61131 with (among others) event-driven control.

On the open source ecosystem, Eclipse 4diac [2] might be interesting as it provides a full PLC framework including IDE and Runtime Environment.

[0]https://en.wikipedia.org/wiki/IEC_61131-3 [1]http://www.iec61499.de/ [2]https://www.eclipse.org/4diac/

Re:Ask HN: Is there a high level language option for PLC pro... by airbreather on Monday November 22, 2021 @11:10PM (#29314505)
Structured Text, if you want to try it our download CoDeSys for free, it includes a simulator.

In production environments it is most often encapsulated in FBD.

Re:Ask HN: Is there a high level language option for PLC pro... by PaulWaldman on Monday November 22, 2021 @11:35PM (#29314641)
Is there a specific PLC vendor or model you're interested in targeting?
Re:Ask HN: Is there a high level language option for PLC pro... by xupybd on Tuesday November 23, 2021 @12:18AM (#29314830)
Yeah I'm working with Delta PLCs