Control systems

What is a PLC? How it works, types and where it is used

A PLC reads inputs, runs logic in a repeating scan and drives outputs. How the scan works, what is in a PLC panel, the languages and the main types.

Topic
Control systems
Updated
13 November 2026
Reading time
6 min
Sections
7
An open control cabinet with a PLC, touchscreen and wired modules.
Overview

A PLC (programmable logic controller) is an industrial computer that reads inputs from sensors and push buttons, runs a logic program in a repeating scan cycle, and then drives outputs such as motors, valves and alarms.

The PLC is the control layer of most industrial automation. It sits below supervisory systems such as SCADA, which collects data from many controllers, and above the field instruments it reads. This guide covers what a PLC does, how the scan works, what sits in a PLC panel, the programming languages, the main types and where PLCs appear at terminals and plants.

What a PLC does in an automation system

Function

What a PLC does in an automation system

A PLC replaces the cabinets of relays and timers that used to switch machines on and off. The logic that was once wired by hand now lives in a program that can be changed, copied and checked.

In a plant, a PLC handles five kinds of work. It runs sequences, such as starting a pump only after its suction valve is open. It enforces interlocks, which block an action when a condition is unsafe. Continuous control loops are the third, for example holding pressure with a VSD. Counting and timing come next, such as pump running hours. Finally, it exchanges data with SCADA, HMI panels and other controllers.

A PLC is built for the panel, not the office. It tolerates heat, vibration and electrical noise, its I/O modules accept industrial signals such as 24 VDC contacts and 4-20 mA loops, and it restarts into a known state after a power loss. Those properties, rather than raw computing speed, are why plants trust it with equipment.

How a PLC works: the scan cycle

Scan cycle

How a PLC works: the scan cycle

A PLC works in a loop that never stops. It takes a snapshot of every input, works through the program from top to bottom, and only then updates the outputs.

The time for one loop is the scan time. A signal shorter than one scan can be missed unless it goes to a fast or interrupt input. Long programs, heavy communication and complex maths all stretch the scan, which is one reason pump and VSD logic is sometimes moved to its own controller.

A watchdog timer checks that each scan finishes in time. If it does not, the CPU stops and outputs go to their configured safe state. That behaviour is designed in, and it is why a CPU fault light on a running plant must be investigated before anyone presses restart.

  1. Read inputs

    All input states are copied into the input image in memory.

  2. Execute the program

    The logic runs on that snapshot, top to bottom.

  3. Write outputs

    Results are copied to the output modules at once.

  4. Communicate and check

    Requests from SCADA or HMI are served and self-diagnostics run.

Inside a PLC panel

Hardware

Inside a PLC panel

A PLC panel is the cabinet that holds the controller and everything it needs to talk to the field. Knowing each part makes both procurement and troubleshooting easier.

The CPU runs the program and holds the memory. Input modules convert field signals into values, output modules switch contactors, solenoids and lamps, and analog modules handle measurements such as pressure or level. Communication modules connect the PLC to Ethernet, serial networks and remote I/O. A power supply feeds the rack, and terminal blocks, fuses and interposing relays sit between the modules and the field cables.

At PT Bio Farma in Bandung, for example, the electrical SCADA runs on ABB AC500 PLC masters, each with a PM573 CPU and a CM597 communication module, reading power meters over RS-485. See the ABB PLC troubleshooting at Bio Farma. Critical panels also need clean power: at the Donggala depot, UPS units and automatic transfer switches keep the safety and process control panels running through a supply changeover.

CPU
Runs the program, holds memory, reports diagnostics
Power supply
Feeds the rack and often the field 24 VDC circuits
Digital I/O
On/off signals: switches, contacts, solenoids, lamps
Analog I/O
Measurements such as 4-20 mA pressure or level
Communication
Ethernet, RS-485, fieldbus, remote I/O links
Terminals and relays
Fused connection between modules and field cables
PLC programming languages in IEC 61131-3

Programming

PLC programming languages in IEC 61131-3

PLC programs are written in a small set of standard languages, so an engineer trained on one brand can read another. The standard behind them is IEC 61131-3, whose fourth edition was published in May 2025.

The IEC abstract describes Structured Text (ST), a text language similar to Pascal; Ladder Diagram (LD), which looks like a relay drawing; Function Block Diagram (FBD), which wires blocks together; and Sequential Function Chart (SFC), which structures a program into steps and transitions. Older programs may also contain Instruction List, a text language from earlier editions.

Each vendor implements the languages in its own engineering software, so a program does not move between brands without conversion and testing. The example shows a pump start permissive written in ST.

Good programs are readable as well as correct. Consistent tag names, a comment on every interlock and one routine per piece of equipment make troubleshooting faster years later, when the engineer who wrote the code is no longer on site.

Text
(* Example only: pump start permissive in Structured Text *)
Permissive := SuctionValveOpen
              AND NOT TankLevelLowLow
              AND NOT VsdFault
              AND RemoteSelected;

IF StartCmd AND Permissive THEN
    PumpRun := TRUE;
ELSIF StopCmd OR NOT Permissive THEN
    PumpRun := FALSE;
END_IF;
Simplified example. Real pump logic adds feedback checks, timers and alarm handling.
Types of PLC: compact, modular and safety

Types

Types of PLC: compact, modular and safety

PLCs come in a few physical forms, and the right one depends on how many signals a process has and how critical it is.

A compact PLC puts the CPU, power and a fixed set of I/O in one housing, with a few expansion modules. A modular PLC mounts each function as a separate card on a rack, so I/O and communication can grow and faulty cards can be swapped. Safety PLCs are built and certified for safety instrumented functions such as emergency shutdown, with redundant processing and extended self-tests. The table compares them.

Critical systems can also run two CPUs as a redundant pair, so one takes over if the other fails. The 6 kV and 20 kV switchgear monitoring at Petrokimia Gresik, for example, uses two redundant ABB AC 800F controllers. Redundancy only helps when both halves are tested: a standby CPU that has never taken over may hide a fault nobody has seen.

CriterionCompact PLCModular PLCSafety PLC
FormOne housing, limited expansionRack with separate cardsModular, with redundant processing
Typical useA single machine, pump set or skidA process area or whole plant sectionEmergency shutdown and protective functions
Change and repairSimple, often replace the unitSwap one card, extend I/OUnder strict change control and testing
Example in Citia recordsSiemens S7-1200 for pumps and VSDAllen-Bradley and ABB AC500 systemsSIS panel powered by UPS at Donggala
Where PLCs work at terminals and plants

From the field

Where PLCs work at terminals and plants

In Indonesian fuel terminals, PLCs most often run pumps, valves and the links to tank gauging and metering. The examples come from Citia project records.

  • At the Pertamina Bitung integrated terminal, failed VSD units and a pressure transmitter were replaced and the pump system was connected over fibre optic to an AVEVA InTouch HMI in the control room. See the Bitung pump PLC restoration.
  • At the Cikampek fuel terminal, a faulty Allen-Bradley digital output was traced through wiring and I/O checks, then replaced together with the Moxa NPort 5160 gateway used for meter reading. See the Allen-Bradley output module work.
  • On a distribution pump system, pump and VSD logic was moved from a central Allen-Bradley PLC to a dedicated Siemens S7-1200 panel, with tags and graphics updated in Vijeo Citect v7 SCADA. See the VSD system optimization.

Pump automation also covers running-hours management, so wear is spread across duty and standby pumps. The bulletin on PLC-based pump automation describes that approach.

PLC, SCADA and choosing the right controller

Choosing

PLC, SCADA and choosing the right controller

A PLC controls; SCADA supervises. Most plants need both, and the question is how to divide the work between them.

Put fast logic, interlocks and anything that must keep running without a network in the PLC. Put overview, history, reports and operator commands in SCADA. When a plant grows into a large continuous process with many loops, a DCS may fit better; the differences are laid out in PLC vs DCS vs SCADA vs HMI.

Brand choice usually follows the installed base, spare parts on site and local support. Mixed sites work well when the network and SCADA configuration are done carefully. Once a PLC is running, the next tasks are keeping it healthy and recoverable: see safe PLC troubleshooting steps and backups you can actually restore.

Terms to know

CPU
The processor module that runs the PLC program and stores its memory.
I/O
Inputs and outputs: the signals a PLC reads from and sends to the field.
Digital input
An on/off signal, such as a limit switch or a pump running contact.
Analog input
A continuous measurement, usually a 4-20 mA signal from a transmitter.
Scan time
The time a PLC takes to read inputs, run the program and write outputs once.
Ladder diagram
A graphical PLC language drawn like relay circuits between two power rails.
Interlock
Logic that blocks an action while a condition is unsafe.
Remote I/O
I/O modules placed near the equipment and linked to the CPU by a network cable.

Frequently asked questions

What does PLC stand for?

PLC stands for programmable logic controller. In industry it means the rugged controller that runs machine and process logic, not product life cycle or other meanings of the same letters.

What programming languages do PLCs use?

PLCs use the languages described in IEC 61131-3: Ladder Diagram, Function Block Diagram, Structured Text and Sequential Function Chart. Older programs can also contain Instruction List. Each vendor's software implements them with its own details.

What is the difference between a PLC and a microcontroller?

A PLC is a finished industrial product, while a microcontroller is a chip that still needs a board, power, protection and firmware. The PLC comes with rated I/O, diagnostics, vendor support and standard languages, which is why plants use it for equipment control.

Which PLC brands are common in Indonesia?

Allen-Bradley, Siemens and ABB controllers all appear regularly in Citia project records at Indonesian terminals and plants. The best brand for a site is usually the one that matches its installed base, spare parts and local support.

Is a PLC the same as SCADA?

No, a PLC controls equipment directly while SCADA supervises many controllers from a control room. SCADA reads data from PLCs, shows it to operators, stores history and sends commands back to the PLCs.

Why does a PLC panel need a UPS?

A PLC panel needs a UPS so the controller keeps running through short power interruptions and supply changeovers. Without it, a brief dip can stop the CPU, drop outputs and interrupt communication with SCADA at the worst moment.

Sources and further reading

  1. IEC 61131-3:2025, Programmable controllers, Part 3: Programming languages (opens in a new tab)International Electrotechnical Commission (IEC) · webstore.iec.ch ·
  2. PLCopen Standards (IEC 61131-3) (opens in a new tab)PLCopen · plcopen.org
  3. NIST SP 800-82 Rev. 3: Guide to Operational Technology (OT) Security (opens in a new tab)National Institute of Standards and Technology (NIST) · csrc.nist.gov · 2023-09
  4. ABB PLC troubleshooting (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com
  5. VSD system optimization (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com
  6. PLC-based pump automation for fuel terminals (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com
  7. Cover photo by DWI, CC BY-SA 3.0 (cropped and colour graded) (opens in a new tab)Wikimedia Commons · commons.wikimedia.org

Next step

Prepare the technical discussion for your facility.

Bring the equipment list, diagrams and symptoms you have. The Citia team helps map the next step.

Related products and solutions

Keep reading