September 13, 2024
PLC

What is a PLC and How Does it Control a Process?

Learn what a PLC is, what components make up a PLC, how a PLC is programmed, and how a PLC controls a process

This post aims to answer a basic question in industrial automation: 

What is a PLC and how does it control a process?

After reading this post, you will know:

  • What a PLC is,
  • How a PLC controls a process, and
  • What components make up a PLC

Let's start by looking at what a PLC, or Programmable Logic Controller, is and why we use them for industrial automation.

What is a PLC?

A PLC

A PLC is a specialized computer that is designed for industrial automation. PLCs are at the core of almost any automated system and it is the PLC that controls the process.

PLCs are used for industrial automation because they are more durable than traditional computers.

PLCs have rugged housings that are designed to withstand harsh industrial environments.

PLCs are designed without moving parts and with proprietary operating systems to make sure that they can run for many years stopping due to parts wearing out or patching requirements.

Finally, PLCs are easy to program using graphical programming languages so that electricians and technicians on the factory floor can debug and modify PLC programs as required.

Now that we know what a PLC is, let's talk about how PLCs work.

How Does a PLC Work?

The basic operating concept of a PLC is very simple.

A PLC operates cyclically in a continuous loop. In each iteration of the loop, also known as a cycle or scan cycle, the PLC:

  • Determines the state of a process by reading input data from devices like sensors and pushbuttons,
  • Executes a user program that determines what outputs should be switched on or off based on the current state of the process,
  • Turns outputs on and off like lights and motors on and off to control the process.

You can see a graphical representation of the PLC scan cycle here.

The PLC Scan Cycle

This operating concept is not 100% correct since modern PLCs are capable of multi-tasking and other background tasks like communications are happening. Still, it is good enough to start with.

Now that we know how a PLC works, let's look at an example to see how a PLC controls a process.

How Does a PLC Control a Process?

Process

Here, we have a simple conveyor.

When the operator pushes the green Start button, the conveyor starts running.

It continues running until someone presses the red Stop button or the tote reaches the end of the conveyor and triggers the sensor mounted there.

Both pushbuttons have built-in lights that are used to indicate when the conveyor is running and when it is stopped.

The PLC is monitoring the inputs for the Start and Stop pushbuttons as well as the input for the sensor at the end of the conveyor.

Based on the status of those inputs and the logic that has been downloaded to the controller, it makes decisions about what should happen.

Based on these decisions, the PLC controls the process by turning on outputs to run the conveyor and control the push button lights.

Here is how that program might look in a PLC

Ladder Logic

This program defines which inputs the PLC should monitor (DI_Start_PB, DI_Stop_PB, and DI_End_PEC), how the system should react depending on the state of those inputs, and which outputs the PLC should control (DO_Run_MTR, DO_Running_LED, and DO_Stopped_LED).

The logic shown here is written in Ladder Logic, which is a very popular programming language for PLCs.

A program like this is written by a PLC programmer, also known as a controls engineer.

The program defines what inputs should be monitored, what logic should be executed, and what outputs should be controlled.

This program is written using proprietary programming software that is specific to a PLC platform. For example, Allen Bradley Logix 5000 PLCs are programmed using Studio 5000 Logix Designer, and Allen Bradley Micro800 PLCs are programmed using Connected Components Workbench.

In the programming software, the PLC programmer writes logic like what is shown here. After writing the logic for the PLC, the PLC programmer downloads the project to a physical PLC using a USB or Ethernet cable. When the download process is started, the project is compiled into a binary file that can be executed by the PLC's processor and this binary file is transferred to the PLC.

After the program has been downloaded, the programmer can disconnect his computer and the PLC will execute the downloaded project automatically.

Ladder Logic is not the only PLC programming language available. Other programming languages include Function Block Diagram, Structured Text, and Sequential Function Chart. The choice of which programming language to use largely depends on the problem being solved, the industry in question, and the PLC programmer’s preferences. Most PLCs support mixing and matching of programming languages so that the most appropriate language can be selected for different parts of the code.

One important thing to note is that PLCs are not programmed using high-level programming languages like C#, Python, or JavaScript. This is primarily because PLC programming languages are designed to be easy to program and maintain.

What Components Make Up a PLC?

Now that we have discussed how a PLC controls a process, let’s discuss the components that make up a PLC.

To start with, all PLCs have a processor. The processor is the component that stores and executes the PLC program.

To download a program to a processor, a PLC needs some kind of communication module. This communication module could be a simple USB port used to create a point-to-point connection between the PLC and a programming device or it could be a high-speed Ethernet connection that let’s the PLC communicate on industrial networks.

Next, a PLC has an input module. This module converts electrical signals sent from devices like sensors and pushbuttons into digital signals that the processor can understand.

The PLC also has an output module that does the opposite of the input module. An output module takes digital signals from the processor and converts them into electrical signals to control devices like lights and motors.

All of these components need power to operate. Power is supplied to the components through a power supply. Typically, this power supply will convert input power at 120V AC to 24V DC to power the other components.

In the image below, you can see all of these components. The components on the left is the power supply, component [0] is the processor, component [1] is an Ethernet communications module, component [2] is an input module, and component [3] is an output module.

Modular PLC

In this example which is a ControlLogix PLC system, each component is modularized. That means that each component has its own housing and is assembled together to build a PLC system. In a modular PLC system, an electrical backplane is used to create a connection between the modules and carry power and communication between them.

In other PLC systems, like the CompactLogix PLC system, the components are all integrated into a single housing. Note that when the input and output modules are part of the PLC, they are referred to as embedded IO.

Non-modular PLC system

Wrap Up

In this post, I introduced some basic concepts about PLCs.

After reading the post, you can;

  • Define what a PLC is,
  • Describe how a PLC controls a process,
  • List the components that make up a PLC

If you enjoyed this post, consider signing up to the mailing list below to get notified when I release new content on KB Controls.

Mailing List

Get free, high quality content like this delivered direct to your inbox every month.

Learn More

Subscribe to my monthly newsletter

Get new posts and course announcements delivered directly to your inbox.

Thanks for joining our newsletter.
Oops! Something went wrong while submitting the form.
Subscribe to Our Weekly Newsletter - Courselify X Webflow Template
Subscribe to Our Weekly Newsletter - Courselify X Webflow Template
Subscribe to Our Weekly Newsletter - Courselify X Webflow Template

Related courses

Basic PLC 
Programming with Studio 5000 Logix Designer

Includes a free trial of Studio 5000 Logix Designer

Learn how to build and test your first project in Studio 5000 Logix Designer using Bit instructions

22 Lessons

Timers and Counters in Studio 5000 Logix Designer

Includes a free trial of Studio 5000 Logix Designer

Learn how to use timer and counter instructions in your Studio 5000 Logix Designer projects

13 Lessons

Working with Numeric Data in Studio 5000 Logix Designer

Includes a free trial of Studio 5000 Logix Designer

Learn how to compare and compute numeric data in your Studio 5000 Logix Designer projects

Coming Soon