Industrial Controls and Operations

Programmable Logic Controllers in Plain Terms

A plain explanation of PLCs, the rugged industrial computers that run machines: how they scan inputs and outputs, how they are programmed, and how they connect.

On this page
  1. The small computer behind the machine
  2. What is inside and around it
  3. How a PLC thinks: the scan cycle
  4. How they are programmed
  5. Built for the plant floor
  6. Connecting to the wider world
  7. PLC data and IoT projects
  8. Practical points

The small computer behind the machine

When a conveyor starts, a press closes or a filling line stops because a bottle is missing, there is usually a programmable logic controller, or PLC, making that happen. A PLC is a rugged, purpose-built computer that reads signals from sensors and switches, applies a stored program, and drives outputs such as motors, valves and lights. It is one of the most common building blocks of factory automation.

PLCs were created to replace walls of relays and hard-wired control panels. Changing how a machine behaved once meant rewiring. With a PLC, it can often mean editing a program, which is a large part of why they spread.

What is inside and around it

A typical PLC system has a few parts:

  • A processor that holds and runs the program.
  • Input modules that accept signals from devices like push buttons, limit switches, proximity sensors and temperature probes. Some inputs are simple on or off; others are analog, a varying voltage or current representing a measurement.
  • Output modules that switch things on and off or send analog levels, such as controlling a motor starter or a valve position.
  • A power supply and, in larger systems, a rack or rail that holds everything together.
  • Communication ports for programming, for talking to other devices and for networking.

Many models are modular, so a user can add more input or output capacity as a machine grows.

How a PLC thinks: the scan cycle

A PLC does not wait for events the way a phone app does. It repeats a very fast loop, commonly called the scan:

  1. Read the current state of all inputs.
  2. Run the program from top to bottom using those values.
  3. Update all outputs based on the results.
  4. Handle communications and housekeeping, then start over.

The loop typically repeats many times per second, and its speed depends on the model and program size. Because the cycle is predictable, a PLC can respond in a consistent time, which matters for machinery. This predictability is one thing that separates a PLC from a general-purpose computer, which may pause to run other tasks at unpredictable moments.

How they are programmed

PLC programming languages were designed with electricians and technicians in mind. The best known is ladder logic, which looks like a relay wiring diagram: contacts on the left, a coil on the right. A rung might read: if the start button is pressed and the safety guard is closed, then energize the motor. Other styles include function block diagrams, step-based sequences and text languages, and many programmers mix them.

A good program also handles the unexpected. What happens if a sensor fails, a guard opens mid-cycle or power returns after an outage? Careful programs define a safe response for each. For high-risk equipment, dedicated safety controllers are commonly used, separate from ordinary control, as discussed when comparing industrial and consumer devices.

Built for the plant floor

PLCs are designed to tolerate conditions that would trouble an office computer: electrical noise, vibration, dust and wide temperature swings. They are typically built to run for years without a restart and to keep their program through power loss. Their operating software is usually simple and tightly controlled, so there is little to go wrong. A PLC may remain in service for a decade or more, which shapes how people think about replacement and support.

Connecting to the wider world

Historically a PLC ran a single machine and talked to little else. Today most PLCs also share data. A few common patterns:

  • Between controllers and devices. PLCs communicate with drives, remote input and output blocks and smart sensors over industrial networks, many of them wired.
  • To supervisory systems. Operator screens and SCADA systems read values from many PLCs to give a bigger picture of a process.
  • To data collection systems. For analytics, a gateway or software layer reads values and forwards them, often via publish subscribe messaging, to historians, dashboards or the cloud. IoT gateways commonly translate between older protocols and newer ones.
  • For remote support. Some sites allow engineers to connect from afar to diagnose problems.

Those last connections deserve caution. Industrial protocols, especially older ones, often assume a trusted network, and many PLCs have limited security features. Good practice commonly includes keeping controllers on a segmented network, limiting who can change programs, removing default passwords, and tracking firmware versions. The relationship between plant and office networks is covered in the discussion of operational technology.

PLC data and IoT projects

Since a PLC already knows what a machine is doing, it is often the cheapest and most reliable data source in a plant. Run states, counters, alarms and process values are all there. Pulling them out can power things like equipment effectiveness tracking or condition monitoring, without adding new sensors. Teams still need to take care: reading data is usually safe, while writing to a controller can change how a machine behaves, so read-only access is often preferred for data projects.

Practical points

  • A PLC is not the same as a microcontroller board: PLCs are packaged, tested for industrial use and programmed with industrial tools, while a hobby board is a bare component.
  • Keep backups of programs and documentation of changes; a lost program can mean a long outage.
  • Treat access to programming software with the same care as a key to the machine.

In short, a PLC is a dependable, predictable computer that sits between sensors and actuators, and understanding its scan cycle and connections gives a good foundation for everything else in industrial control.

The complete guide to industrial controls and operations

Industrial IoT vs Consumer IoT: Key Differences
Read the guide

Keep exploring

Guides from other topics

All topics →