Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Industrial Automation

PLC Programming for Beginners: Ladder Logic Basics

PLC Programming for Beginners: Ladder Logic Basics

March 11, 2026 /Posted byJayesh Jain / 0

Introduction to PLC Programming: Understanding Ladder Logic from Scratch

Programmable Logic Controllers (PLCs) are the backbone of industrial automation. They control everything from conveyor belts in automotive plants to packaging machinery in food processing facilities, water treatment systems, and HVAC control. If you are entering industrial automation, electrical engineering, or process control, PLC programming — specifically Ladder Logic — is a non-negotiable skill.

This guide introduces PLC Ladder Logic from the ground up, covering the fundamental concepts, common instructions, and practical programming examples that appear in real industrial applications.

What is a PLC?

A PLC (Programmable Logic Controller) is a rugged industrial computer designed to control physical processes reliably in harsh environments. Unlike a general-purpose computer, a PLC:

  • Runs a cyclic scan: it reads all inputs, executes the program, updates all outputs, then repeats — typically 1-100 times per second
  • Is designed for extreme temperature, vibration, electrical noise, and humidity
  • Has deterministic response times — critical for safety and precision control
  • Uses digital and analogue I/O to interface with real-world sensors and actuators

Major PLC manufacturers include Siemens (S7 series), Allen-Bradley (CompactLogix, MicroLogix), Mitsubishi (MELSEC), Omron, and Schneider Electric (Modicon). Indian industry primarily uses Siemens S7-1200, Allen-Bradley MicroLogix, and Delta PLCs.

What is Ladder Logic?

Ladder Logic (also called Ladder Diagram, LD) is the most widely used PLC programming language. It was developed to resemble traditional relay control panel drawings, making it intuitive for electricians and control engineers familiar with relay logic.

A Ladder Logic program consists of:

  • Rungs: Horizontal rows of logic, like rungs on a ladder
  • Left and right rails: Power rails — conceptually, current flows from left to right when logic conditions are met
  • Contacts: Represent input conditions (normally open or normally closed)
  • Coils: Represent output actions

Basic Ladder Logic Instructions

Normally Open (NO) Contact

Symbol: —[ ]—

Passes power (logic = TRUE) when the associated bit is ON (1). Like a switch that is open when not pressed and closes when pressed.

Normally Closed (NC) Contact

Symbol: —[/]—

Passes power when the associated bit is OFF (0). Opposite of NO contact — it is TRUE when the input is inactive.

Output Coil

Symbol: —( )—

Sets the associated bit to 1 when power reaches it (logic conditions to its left are all TRUE). Resets to 0 when conditions are FALSE.

Set Coil (Latch)

Symbol: —(S)—

Sets the bit to 1 when conditions are TRUE. Does NOT reset when conditions become FALSE — it stays ON until explicitly reset.

Reset Coil (Unlatch)

Symbol: —(R)—

Resets the bit to 0 when conditions are TRUE.

Your First Ladder Logic Program: Motor Start/Stop

The motor start/stop circuit is the “Hello World” of PLC programming. It demonstrates latching (memory) and normally closed stop buttons.

Physical Connections:

  • I0.0 — START pushbutton (normally open, momentary)
  • I0.1 — STOP pushbutton (normally closed, momentary)
  • I0.2 — Motor overload contact (normally closed)
  • Q0.0 — Motor contactor coil

Rung 1: Motor Start/Stop with Seal-In

|--[ START ]--+--[ MOTOR_ON ]-+--[/STOP]--[/OVERLOAD]--( MOTOR_ON )--|  
|             +---------------+                                       |

Explain:
- START (I0.0): Momentary normally open pushbutton
- MOTOR_ON (Q0.0): Parallel branch creates the "seal-in" (latch)
- STOP (I0.1): Normally closed — must be INVERTED (NC contact)
- OVERLOAD (I0.2): Normally closed protective device

How this works:

  1. Press START: I0.0 = 1, power flows through the rung, Q0.0 (MOTOR_ON) goes to 1
  2. Release START: Q0.0’s parallel branch (seal-in) keeps power flowing — motor stays ON
  3. Press STOP: I0.1 opens (NC contact), breaks power flow, Q0.0 = 0, motor stops
  4. Overload trips: I0.2 opens, breaks circuit, motor stops regardless of START
Recommended: Modbus RTU Relay Module (4-Channel) — Practice Modbus-based I/O control as you learn PLC communication protocols. Ideal bridge between Arduino/ESP32 and industrial-style I/O.

Timer Instructions

Timers are among the most-used PLC instructions. Three types are standard across most PLC platforms:

TON — Timer On Delay

Output turns ON after input has been ON for a specified time period. Used for delayed starts, conveyor sequencing, safety delays.

TOF — Timer Off Delay

Output turns OFF after input has been OFF for a specified time period. Used for motor run-down delays, ventilation hold-on timers.

TP — Timer Pulse

Output turns ON for a fixed duration when input goes ON, regardless of input state changes. Used for fixed-duration signals.

Example: Conveyor Start Delay with TON

Rung 1:
|--[ START ]--------( TON T1, 5s )--|   // Start 5-second timer when START pressed

Rung 2:  
|--[ T1.DN ]---------( CONVEYOR )--|   // Conveyor starts when timer done (T1.DN = timer done bit)

Rung 3:
|--[/STOP ]-------(R CONVEYOR )--|   // STOP button resets conveyor output

Counter Instructions

CTU — Count Up Counter

Increments accumulator value on each rising edge of count input. Commonly used for counting parts, cycles, or operations.

CTD — Count Down Counter

Decrements accumulator from a preset value.

Example: Bottle Count Rejection System

Rung 1:
|--[ BOTTLE_SENSOR ]--( CTU C1, 100 )--|  // Count 100 bottles

Rung 2:
|--[ C1.DN ]--( REJECT_CONVEYOR )--|     // Activate rejection after 100 counted

Rung 3:
|--[ C1.DN ]--( RES C1 )--|              // Reset counter after triggering

Comparison and Math Instructions

PLCs support full arithmetic and comparison operations for analogue process control:

  • EQU (Equal): TRUE when two values are equal
  • NEQ (Not Equal): TRUE when values differ
  • GRT (Greater Than): TRUE when value A > value B
  • LES (Less Than): TRUE when value A < value B
  • ADD, SUB, MUL, DIV: Arithmetic on integer or floating point values

Example: Temperature High Alarm

Rung 1:
|--[ GRT TEMP_AI, 75 ]--( HIGH_TEMP_ALARM )--|  
// TEMP_AI = analogue input value (0-100°C scaled)
// If temperature > 75°C, trigger alarm output

Free PLC Simulation Software

Practice Ladder Logic without physical hardware:

  • CODESYS (free version): Supports all 5 IEC 61131-3 languages including Ladder Logic. Runs software PLC on your PC. Industry-standard tool.
  • OpenPLC Runtime: Open-source PLC runtime that runs on Raspberry Pi, Linux PC, or Arduino. Full Ladder Logic support.
  • TIA Portal (Siemens, trial/student version): Professional Siemens S7 programming environment with simulation mode. Free for students through Siemens’ education program.
  • AutomationDirect DoMore Designer (free): Free professional PLC IDE with built-in simulator.
Recommended: RS485 HAT for Raspberry Pi — Add RS485 Modbus capability to Raspberry Pi running OpenPLC, creating an affordable PLC training system.

IEC 61131-3 Programming Languages

Modern PLCs support five programming languages standardised in IEC 61131-3:

Language Type Best For
Ladder Diagram (LD) Graphical Discrete logic, relay replacement
Function Block Diagram (FBD) Graphical Process control, analogue signals
Structured Text (ST) Text Complex algorithms, math
Sequential Function Chart (SFC) Graphical Sequential processes, batch control
Instruction List (IL) Text Legacy, assembly-like (deprecated)

Frequently Asked Questions

Do I need physical PLC hardware to learn?

No. CODESYS running on your PC, or OpenPLC on a Raspberry Pi, gives you full PLC programming practice without expensive hardware. Physical PLCs start from ₹15,000-30,000 for entry-level units — use simulation first, then invest in hardware when you have specific project requirements.

Is Ladder Logic being replaced by Structured Text?

Ladder Logic remains dominant in discrete manufacturing and legacy industries in India. Structured Text is growing in process control and newer installations. A competent automation engineer should be comfortable with both. Learn Ladder Logic first (more immediately employable in Indian industry), then add Structured Text.

What certification should I get for PLC programming?

Siemens TIA Portal certification and Allen-Bradley (Rockwell) certifications are the most recognised in Indian industry. NSDC-affiliated automation training centres offer practical certifications. The best credential remains a project portfolio demonstrating real working automation programs.

How is PLC programming different from Arduino programming?

Arduino uses sequential C++ code; execution speed is the programmer’s concern. PLCs use cyclic scan with deterministic timing — the scan cycle guarantees all inputs are read before any output is updated. PLCs also have built-in fault handling, redundancy options, and industrial safety certifications that Arduino lacks.

Conclusion

Ladder Logic is not difficult to learn — it is visual, logical, and closely related to relay control circuits that electrical engineers already understand. Start with the motor start/stop circuit, add timers and counters, then explore analogue I/O and communication. Use free simulation software to practice daily. Within 3-6 months of consistent practice, you will be productive with real PLC systems. The demand for competent PLC programmers in India’s growing manufacturing sector makes this one of the highest-value automation skills you can acquire.

Shop Industrial Automation Components at Zbotic →

Tags: CODESYS ladder logic, IEC 61131-3, industrial automation programming, ladder logic basics, PLC for beginners, PLC programming, PLC tutorial India, Siemens PLC
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
IoT Plant Watering Robot: Soil...
blog iot plant watering robot soil sensor pump telegram alert 599410
blog home energy monitor current sensor and dashboard build 599433
Home Energy Monitor: Current S...

Related posts

Svg%3E
Read more

Compressed Air Monitor: Pressure and Leak Detection

April 1, 2026 0
Table of Contents Understanding Compressed Air Monitor Technical Fundamentals of Compressed Air Monitor Indian Market: Components and Pricing Sensor Integration... Continue reading
Svg%3E
Read more

Industrial Gas Detection: Multi-Gas Monitoring System

April 1, 2026 0
Table of Contents Understanding Industrial Gas Detection Technical Fundamentals of Industrial Gas Detection Indian Market: Components and Pricing Sensor Integration... Continue reading
Svg%3E
Read more

Cold Room Controller: Compressor and Defrost Cycle

April 1, 2026 0
Table of Contents Understanding Cold Room Controller Technical Fundamentals of Cold Room Controller Indian Market: Components and Pricing Sensor Integration... Continue reading
Svg%3E
Read more

Grain Storage Monitor: Temperature and Moisture

April 1, 2026 0
Table of Contents Understanding Grain Storage Monitor Technical Fundamentals of Grain Storage Monitor Indian Market: Components and Pricing Sensor Integration... Continue reading
Svg%3E
Read more

Poultry House Controller: Climate and Feeding Automation

April 1, 2026 0
Table of Contents Understanding Poultry House Controller Technical Fundamentals of Poultry House Controller Indian Market: Components and Pricing Sensor Integration... Continue reading

Add comment Cancel reply

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

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now