- Four Basic Concepts in Ladder Logic:
- What are Rungs and Rails in PLC Ladder Logic?
- What is a Rung in Ladder Logic?
- What is a Rail in Ladder Logic?
- Input and Output Representations in Ladder Logic
- How PLC Rungs Work: Explained with Simple Cases
- Case 1: Normally Open (NO) Contact
- How does Rung work in NO contact?
- Case 2: Normally Closed (NC) Contact
- How does Rung work in NC contact?
- What do the rails and rungs on a ladder diagram represent?
- Simple Visual Representation of a Rung and Rail
- How Ladder Logic is Executed in PLC
- Summary Table of ladder Diagram Operation
- Test Your Knowledge in PLC (Programmable Logic Controller) Knowledge
Especially in industrial automation, the Ladder Diagram (LD) is among the most often used programming languages in Programmable Logic Controllers (PLCs). It is meant to be identical to the electrical relay control circuits electricians are already familiar with. This makes it perfect for managing automation systems, processes, and machines.
A ladder diagram consists of vertical and horizontal lines, much like the sides and steps of a physical ladder. Understanding the idea of rungs and rails is absolutely necessary if one is to properly design or evaluate ladder logic; similarly, as is knowledge of other basic building blocks.
Four Basic Concepts in Ladder Logic:
- Branches: Used to generate parallel routes inside a rung, branches
- PLC Inputs and Outputs: These are the outside devices linked to the PLC.
- Instructions and Addressing: Commands deciding the logical behaviour are instructions and addressing.
- Rungs and Rails: The structural framework of the ladder diagram.
- In this section, we’ll focus on rungs and rails and how they form the backbone of ladder logic programming.
What are Rungs and Rails in PLC Ladder Logic?
What is a Rung in Ladder Logic?
Rungs in ladder logic are horizontal lines on the ladder diagram that represent logical control statements.
A Rung is a horizontal line in the ladder diagram representing a logical control statement. Typically, each rung finishes with an output instruction (such a coil); every rung has one or more logical instructions (like input conditions).
The PLC scans rungs one by one from top to bottom throughout each cycle; rungs are assessed left to right. The output instruction at the ending of a rung is run if the logic in a rung evaluates as true.
Example Rung

Withe reference the ladder diagram in above picture
- [ Q1 ]: Represents an output device (like a lamp or motor).
- This rung means: “If I1 is ON, then turn ON Q1.”
Every rung functions as a single logical command or rule in your control system. Depending on the amount of processes and control logic in your project, you may have as many rungs as required.
Learn about ladder diagram: Understanding Basic Parts of Ladder Diagram (LD) in PLC Programming
What is a Rail in Ladder Logic?
Referring to the above digram, Rails are the two vertical lines flanking the ladder diagram. They represent the power supply lines; all reasoning has to run between these rails.
- The left rail represents the positive or active line (L+ or Phase).
- The right rail represents the negative or neutral line (L- or Ground).
Starting from the left rail and ending at the right rail, every rung in the ladder diagram creates a logical flow of “current” from left to right. This design mimics the idea of current flow in a real electrical circuit.
The program runs on constant rails. Acting as set limits for every rung, they provide form to the whole ladder logic diagram.
Explore PLC logic gates: Logic Gates in PLC Programming: A Guide with Truth Tables and Ladder Logic Diagrams
Input and Output Representations in Ladder Logic
Ladder logic programming uses unique symbols to show inputs and outputs. These symbols mimic how real-world electrical circuits’ physical components, such switches and coils, function.
The image that follows illustrates the ladder digram with input contact and output coil symbol.

PLC Input Instructions:
Normally Open (NO) Contact: –[ ]–
- This contact allows current (logic) to pass only when the input is ON.
Normally Closed (NC) Contact: –[\]–
- This contact allows current (logic) to pass only when the input is OFF.
Understand PLC redundancy types: Understanding PLC Redundancy: Cold, Warm & Hot Redundancy
PLC Output Instructions:
Output Coil (NO): –( )–
- This activates the output device when the logic path is true.
Output Coil (NC): –(\)–(Negated coil)
- This turns OFF the output device when the logic path is true (inverted logic).
Usually, outputs are actuators like relays linked to the PLC‘s output terminals, lamps, buzzers, or solenoids.
Explore PLC hardware types: PLC Hardware: Modules,Types, Functions, and Applications
How PLC Rungs Work: Explained with Simple Cases
Let’s understand how the logic in a rung actually controls the output devices by simulating two basic cases.
Case 1: Normally Open (NO) Contact
Physical Electrical Circuit with NO contact:
Based on the electrical circuit design displayed in the above image
- When the switch is open (not pressed), the lamp remains OFF.
Troubleshoot PLC digital outputs: Step-by-Step Procedure for Troubleshooting PLC Digital Outputs
How does Rung work in NO contact?
Equivalent PLC Ladder Diagram:
The above picture depicts a comparable Ladder Logic diagram circuit showing the two possible states of an input/output relationship in a programmable logic controller (PLC) system.
The ladder diagram illustrates:
- Q1: Output coil controlling a lamp
Explanation: When Input I1 is NOT Active (False/Not ON):
- The top portion shows the input I1 in a “False” state
- The simulation window shows input 1 is 0 (off)
- The output Q1 lamp is shown as “False” and “Not Active”
- The circuit is not completing the logical connection
Explanation: When Input I1 is Active (True/ON):
- The bottom portion shows the input I1 in a “True” state
- The simulation window shows input 1 is 1 (on)
- The output Q1 lamp is shown as “True” and “Active” (appearing green)
- The circuit is completing the logical connection
This is the most fundamental ladder logic function: a straightforward direct link between an input and output. Input I1 energizes (ON/True) and powers the output Q1, hence activating it. I1 not energized (OFF/False) means no power to output Q1, hence it stays idle.
The simulation windows in the middle show the status of inputs and outputs, therefore verifying the logical connection between the input state and the final output state.
Implement SR flip flop: Implementing SR Flip Flop in PLC Ladder Logic
Case 2: Normally Closed (NC) Contact
Physical Electrical Circuit with NC contact:
Based on the electrical circuit design displayed in the above image,
How does Rung work in NC contact?
Equivalent PLC Ladder Diagram:

This image shows a Ladder Logic diagram circuit demonstrating a Normally Closed (NC) Contact configuration in a PLC system.
The ladder diagram illustrates:
- Q1: Output coil
Explanation: When Input I1 is NOT Active (False/Not ON):
- The top portion shows the input I1 in a “False” state (Not ON)
- The symbol used is for a Normally Closed contact (indicated with a slash through the contact)
- The simulation window shows input 1 is 0 (off)
- Interestingly, the outputQ1 lamp is shown as “True” and “Active” (illuminated green)
- This demonstrates the NC contact’s behavior: when the input is FALSE, the contact allows power to flow
Explanation: When Input I1 is Active (True/ON):
- The bottom portion shows the input I1 in a “True” state (ON)
- The simulation window shows input 1 is 1 (on)
- The output Q1 lamp is shown as “False” and “Not Active” (not illuminated)
- This again demonstrates the NC contact’s behavior: when the input is TRUE, the contact blocks power flow
This illustrates the fundamental principle of Normally Closed contacts in ladder logic – they conduct power when their associated input is OFF, and block power when their input is ON. This is essentially the inverse operation of the Normally Open (NO) contact shown in the previous image.
NC contacts are commonly used for safety circuits, indicating faults, or creating inverse logic operations in PLC programming.
What do the rails and rungs on a ladder diagram represent?
Simple Visual Representation of a Rung and Rail
Here’s a basic diagram to illustrate the structure:

- The current or logic flows from left rail to right rail.
- If the input I1 condition is met, the output Q1 is energized.
How Ladder Logic is Executed in PLC
- Rung after rung, top to bottom, the PLC scans the program continually.
- Every rung is assessed left to right. The rung is active if all conditions are true.
- An active rung causes the output coil to energize; for example, a motor begins or a light turns on.
- The output is de-energized if a rung condition is untrue.
Active rungs in simulation software are sometimes indicated in color (e.g., red or green) to show logical flow.
Summary Table of ladder Diagram Operation
Concept | Description |
Rung | Horizontal line in ladder logic representing a control statement. |
Rail | Vertical power lines on the sides, like phase and neutral in circuits. |
NO Input | Allows current when the condition/input is ON (closed). |
NC Input | Allows current when the condition/input is OFF (open). |
Output | Device controlled by logic (e.g., motor, light, relay). |
Execution | Rungs are evaluated top-down, left-to-right in every PLC scan cycle. |
Test Your Knowledge in PLC (Programmable Logic Controller) Knowledge
Refer the below link to test your understanding in PLC (Programmable Logic Controller)