Programmable Logic Controllers (PLCs): Basics, Types & Applications

What is PLC
💡
Key learnings:
  • PLC Definition: A programmable logic controller is a specialized computer designed to operate in industrial settings, managing and automating the mechanical processes of factories and plants.
  • Functionality: PLCs handle tasks like timing and logic operations, significantly streamlining industrial processes.
  • Programming Flexibility: The programming of a PLC can be altered to meet changing operational needs, enhancing adaptability in industrial environments.
  • Types of PLCs: There are compact and modular PLCs, with modular versions allowing for expanded control options and adaptability.
  • Industrial Applications: Programmable logic controllers are crucial in industries such as manufacturing and water treatment, where they automate complex processes to increase efficiency and reliability.

What is a PLC?

What is a PLC? A programmable logic controller (PLC) is an industrial computer that reads field inputs, runs a stored control program and commands outputs. Manufacturers design PLC hardware for dependable operation within specified limits for temperature, vibration, electrical noise and contamination. PLCs automate machines and processes in settings such as manufacturing and wastewater treatment.

A PLC shares core computer components with a personal computer: a power supply, central processing unit (CPU), memory, firmware and communication interfaces. Its industrial input and output (I/O) modules connect the program to sensors and actuators.

A general-purpose computer can perform the same kinds of logic and numerical calculations. A PLC differs in its industrial I/O, predictable task execution, diagnostics, service life and environmental ratings. Those features make it a practical controller for electromechanical equipment and continuous or batch processes.

A PLC may operate alone or exchange data with a larger SCADA system. Engineers can change its program when a machine or production process changes, although each change needs controlled testing before service. This flexibility is one reason PLC-based control systems replaced many large relay panels.

People learning to program PLCs can compare online PLC training courses, but should match each course to the controller family they will use. Practical work in control engineering also requires electrical safety, machine safety and vendor-specific hardware training.

PLC Basics

Dick Morley and the Bedford Associates team developed the Modicon 084, demonstrated to General Motors in 1969 and delivered commercially in 1970. It replaced banks of hard-wired relays with programmable logic for functions such as sequencing, timing and counting.

A PLC can change control logic without rewiring every relay connection. The change is not cost-free: an engineer must assess risk, update documentation, test the program and control its release. Even so, a verified software change is often faster than rebuilding a large hard-wired relay panel.

Consider a lamp controlled by a switch. If the new requirement is to turn the lamp on 30 seconds after the switch closes, a relay-only circuit needs a suitable timing relay and revised wiring. The designer must also check the timer contacts, supply, protection and fail-safe behaviour.

Light Switch
Light Switch

With an existing PLC installation, the delay can usually be added to the program without changing the switch or lamp wiring. The engineer still has to confirm that the I/O, output device and safety design are suitable, then test the timer logic before returning the equipment to service.

The same principle scales to larger processes. Controller capacity, I/O type, task timing, communications, safety integrity, redundancy and environmental ratings must all match the application.

Light operated by a PLC
Light operated by a PLC

How Does a PLC Work?

Many PLCs execute control logic in a repeating scan cycle. The exact timing model is controller-specific: modern systems can also use periodic, event-driven, motion, safety or communication tasks.

Block Diagram of How A PLC Works
Block Diagram of How A PLC Works

A simplified cyclic scan includes these steps:

  • The controller schedules the tasks that are due and monitors execution time.
  • Input modules provide field states or measured values to controller memory according to their update schedule.
  • The CPU executes the scheduled user program in its configured order.
  • The controller services diagnostics and communications as its operating system schedules them.
  • Program results update output data; output modules then drive the field devices on their own update schedule.
  • The process repeats in run mode. Input filtering, network delays, task periods and module update times all affect total response time.

Physical Structure of PLC

A PLC has the processing and memory functions of a computer, combined with industrial power, I/O and communication hardware.

PLC block diagram
PLC Block Diagram

A typical PLC system acquires digital states or measured values, executes control logic and sends commands to actuators. Depending on the product, these functions may be integrated in one enclosure or distributed across five functional parts:

  • Rack or chassis
  • Power supply module
  • Central processing unit (CPU)
  • Input and output modules
  • Communication interface module

Rack or Chassis

In a modular PLC, the rack or chassis provides mechanical support and a backplane for power and data. System size depends on the required controller, module count, network layout, redundancy and available enclosure space.

A compact PLC usually combines a CPU with a fixed set of local I/O, sometimes with limited expansion. A modular PLC accepts compatible power, communication and I/O modules in a rack or base assembly. Remote I/O may be installed elsewhere and linked over an industrial network.

Breakdown of PLC Rack
Breakdown of PLC Rack

Power Supply Module

The power supply provides the regulated voltages required by the CPU, backplane and modules. Some units accept AC mains and convert it internally; others require an external DC supply. A 24 V DC input is common, but the permitted voltage, isolation, grounding, current and redundancy are model-specific.

CPU Module and Memory

The CPU module contains the processor, firmware, working memory and non-volatile storage appropriate to the model. It executes the control tasks, manages data and coordinates modules and networks. Number formats such as binary, decimal, hexadecimal or octal are data representations, not types of microprocessor.

PLC instructions can implement logic, timers, counters, arithmetic, comparisons, motion and data handling. Older descriptions separated bit-oriented and word-oriented processors, but current PLC CPUs normally handle Boolean, integer, floating-point, time, string and structured data within one controller architecture.

The CPU reads input data, executes the configured program and updates commands for output devices. It exchanges data through a backplane or network rather than accepting arbitrary field voltages directly. Field wiring must connect to an I/O module whose range, channel type and isolation match the signal.

Input and Output Module

I/O modules form the electrical boundary between controller data and the process. Digital modules read or switch discrete states. Analog and specialist modules measure or generate signals for variables such as temperature, pressure, flow, position and speed.

Input devices include pushbuttons, limit switches, proximity sensors and transmitters. Output loads include contactors, indicator lamps, solenoid valves and drives. Heaters and motors normally need a correctly rated contactor, relay or drive rather than a direct PLC output. The figures below show one example of a digital input circuit.

PLC Input Module
PLC Input Module
PLC input module circuit diagram
Circuit Diagram of PLC Input Module

An input module typically performs four functions:

  1. It receives field signals within the module’s published AC, DC, current, voltage, resistance or sensor range.
  2. It conditions and converts the signal into data the controller can process.
  3. An Isolator or optocoupler may provide electrical separation between field and logic circuits; its purpose is not general voltage regulation.
  4. It reports the resulting state or value, plus available diagnostics, to controller memory.

The illustrated AC input has a field section and a logic section separated by an optical path. When its pushbutton closes, the specified AC input reaches the conditioning circuit through current-limiting components. This drawing is one topology, not a universal PLC input design; actual terminals and ratings must come from the module manual.

In this example, a bridge rectifier (such as a diode bridge rectifier) rectifies the AC input. A Zener diode and resistors limit the voltage and current for an LED. Its light drives a phototransistor, producing an isolated logic state. The internal logic voltage is set by the module design and is not necessarily 5 V.

An output module converts a controller command into a field-compatible switching or analog signal. The logic and load sections may be isolated, but an output is not simply an input circuit run in reverse. The figure below shows one optically coupled triac output.

PLC Output Module
PLC Output Module

When the controller commands the illustrated output, its LED drives an optical receiver, which triggers the Triac. A triac output is for compatible AC loads and has current, voltage, leakage and switching limits. Relay and transistor modules behave differently, so wiring and protection must follow the exact data sheet.

Communication Interface Module

Communication modules connect a PLC to remote I/O, drives, other controllers, human-machine interfaces and supervisory computers. Protocol, topology, update rate, redundancy and cybersecurity controls must fit the system. Control devices should not be exposed directly to the public internet.

Types of PLCs

A practical hardware distinction is between compact PLCs and modular PLC systems.

Compact PLC

A compact PLC combines the controller and a manufacturer-defined set of local I/O in one case. Some models have no expansion; others accept a limited number of signal boards, modules or remote I/O stations. The product specification gives the real limit.

Modular PLC

A modular PLC lets the designer select compatible CPUs, power supplies, communications and I/O modules. It supports larger or specialised systems, but module count, rack size, power budget, network capacity and controller memory still impose limits.

Types of PLCs
A Modular Type PLC

Digital output modules commonly use relay, transistor or triac switching. A relay can switch compatible AC or DC loads but has mechanical life and speed limits. A transistor is normally used for DC loads, while a triac is used for compatible AC loads. The load and protective circuit must match the module rating.

Terms such as mini, micro and nano PLC are informal vendor categories, not a universal technical standard. Compare products by I/O capacity, task performance, memory, communications, environmental ratings and safety certification instead.

Examples of PLC manufacturers and product families include:

Each vendor supplies its own engineering tools. Its platform also defines module support, firmware compatibility and licensing. The linked software page is unrelated to PLC programming and should not be treated as vendor documentation.

PLC Applications

PLCs control machines and processes in applications including:

  1. Process plants, including mining and oil and gas facilities
  2. Glass production and handling systems
  3. Pulp and paper machinery
  4. Cement manufacturing
  5. Boiler auxiliary systems in thermal power plants

PLC Programming

A PLC program must reflect the process hazard analysis, cause-and-effect requirements, operating modes, alarms, interlocks and failure behaviour. Introductory PLC programming material can teach syntax, but a real application also needs vendor manuals and the site’s engineering and safety standards.

IEC 61131-3:2025 defines one textual language, Structured Text (ST) and two graphical languages, Ladder Diagram (LD) and Function Block Diagram (FBD). It also defines Sequential Function Chart (SFC) elements for organising programs and function blocks. Actual support and vendor extensions vary by controller.

  1. Textual Language
    • Instruction list (legacy; not part of IEC 61131-3:2025)
    • Structured Text (ST)
  2. Graphical Form

Not every controller supports every language and no single form is best for every task. Ladder logic suits discrete interlocks and maintenance visibility; structured text programming often suits calculations, loops and structured data. Team skills, diagnostics, safety rules and platform support should guide the choice.

Ladder Logic

Ladder logic is a graphical language derived from relay-control diagrams. Contact and coil symbols express Boolean conditions and actions, while modern implementations also include timers, counters, arithmetic and other instructions.
The figure below shows a simple ladder diagram.

Ladder Logic
PLC Ladder Logic

In this example, two normally open input instructions are placed in parallel. If either associated input is true, the output instruction for the lamp becomes true. The physical output still depends on controller mode, forcing, faults, wiring and output-module operation.

The horizontal paths are rungs and the vertical boundaries are rails. The controller evaluates the symbols as logic from left to right according to its execution rules. The apparent current path is a relay-diagram metaphor, not a physical positive-to-negative current flowing through the software.

Function Block Diagrams

Function Block Diagram (FBD) is a graphical PLC programming language specified by IEC 61131-3. Blocks represent functions or function blocks and their connections show how data or control values pass between them. A function block can retain internal state between executions; a function normally does not.

A block is normally drawn as a rectangle, with inputs on the left and outputs on the right. Its type, input values, internal state where applicable and execution semantics determine the output values.

Functional Block
Function Block

FBD makes signal flow and reusable operations visible. A block’s definition and the engineering platform set its supported inputs and outputs. Compatible outputs can feed other block inputs to build a Function Block Diagram.

Example Functional Block Diagram
Example Functional Block Diagram

The figure below shows several blocks used in FBD programming.

Functional block programming
Functional Block Programming

The figures below compare ladder and function-block representations in one Siemens notation. Equivalent behaviour depends on instruction execution order, data types and controller-specific details.

Ladder to functional block
Ladder to functional block [Source]
Ladder to Functional Block
Ladder to functional block diagram [Source]

Structured Text Programming

Structured Text is an IEC 61131-3 language for assignments, expressions, selection, iteration and calls to functions and function blocks. It resembles a conventional high-level language. Engineers must follow the exact syntax, identifier rules, data types and extensions implemented by their programming tool.

Structured Text Programming
Structured Text Programming

PLC Programming Examples

Suppose a signal lamp must turn on when the pump is running and pressure is satisfactory or whenever the lamp-test switch is closed. The normal indication therefore uses AND logic gates: pump_running AND pressure_ok.

The lamp-test condition joins that result through OR logic, giving lamp = (pump_running AND pressure_ok) OR lamp_test. END, RET or implicit routine termination is controller-specific, so use the instruction defined by the platform. The figure shows ladder and function-block versions.

PLC Program to Test Glowing of Lamp
PLC Program to Test Lamp Glowing

As another simplified example, a valve may lift a load only when the pump is running and either the lift command is active or an at-bottom condition requests movement. A real lifting system also needs independent limits, fault handling, safe stopping and protection against unintended motion.

OR logic combines the two request conditions, then AND logic combines that result with pump_running. The stated expression is valve = pump_running AND (lift_switch OR at_bottom); either request can satisfy the parenthesised condition, not both.

PLC Program to Operate Valve
PLC Program to Operate Valve

The final diagram is a teaching example for a drinks machine with tea or coffee selection, optional milk and sugar and coin validation. Its first OR block accepts either tea or coffee as a drink request. A production machine would also need mutually exclusive selection, temperature, water-level, timeout, cleaning and fault logic.

The first AND block permits a request only when a drink is selected and the coin condition is true. Later blocks combine that permission with the required ingredient commands. Treat the drawing as a Boolean illustration, not a complete or safety-validated vending-machine sequence.

Functional Block Diagram of Drinking Machine
FBD for Drinking Machine
Ladder Logic for Drinking Machine
Ladder Logic for Drinking Machine Application

History of PLCs

Early practical PLCs were created to replace relay panels and ladder-style notation helped electricians understand the programmed Boolean logic. The Modicon 084 used an early ladder representation when demonstrated to General Motors in 1969.

Ladder notation remained useful because it resembled electromechanical control drawings. Textual, function-block and sequential forms later supported other control problems. The first edition of IEC 1131-3 appeared in 1993; the standard was later renumbered IEC 61131-3 and has evolved through subsequent editions.

Language choice now depends on the application, controller support, team practice, diagnostics and maintainability. Ladder remains common for discrete logic, while Structured Text, FBD and SFC each have suitable uses.

Early PLCs often used proprietary programming panels or special-purpose terminals with dedicated keys. Personal-computer engineering tools later became common, but projects, compilers, firmware compatibility and online-change behaviour are still usually vendor-specific.

Some terminals displayed graphical symbols, while others used ASCII code representations of contacts, coils and wires. Modern graphical editors improve presentation, but safe maintenance still depends on accurate comments, version control, backups, access control and tested change procedures.

Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Vidya Muthukrishnan

Vidya Muthukrishnan, with a B.Tech in Electronics and Instrumentation from SASTRA University and an M.Tech in Biomedical Engineering from VIT University, is the Team Lead for Digital Training Services at a notable IT company. She oversees E-learning initiatives and Web-Based Training programs, leveraging her extensive background in Learning and Development, which includes a previous role as an Assistant Professor in Instrumentation and Control Engineering at Sri Krishna College of Technology, Coimbatore.

Leave a Comment