Ladder Logic Programming Examples for Beginners

|

Ladder logic programming is the foundation of industrial automation. It is one of the most widely used programming languages for Programmable Logic Controllers (PLCs). Ladder logic is graphical, making it easier for engineers and electricians to understand and troubleshoot. This article focuses on Ladder Logic Programming Examples specifically designed for beginners. We’ll break down basic concepts, show real-life examples, and explain each section in simple terms.

Table of Contents
Ladder Logic Programming Examples for Beginners
Ladder Logic Programming Examples for Beginners

Whether you’re a student, technician, or hobbyist, understanding these ladder logic programming examples will help you grasp core PLC functions and get started with automation projects confidently.

What is Ladder Logic?

Ladder logic is a visual programming language used to create applications for PLCs. It resembles electrical relay logic diagrams and uses a rungs-and-rails structure, which looks like a ladder. Each rung represents a control operation.

The left rail typically represents the power supply (logic high), and the right rail represents the ground (logic low). Instructions such as contacts, coils, timers, counters, and comparisons are placed between the two rails to control outputs based on inputs.

Why Use Ladder Logic?

  • Visual representation: Easy to read and understand.
  • Industrial standard: Commonly used in factories, especially in Europe and the US.
  • Relay-like logic: Familiar to electricians.
  • Real-time control: Efficient for time-critical applications.

Now, let’s explore Ladder Logic Programming Examples for Beginners.

Know more about Best Programmable Logic Controller Manufacturers

Basic Ladder Logic Symbols Used in Programming

Before diving into examples, it’s essential to understand the key symbols used in ladder logic programming:

SymbolDescriptionUse Case
Normally Open Contact
–/Normally Closed Contact
–( )–Coil (Output)Turns ON or OFF an output
–[TON]–Timer On DelayDelays output ON action
–[CTU]–Up CounterCounts rising input pulses
–[RES]–ResetResets timers or counters

Understanding these symbols is key to interpreting ladder logic programming examples.

Ladder Logic Programming Examples for Beginners

Start/Stop Motor Control Using Push Buttons

This is the most basic example and the perfect starting point for any beginner.

Objective: Control a motor using Start and Stop push buttons.

Inputs:

  • Start Button (I0.0)
  • Stop Button (I0.1)

Output:

  • Motor Coil (Q0.0)

Ladder Logic Description:

  • The motor starts when the Start button is pressed and stays ON using a latch.
  • It turns OFF when the Stop button is pressed.

Know more about Programmable Logic Controller Components

| I0.0    I0.1    Q0.0   Q0.0 |
|----||-----|/|-----||------( )|

Explanation:

  • I0.0 is a normally open (NO) contact from the Start button.
  • I0.1 is a normally closed (NC) contact from the Stop button.
  • Q0.0 is the motor coil, and it is latched to keep it ON.

This is one of the most common ladder logic programming examples in industrial automation.

Blinking Light Using Timer

Objective: Make a light blink at regular intervals using a timer.

Inputs:

  • Start Button (I0.0)

Output:

  • Light (Q0.1)

Ladder Logic Description:

  • The light turns ON for a set time and then OFF.
  • The cycle repeats continuously.

Know more about Programmable Logic Controller Types

| I0.0     T37   Q0.1       |
|----||----[TON 5s]----( )--|
|                           |
| T37.Q           T38       |
|----|/|----[TON 5s]--------|

Explanation:

  • Two timers are used in alternating states.
  • One timer turns the light ON, the second turns it OFF.
  • Together, they create a blinking effect.

Delay ON Light Using Timer

Objective: Turn ON a light after a delay when a button is pressed.

Inputs:

  • Push Button (I0.0)

Output:

  • Light (Q0.2)

Ladder Logic:

| I0.0        T39      |
|----||----[TON 10s]---|
|                 Q0.2 |
|-----------------( )--|

Know more about Programmable Logic Controller vs Arduino

Explanation:

  • When the push button is pressed, a 10-second timer (T39) starts.
  • After the delay, the light turns ON.

This example demonstrates a delay-on-start operation, often used in conveyor systems.

Counting Objects on a Conveyor Using Counter

Objective: Count the number of boxes passing through a sensor.

Input:

  • Sensor (I0.3)

Output:

  • Count Display (Internal counter)

Ladder Logic:

| I0.0             T39                |
|----||---------[TON   10s]-----------|
|                                     |
| T39.Q                      Q0.2     |
|----||----------------------( )------|

Explanation:

  • Every object detected by the sensor increments the counter.
  • When 10 boxes are detected, output Q0.4 turns ON.
  • This is useful for batch control in manufacturing.

Automatic Tank Filling System

Objective: Control the filling of a tank using level sensors.

Inputs:

  • Low Level Sensor (I0.4)
  • High Level Sensor (I0.5)

Output:

  • Water Pump (Q0.5)

Ladder Logic:

| I0.4     I0.5     Q0.5  |
|----||-----|/|------( )--|

Know more about Siemens S7-1200 Programmable Logic Controller

Explanation:

  • The pump starts when the tank is below low level.
  • It stops when the tank reaches high level.
  • A very practical ladder logic programming example for process automation.

Tips for Learning Ladder Logic Faster

  • Simulate before deployment: Use PLC simulation software like LogixPro, Siemens TIA Portal, or Factory I/O.
  • Start small: Work with simple circuits like start/stop or blinking LEDs.
  • Understand hardware mapping: Know how inputs and outputs are physically connected.
  • Practice regularly: Repetition builds strong logic programming habits.
  • Refer to datasheets: Always check the PLC manual for instruction sets.

Most Common Ladder Logic Functions and Their Usage

FunctionPurposeExample Use Case
TONTimer ON delayStart fan after delay
TOFTimer OFF delayKeep light ON after switch off
CTUCount UpCount bottles on conveyor
RESReset timer/counterReset count after batch
CMPCompare valuesTemperature vs setpoint check

Learning to use these blocks will allow you to move from beginner to intermediate-level programming in ladder logic.

Conveyor belt automation: Start/stop control, speed control, load detection
Lighting systems: Timed ON/OFF operations, motion-triggered lighting
Manufacturing lines: Batch counters, reject diverters
Pumps and motors: Level control, flow regulation, overload protection
Security systems: Access logic, alarms, timer-based gates

These examples are widely implemented in industries such as packaging, food processing, water treatment, and material handling.

Why These Ladder Logic Programming Examples Matter

For beginners, these ladder logic programming examples are not just theory—they are real-world logic problems translated into PLC language. Mastering them improves your ability to:

  • Build automation solutions from scratch
  • Understand and troubleshoot existing systems
  • Communicate effectively with industrial engineers
  • Advance your career in PLC programming and automation

Final Thoughts

Ladder logic is more than just rungs and rails—it’s the brain of industrial automation systems. These Ladder Logic Programming Examples for Beginners offer a practical foundation for understanding how logic controls physical machines. By experimenting with these real-world scenarios, you’ll not only improve your ladder logic skills but also become more confident in designing safe, efficient automation systems.

Subscribe our Newsletter on Electrical Insights to get the latest updates in Electrical Engineering.


#LadderLogicProgramming, #PLCProgramming, #LadderLogicExamples, #PLCTutorials, #AutomationEngineering, #ProgrammableLogicController, #IndustrialAutomation, #LadderDiagram, #PLCForBeginners, #FactoryAutomation, #ControlSystems, #EngineeringEducation, #AutomationBasics, #ElectricalEngineering, #PLCTraining

Leave a Reply

Your email address will not be published. Required fields are marked *