Why Does Ladder Logic Look Like a Ladder?
Ladder logic was invented in the 1970s as a replacement for physical relay panels. Before PLCs, factories controlled equipment using thousands of relays wired together. Electricians designed these circuits on diagrams that looked like a ladder: vertical rails on the left and right (the power rails), with horizontal rungs representing the control logic between them.
When the first PLCs arrived, engineers realized they could make them display the same visual format. This was brilliant because electricians already understood how to read these diagrams. There was no learning curve. Power flowed down the left rail, through the contacts (switches), and if the conditions were met, it energized the coil (output) on the right.
This design decision has been so successful that ladder logic is still the dominant PLC programming language 50 years later. It's easy to read, easy to troubleshoot, and intuitive for anyone with an electronics background.
How Does Ladder Logic Work?
Understanding ladder logic requires understanding the PLC scan cycle. Here's how it works:
- Read inputs
The PLC reads all physical input signals (buttons, sensors, limit switches) and stores them in memory as tag values (BOOL variables, typically 0 or 1).
- Execute logic
The PLC scans every rung of ladder logic from top to bottom, left to right. For each rung, it evaluates all the input conditions. If they are all true, the output (coil) executes and the corresponding output tag changes state.
- Write outputs
After all rungs are executed, the PLC writes all output tag values to the physical output hardware (motors, lights, solenoids).
- Repeat
The cycle repeats continuously. On a typical PLC, this happens 10–50 times per second depending on the program size and configuration.
This predictable scan cycle is why ladder logic works reliably in industrial settings. Every decision is made the same way, every cycle, with no ambiguity.
What Are Contacts and Coils?
Ladder logic has two basic building blocks: contacts and coils. You must understand these to read any program.
XIC checks if a tag bit is 1 (true/on). It's true when the condition is met. In the ladder diagram, it's drawn as a pair of parallel vertical lines. Think of it like a switch you must press to close — by default it's open, but when you press it, power flows through.
XIO checks if a tag bit is 0 (false/off). It's true when the condition is NOT met. In the ladder diagram, it's drawn as two parallel lines with a diagonal slash through them. Think of it like a switch held down — it's normally closed, but when you press it, it opens and stops power flow.
OTE turns a tag bit ON when all input conditions are true. It's drawn as a circle. This is the action that happens when the rung is satisfied. When the rung is false, the output turns off.
OTL turns a tag bit ON and keeps it ON even after the input conditions become false. It's drawn as a circle with an "L" inside. The only way to turn it off is with OTU (Output Unlatch).
OTU turns a tag bit OFF. It's drawn as a circle with a "U" inside. Used to reset latched outputs.
These five instructions form the foundation of all ladder logic. Everything else (timers, counters, comparisons) are built on top of these basic concepts.
What Other Instructions Are in Ladder Logic?
Beyond basic contacts and coils, ladder logic includes many more instructions:
TON (Timer ON) starts a timer when the input becomes true and counts up. When it reaches the preset value, the timer output bit energizes. TOF (Timer OFF) counts down when the input becomes false. RTO (Retentive Timer) keeps its accumulated time even after power loss.
CTU (Count Up) increments a counter each time the input transitions from false to true. CTD (Count Down) decrements. RES (Reset) resets the counter to zero. Counters are used for counting discrete events like items on a conveyor or machine cycles.
GRT tests if one value is greater than another. LES tests if less than. EQU tests if equal. NEQ tests if not equal. These are used for conditional branching based on numeric values.
Basic arithmetic operations. ADD adds two numbers. SUB subtracts. MUL multiplies. DIV divides. The result is stored in a destination tag.
MOV copies a value from one tag to another. COP copies entire arrays. Used for data manipulation and signal routing.
The key point: ladder logic can do far more than basic relay logic. It's a complete programming language that can perform calculations, make decisions, and control complex sequences. But the syntax and visual format remain graphical and intuitive.
Is Ladder Logic Used in Allen-Bradley PLCs?
Yes. Allen-Bradley Studio 5000 Logix Designer supports ladder logic as the primary programming language for ControlLogix and CompactLogix controllers. These are the most common industrial PLCs in North America.
Allen-Bradley uses tag-based ladder logic, meaning you create named variables (tags) instead of using numeric addresses. For example, instead of addressing an input as "I:1/0", you create a tag called "StartButton" or "PumpRunning". This makes the code much more readable and maintainable.
Studio 5000 also supports other languages — Structured Text (similar to traditional programming) and Function Block Diagram (graphical, block-based). But ladder logic remains the most common and the first language you should learn for Allen-Bradley systems.
See real Allen-Bradley ladder logic
Upload an ACD or L5X file to plc.company. Every rung is displayed in your browser exactly as it appears in Studio 5000. Click any rung to get a plain-English explanation.
How Do I Start Reading Ladder Logic?
Now that you understand the basic concepts, here's how to read your first rung:
- Start from the top rung
PLCs execute rungs from top to bottom. Find the topmost rung and work your way down.
- Read left to right
On each rung, start from the left power rail and read toward the right. Identify all the input contacts (conditions).
- Identify the condition logic
Are the contacts in series (all must be true) or in parallel (any can be true)? Series contacts are written one after another. Parallel contacts are stacked vertically.
- Find the output on the right
At the right end of the rung is the output (coil). This is what happens when the input conditions are satisfied.
- Understand what the tag names mean
In real programs, tag names are descriptive: "StartButton", "PumpMotor", "HighTemperatureAlarm". The names tell you what the logic is controlling.
- Trace the signal flow
Use Studio 5000's cross-reference feature or plc.company's tag viewer to see where each tag is used throughout the program. This shows you the complete flow of control.
For a complete walkthrough with examples, see our guide How to Read Ladder Logic.
View Ladder Logic Without Software
The biggest barrier to learning ladder logic is that you need expensive software to view it. Studio 5000 costs $1,300–$7,000.
You can work around this by uploading your ACD or L5X files to plc.company. The browser-based viewer displays ladder logic exactly as it appears in Studio 5000, without any software required. Click individual rungs to see plain-English explanations of what each instruction does. Use the tag cross-reference tool to trace signal flow through the entire program.
This is the fastest way to learn ladder logic — by reading actual production code from real plants, not example programs from textbooks.