AnthonyMujic
ladder_parser - ladder logic parsing with Nx
I don’t have a computer science background, so I’m not sure if there is a better way of doing this, but I had a great time parsing ladder logic using Nx.
Ladder logic is a graphical programming language for PLCs (programmable logic controllers) that was designed to mimic electrical schematics. Ladder logic is popular in industrial settings and has been for decades. I thought it would be useful to be able to transform ladder logic into Elixir.
The solution I settled on was to convert the text that represents a rung to a matrix, then scan the matrix looking for certain symbols.
Not sure if there are many control systems engineers in the elixir community, but hopefully someone finds this approach useful.
First Post!
cmo
Hi @AnthonyMujic. I’m a control systems engineer too
. I’ve seen some talks on creating a web based IDE and IEC 61499 implementation.
Question: what PLCs use this ACSII format for ladder logic? I’m used to Rockwell stuff, i.e writing XIC XIO OTE etc. Do you know if IEC 61131 defines a standard for the textual representation?







