AiVibe

PLC & Industrial Control

Ladder Logic (Ladder Diagram, LD)

Ladder logic is a graphical PLC programming language, standardised as ladder diagram in IEC 61131-3, that represents control logic as rungs of contacts and coils between two vertical power rails, mirroring the relay circuit diagrams it replaced.

A ladder program consists of horizontal rungs placed between a left and a right power rail. Each rung combines contacts, which test the state of a Boolean variable such as an input or internal bit, in series for AND logic and in parallel branches for OR logic. When a continuous logical path exists, power flow energises the coil on the right, setting an output or memory bit. Rungs can also call timers, counters, comparisons, maths and function blocks, and are generally evaluated from top to bottom during each scan.

Because it resembles electrical relay schematics, ladder logic is readable by electricians and maintenance technicians, which has made it one of the most widely used PLC languages, particularly for discrete machine control and interlocking. Online monitoring displays live power flow on each rung, which helps fault-finding on the shop floor.

Ladder suits Boolean logic but becomes unwieldy for complex arithmetic, string handling, data structures or long sequences, where structured text, function block diagram or sequential function chart are clearer. Good practice includes consistent tag naming, comments, avoiding duplicate coils for the same output and structuring code into routines. Changing logic on a running machine can create unsafe states, so edits follow site change control and OEM guidance.

Key points

Where AiVibe comes in

AiVibe designs and manufactures the AiAmbA AI Factory, whose edge devices and AI agents let people talk to PLC, CNC and robot controllers in plain language. Agents only propose changes, a trained operator confirms each one, and the AI Factory never replaces a machine's control or safety systems.

Explore AiVibe’s work in PLC & Industrial Control →

Related terms

Terms that refer to Ladder Logic (Ladder Diagram, LD)

Ask AiMuruga can explain Ladder Logic (Ladder Diagram, LD) for your plant, product or security programme, and draw how it fits.