The tikz-ladder package contains a collection of symbols for
typesetting ladder diagrams (PLC program) in agreement with the
international standard IEC-61131-3/2013. It includes blocks
(for representing functions and function blocks) besides
contacts and coils. It extends the circuit library of TikZ and
allows you to draw a ladder diagram in the same way as you
would draw any other circuit.