No history yet

PLC Basics

What is a PLC?

A Programmable Logic Controller, or PLC, is a ruggedized industrial computer used to automate specific processes in manufacturing, power plants, and other industrial settings. Its job is to control machinery on an assembly line, manage a chemical process, or even run the rides at an amusement park.

Think of a PLC as the brain of the operation.

Unlike a desktop computer, a PLC is built to survive harsh conditions like extreme temperatures, vibration, and electrical noise. It continuously monitors inputs from sensors and makes decisions based on a custom program to control output devices like motors, valves, and lights. This cycle of reading inputs, making decisions, and controlling outputs is the core of industrial automation.

From Relays to Processors

Before PLCs, automation relied on complex systems of electromechanical relays. A relay is essentially an electrically operated switch. To create logic, like 'if this button is pushed AND that sensor is active, then turn on this motor,' engineers would physically wire dozens or even hundreds of relays together in massive cabinets.

Lesson image

This approach worked, but it had major drawbacks. The relay cabinets were huge, consumed a lot of power, and generated significant heat. Troubleshooting was a nightmare of tracing wires through a complex physical web. Worst of all, changing the process logic meant physically rewiring the entire panel, a time-consuming and error-prone task.

The PLC was invented to solve these problems. It replaced the physical wiring of relays with a software program. Now, instead of rewiring, a technician can simply modify the code. This shift brought incredible flexibility, reliability, and cost savings to automation.

The key advantage of a PLC is that logic can be changed by editing a program rather than physically rewiring hardware.

Anatomy of a PLC

While PLCs come in many shapes and sizes, they all share a common architecture built from a few key components.

Lesson image

Here’s a breakdown of the essential parts:

  • Central Processing Unit (CPU): This is the PLC's processor. It executes the control program, performs logical operations, and manages communication between all the other components.
  • Input/Output (I/O) Modules: These modules are the PLC's connection to the outside world. Input modules receive signals from devices like switches, sensors, and temperature probes. Output modules send control signals to devices like motors, solenoids, and indicator lights.
  • Power Supply: This component takes the incoming AC power (like from a wall outlet) and converts it into the low-voltage DC power that the PLC's internal components need to operate.
  • Communication Interface: This port allows the PLC to connect to other devices, such as a programming terminal (a laptop used to write and upload the program) or other PLCs and control systems.

The PLC Scan Cycle

A PLC operates by continuously repeating a three-step process called the scan cycle. This happens very quickly, often thousands of times per second, which allows the PLC to control processes in what is effectively real time.

The three steps are:

  1. Read Inputs: The PLC checks the status of every input device connected to it. Is the button pressed? Is the sensor detecting an object? It saves these states into its memory.
  2. Execute Program: The CPU runs the user-created program one instruction at a time. Based on the input states it just read, the program's logic determines what the outputs should be.
  3. Write Outputs: After the program has finished running, the PLC updates the state of all its output devices. It turns motors on or off, opens or closes valves, and updates any indicator lights according to the logic from the program.

Once the third step is complete, the cycle immediately begins again with step one. This endless loop is what allows a PLC to manage and control a system safely and reliably.

Time to check your understanding of these core concepts.

Quiz Questions 1/5

What was the primary advantage that led to PLCs replacing traditional relay-based control systems?

Quiz Questions 2/5

Which component of a PLC is responsible for receiving signals from devices like buttons and sensors?