What is a PLC (Programmable Logic Controllers): A Comprehensive Guide

author avatar

05 Jun, 2023

A Programmable Logic Circuit (PLC) with analog digital input and output card, with power supply and processor module

A Programmable Logic Circuit (PLC) with analog digital input and output card, with power supply and processor module

Programmable Logic Controllers (or PLC) have revolutionized automation and control in a wide range of industries, which were previously difficult with the traditional relay logic systems. Its ruggedness to withstand rough environments, ability to integrate with various devices, ease of programming to quickly handle complex calculations, etc. make them a versatile and powerful tool over other types of controllers.

Introduction

Programmable Logic Controllers (PLCs) are the linchpin of industrial automation, playing a critical role in controlling machinery and processes. These sophisticated devices have revolutionized industries by allowing for precise, reliable, and efficient control of complex systems. From manufacturing lines to power grids, PLCs facilitate the automation of various processes, significantly improving productivity and reducing human error. Despite their ubiquity in the industrial sphere, understanding what a PLC is, its core components, working principles, and its role in the modern industrial world can be unknown. This guide aims to elucidate these aspects, offering a comprehensive look into the world of PLCs.

Fundamentals of PLCs

Definition and Function of a PLC

Programmable Logic Controllers (or programmable controllers), commonly known as PLCs, are digital computers designed specifically for industrial applications. They are robust, reliable, and versatile, designed to withstand harsh industrial environments characterized by temperature extremes, high humidity, dust, and electrical noise.

The first PLC was developed in 1968 by Dick Morley, for General Motors. This was in response to the traditional relay systems that were challenging to design and modify, considering the complex wiring. The primary role of a PLC is to control machinery and processes. At its core, a PLC is a device that continuously monitors the state of input devices and makes decisions based upon a custom program, in order to control the state of output devices. PLCs are often used in factories and industrial plants to control motors, pumps, valves, actuators, and other machinery involved in the production process.

One of the defining characteristics of a Programmable Logic Controller is its programmability. Unlike a traditional computer, which is designed to perform a wide range of tasks, a PLC is programmed to perform specific tasks within an industrial process. This could be as simple as controlling a single machine, or as complex as managing an entire manufacturing line. As will be discussed later, the programs used by PLCs are often designed using ladder logic or function block diagrams, which are visual programming languages specially designed for industrial control systems.

PLCs have several key advantages over traditional control systems. They are highly reliable and capable of operating non-stop for years on end. They are flexible, allowing for changes in the control process without significant hardware modifications. They can handle many input and output signals and can be networked to other PLCs and computers for complex control tasks. In summary, a PLC is a highly adaptable and resilient piece of hardware, tailored to the demanding needs of industrial control.

Components of a PLC

A Diagram showing PLC ComponentsPLC Components

The structure of a Programmable Logic Controller (PLC) comprises several key components, each playing a vital role in its operation. These components work in unison to receive, process, and transmit data, thereby controlling the machinery and processes connected to it. Below are the key components of PLC:

1. CPU: The first key component is the Central Processing Unit (CPU), which acts as the brain of the PLC. The CPU manages all the PLC's operations by executing the control program that has been stored in its memory. It processes incoming data from the inputs, performs logic operations, and sends signals to control the outputs.

2. I/O Modules: Next, there are Input and Output modules, often abbreviated as I/O. These are the components through which the PLC interfaces with the machinery and processes it is controlling. Input modules receive signals from input devices such as sensors and switches, and these signals are then used by the CPU to make decisions. The inputs consist of analog and discrete inputs. The analog inputs contain values that span over a wide range, like temperature and pressure readings. The discrete input comprises of 2 states i.e. On or Off. Output modules send signals to control devices such as motors, pumps, and valves based on the decisions made by the CPU.

3. Power Supply: The Power Supply unit is another critical component. It converts the incoming power to the levels required by the PLC components. Most PLCs operate on 24V DC power, though some may require other voltage levels.

4. Programming Devices: PLC is a computer with a microprocessor that can be programmed for controlling various types of devices. The Programming Device is used to input the control program into the PLC's memory. This is typically a computer running software that allows the user to program the PLC using a specialized programming language, which will be discussed later.

Together, these components create a flexible and robust control system. Their modular nature allows for customization and expansion, ensuring the PLC can be tailored to the specific needs of almost any industrial process.

Working Principle of PLCs

The PLC Programming Cycle

The operation of a Programmable Controller (PC) is centered around a simple but powerful principle. This principle involves continuous cycling through a sequence of operations known as the scan cycle. The scan cycle is crucial to the functioning of the PLC and the processes it controls.

The scan cycle begins with the PLC reading the status of the input devices connected to it. This is known as the input scan. During this stage, the PLC records the state of each input, such as whether a switch is on or off, or the value returned by a sensor. This data is then stored in the PLC's memory.

Following the input scan, the PLC proceeds to execute the control program stored in its memory, in a step known as the program scan. This program, written in a language like a ladder logic or function block diagram, contains the instructions that the PLC follows to control the output devices. The PLC uses the data gathered during the input scan to determine the appropriate outputs according to the logic of the control program. 

Finally, the PLC performs an output scan, where it writes the results of the program scan to the output devices. For example, it might turn on a motor, open a valve, or activate a light, depending on the instructions in the control program and the state of the inputs.

This scan cycle repeats continuously while the PLC is in operation, typically many times per second. This is known as the scan rate. This can vary from 10ms to 1000ms, depending on the type of PLC. It is affected by the number of inputs connected, the complexity of the program, and the number of outputs. 

This allows the PLC to respond in real-time to changes in the inputs and control the outputs accordingly. The rapid and continuous cycling through input scan, program scan, and output scan is what allows the PLC to control complex industrial processes with precision and reliability.

PLC Programming Languages

PLC programming languages form an essential part of PLC operations. The International Electrotechnical Commission (IEC) has standardized five types of PLC programming languages under IEC 61131-3. These are Ladder Diagram (LD), Structured Text (ST), Instruction List (IL), Function Block Diagram (FBD), and Sequential Function Chart (SFC).

PID PLC Tank Industry Boiler Level Process Control

  1. Ladder Diagram (LD) is the most widely used PLC programming language. Rather, PLCs were initially designed to use ladder logic programming and this was the only language possible to be used with PLCs. It gets its name because the symbols used in its diagrams resemble a ladder, with two vertical rails and multiple horizontal rungs between them. Each rung represents a specific operation in the control process. The language is graphical, which makes it relatively intuitive for users who are familiar with electrical control circuits.

  2. Structured Text (ST) is a high-level textual language similar to Pascal or C. It is used for more complex PLC programs that require mathematical and logical computations. ST can be easier to read and write than graphical languages like LD, especially for those with a background in traditional computer programming. 

  3. Instruction List (IL) is a low-level textual language similar to assembly language. Each line of an IL program represents a single operation, which makes it highly efficient but also harder to read and write than high-level languages like ST.

  4. Function Block Diagram (FBD) is a graphical language that represents functions and function blocks as diagrams. This visual representation can make complex control logic easier to understand and design.

  5. Sequential Function Chart (SFC) is another graphical language, but it's unique because it represents control processes as a series of steps. Each step contains actions that are carried out when the step is active. Transitions between steps are triggered by specific conditions, making SFC an excellent choice for representing sequential control processes.

Each of these programming languages has its strengths and weaknesses, and the best choice often depends on the specific requirements of the PLC system being designed. In practice, it's common for PLC programmers to use multiple languages in a single program to take advantage of the unique strengths of each. They generally use ST for complex data manipulations and prefer LD for simple implementations.

Types of PLCs

PLCs can be classified into two types, based on their size and functionality: Compact PLCs and Modular PLCs. These PLC categories offer varying degrees of flexibility, scalability, and processing power to accommodate diverse automation needs across industries.

Compact PLCs

Compact PLCs are designed as a single unit with the processor, power supply, and I/O modules all contained within one housing. This design reduces the physical footprint of the PLC, making it an ideal choice for smaller control systems where space is a premium.

Compact PLCs typically offer a fixed number of I/O points. This can range from just a handful to several hundred, depending on the model. Some compact PLCs do allow for minor expansion of I/O points through additional modules, but the capacity for expansion is relatively limited compared to modular or rack-mounted PLCs.

One notable feature of compact PLCs is their simplicity. The integrated design reduces the need for complex wiring and installation procedures, which can save time and reduce the risk of errors during setup. Additionally, with all components contained within a single unit, troubleshooting, and maintenance can be simpler compared to more complex PLC systems.

Compact PLCs are known for their robustness and reliability. They are often used in applications where high-speed processing isn't a critical requirement but reliability, compactness, and affordability are. This makes them a popular choice for applications such as small-scale manufacturing processes, building automation systems, and simple control tasks in the water treatment or food and beverage industries.

Despite their simplicity and compactness, modern compact PLCs can be surprisingly powerful. Advances in technology have allowed manufacturers to equip compact PLCs with features that were previously only available in larger PLCs. These include sophisticated communication capabilities, support for multiple programming languages, and even onboard data logging and web server functionality.

Modular PLCs

Modular PLCs represent a more versatile type of PLC when compared to compact PLCs. They consist of a chassis or rack into which different modules can be inserted. For this reason, they are also known as Rack Mounted PLCs. These modules can be power supply units, CPU modules, communication modules, and a variety of input/output (I/O) modules. This modular approach provides the flexibility to adapt the PLC to the specific requirements of a process or a machine.

The modular nature of these PLCs allows for customization and scalability. If a process requires more I/O points or additional functionality, extra modules can be added to the rack. Conversely, if certain features are unnecessary, those modules can be omitted to save on cost. This makes modular PLCs a suitable choice for complex control systems where requirements might evolve over time.

One of the primary advantages of modular PLCs is their expandability. Some models can support hundreds or even thousands of I/O points, far exceeding the capabilities of most compact PLCs. This makes them well-suited to large-scale industrial processes that require high levels of control and data acquisition.

Another advantage of modular PLCs is their ability to support a wide range of communication options. Various communication modules can be added to the PLC to enable data exchange with other devices and systems. This includes support for standard industrial communication protocols like Modbus and Profibus, as well as more advanced technologies like Ethernet/IP and PROFINET.

While modular PLCs offer many advantages, they also require more careful planning and installation compared to compact PLCs. Selecting the right modules, configuring the PLC to work with these modules, and physically installing the modules in the rack are all tasks that require a good understanding of the PLC and the process it is controlling. Despite this, the high degree of customization and scalability offered by modular PLCs make them a popular choice for many industrial automation applications.

PLCs in Industrial Automation

In the realm of industrial automation, Programmable Logic Controllers (PLCs) serve as the digital backbone, enabling precise control of machinery and equipment. They are used to automate a variety of industrial processes, from simple machine sequencing to more complex tasks like process control and motion control. Their wide acceptance in the industry comes from their ruggedness, reliability, and ease of programming and troubleshooting.

Automated manufacturing lines, for instance, rely heavily on PLCs to control equipment and manage production. PLCs can be programmed to monitor various factors such as temperature, pressure, or flow rate, and then make decisions based on these factors to control different parts of the process. This ensures that the production line operates efficiently, with minimal human intervention.

PLCs are also commonly used for safety applications. They can monitor conditions and implement safety measures when necessary. For instance, if a machine overheats or an unsafe condition is detected, the PLC can immediately shut down the machine or even the entire process to prevent accidents.

Role of PLCs in Manufacturing

Within the manufacturing sector, PLCs play a critical role. They provide the automation necessary to increase productivity, reduce errors, and enhance the safety of the manufacturing process. For instance, in an automotive assembly line, PLCs control the movement of the conveyor belts, the operation of the robotic arms, the dispensing of materials, and the tightening of bolts.

PLCs are not only limited to controlling physical processes. They also gather and process data, contributing to what is known as smart manufacturing or Industry 4.0. This data can be used to monitor the condition of machines, predict maintenance needs, optimize production, and even make real-time adjustments to the manufacturing process to improve quality and efficiency.

In the food and beverage industry, PLCs are used to control the mixing of ingredients, the baking or cooking time, and the packaging process. They ensure consistency in the production process, which is crucial for maintaining product quality and meeting health and safety standards.

PLCs also play a significant role in the pharmaceutical industry. Here, they control and monitor the precise conditions needed for drug production, such as maintaining specific temperatures, pressures, or chemical concentrations. They also track and record data for quality control and regulatory compliance.

In conclusion, PLCs are at the heart of the modern manufacturing process, providing the automation and control necessary to produce goods quickly, efficiently, and safely. Their role in industrial automation continues to grow as new technologies and applications emerge.

PLCs in Process Control

Process control is a field within industrial automation where PLCs have found extensive use. In this context, a process refers to a series of interlinked operations or events that transform inputs into outputs, such as raw materials into finished products in a production line. The key to successful process control lies in the ability to monitor and adjust variables within the process to maintain the desired output quality.

PLCs play an integral part in process control systems by continuously monitoring process variables. These variables can range from temperature, pressure, flow rate, and pH level, among others. PLCs are capable of reading these variables through various sensors and transducers placed at strategic points within the process.

Once a PLC has collected data from the process, it compares these readings to predefined set points. If any discrepancies are detected, the PLC can initiate corrective actions. For instance, if the temperature in a chemical reactor rises above a set point, the PLC can trigger cooling mechanisms to bring the temperature back within the desired range.

To further illustrate, consider a bottling plant where PLCs are employed to control the filling process. Here, the process variable might be the volume of liquid in each bottle. PLCs would monitor the volume of liquid dispensed into each bottle, and if a bottle is detected as underfilled or overfilled, the PLC could adjust the filling mechanism accordingly to ensure the correct volume is maintained.

In the realm of advanced process control, PLCs can also incorporate algorithms for predictive control, where the PLC not only reacts to deviations but anticipates them based on historical data and trends. This ability can lead to even greater efficiencies and improvements in process stability.

PLCs are also commonly networked together in process control systems, allowing for coordinated control over large and complex processes. Through these networks, PLCs can share data and make coordinated decisions, leading to more efficient and integrated process control. These networks also facilitate centralized monitoring and control, enabling operators to oversee and adjust the entire process from a single location.

Siemens, Allen-Bradley, ABB, Mitsubishi, Schneider, and Honeywell are a few of the popular PLC manufacturers worldwide.

A Siemens Modular PLC SIMATIC S7-1500A Siemens Modular PLC SIMATIC S7-1500

Advantages and Disadvantages of Using PLCs

Advantages of PLCs

Programmable logic controllers (PLCs) offer numerous advantages when employed in industrial control systems, a few of them being:

1. Reliability: These controllers are built to be robust and dependable, and designed to function efficiently in harsh industrial environments. Compared to other types of control systems, they have a lower likelihood of failure.  The duration of PLC is also more in terms of the number of years, as compared to other controllers. 

2. Flexibility: Another advantage of PLCs is their flexibility. The range of tasks that these controllers can perform is wide, and they can be quickly reprogrammed to control a wide range of processes and devices.. This characteristic makes them highly adaptable to various industrial requirements such as manufacturing, energy production, transportation, etc. 

3. Ease of use: PLCs are also known for their ease of use. Compared to other types of industrial control systems, PLCs are relatively user-friendly. They can be programmed using a specific, simple programming language. Moreover, they often come with software that is easy to use, which simplifies the processes of programming and troubleshooting them.

4. Cost-effectiveness: Cost-effectiveness is yet another advantage of PLCs. When considering the cost of installation, maintenance, and repair, PLCs are generally more cost-effective than other types of industrial control systems. This advantage makes them an economical choice for many businesses.

5. Safety: Safety is a notable advantage of PLCs. These controllers can be programmed to include safety features that help protect both workers and equipment. For instance, they can be set to shut down a process under certain conditions, such as if a machine is overheating or if there's a risk of a collision. This feature enhances the safety of the industrial environment, protecting human lives and expensive equipment.

Recommended reading: Why You Should Backup Your PLC?

Disadvantages of PLCs

While PLCs are hailed for their robustness and adaptability, they do come with their own set of challenges. Below are a few of the disadvantages that are associated with PLCs:

1. Complexity: One such challenge is their complexity. PLCs utilize a specialized programming language that may not be familiar to all users or staff within an industry. This complexity can create an entry barrier for those who wish to use PLCs, often necessitating additional training and resource allocation. It's also worth noting that while PLCs are generally user-friendly, their intricate programming can become an issue in the maintenance phase.

2. Processing Capacity: Another limitation of PLCs is their processing power. Unlike Distributed Control Systems (DCS), which are known for their high processing capabilities, PLCs may struggle with handling complex tasks or processing large volumes of data. This is particularly evident in applications that require advanced mathematical calculations, large-scale data analysis, or high-speed precise control.

3. Limited Expandability: PLCs also face a limitation in terms of expandability. Designed to carry out specific tasks and processes, PLCs are not always easily modified or expanded to accommodate new tasks. This poses a problem in evolving industrial environments, where adaptability to new processes or tasks is often required. Unlike computer-based systems, which can be readily upgraded or expanded with new software or hardware, PLCs may require significant reconfiguration or even replacement to handle new tasks.

4. Initial Cost: The cost of PLCs is another drawback. While they are often more cost-effective than other types of industrial control systems, the initial investment in a PLC, along with its maintenance costs, can be substantial. The purchase price, installation costs, software, and occasional hardware updates, combined with regular maintenance, can add up over time, making PLCs a significant investment.

5. Dependent on Accurate Programming: Lastly, the successful operation of PLCs is heavily dependent on accurate programming. If the program written for the PLC is not correct, it may cause the PLC to malfunction. This not only affects the functionality of the machinery it controls but can also lead to significant downtime. Incorrect programming can result in operational errors, system shutdowns, and even safety hazards. These issues can lead to substantial costs for businesses, not only in terms of financial loss but also in lost productivity and potential safety risks.

Considering the above disadvantages, a few other PLC alternatives that can be used are - Distributed Control Systems (DCS), Supervisory Control and Data Acquisition (SCADA), Programmable Automation Controllers (PACs), and Remote Telemetry units (RTUs).

Conclusion

Programmable Logic Controllers (PLCs) are integral to the modern world of automation, providing a reliable, flexible, and cost-effective solution to industrial control systems. While they carry numerous advantages, they also have their own set of disadvantages including complexity, limited processing power and expandability, and dependency on correct programming.

PLCs such as the H2-DM1E, the DirectLogic 205 series, and the CLICK series are designed with specific capabilities and limitations, and it is crucial to understand these when implementing them in industrial systems. As technology evolves, PLCs continue to improve, offering more advanced features and enhanced performance.

Frequently Asked Questions (FAQs)

1. What are PLCs typically used for?

Programmable Logic Controllers (PLCs) are typically utilized in industrial automation processes. They control machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are also responsible for a variety of complex automation tasks in various industries, including manufacturing, packaging, and material handling. Furthermore, they are used to read data and even control processes.

2. What are the capabilities of CLICK PLC?

The CLICK PLC is a small, economically priced PLC designed for applications that can have up to 142 I/O (maximum of 8 modules) points. It is an optimal choice for smaller-scale projects that require economic considerations without sacrificing performance.

3. Does CLICK PLC support any expansions such as local expansion or remote I/O?

No, the CLICK PLC does not support any expansions such as local expansion or remote I/O. It is limited to 8 I/O modules for each CPU, which sets a clear boundary for its expandability.

4. Is there any way to add additional communications ports to a CLICK PLC?

There isn't a way to add additional communications ports to the CLICK PLC. All CLICK PLCs (except the C2-02 CPU, which has wireless only) come with an RS232 port. Depending on the model, a CLICK PLC may also have an additional RS-485, Ethernet, or Wi-Fi port available on the CPU. This limitation is important to consider in system designs that may require additional communication options.

5. What is the difference between PLC, SCADA & HMI?

Both PLC & SCADA are used in industrial automation for control and monitoring purposes. While PLCs are small computers, which are physical hardware, SCADA is comparable to an operating system that works on a computer system, like Windows OS. Overall, PLCs require SCADA to control their operation, while SCADA needs data collected by PLC to carry out its task. SCADA operates on a much broader scale for monitoring purposes. HMI (or Human Machine Interface) are screens, a part of the SCADA system, that is used to present data visually, in order to control or monitor data, and to interact with PLCs.

References

[1] https://instrumentationtools.com/what-is-a-plc/

[2] https://basicplc.com/different-types-of-plc/

[3] https://en.wikipedia.org/wiki/Programmable_logic_controller

More by Shreyas Sharma

I'm a Freelance Content Writer & Editor, who completed his Electronics & Communication Engineering degree from Manipal Institute of Technology, Karnataka, India in 2013. I discovered my interest in technology by assisting a Robotics club un my college, initially as a volunteer and later as its Vice ...