Introduction

A programmable logic controller (PLC) is a digital computer used for industrial automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries, including manufacturing, food and beverage, water and wastewater treatment, and transportation.
PLCs are designed to be rugged and reliable in harsh industrial environments. They are also designed to be easy to program and maintain. PLCs are typically programmed using ladder logic, a programming language that is based on the logic of electrical circuits.
The programmable controller has eliminated much of the hardwiring associated with conventional relay control circuits. Other benefits include fast response, easy programming and installation, high control speed, network compatibility, troubleshooting and testing convenience, and high reliability.
The PLC is designed for:
- Multiple input and output arrangements,
- Extended temperature ranges,
- Immunity to electrical noise, and
- Resistance to vibration and impact
Initially the PLC was used to replace relay logic, but its ever-increasing range of functions means that it is found in many and more complex applications. Because the structure of a PLC is based on the same principles as those employed in computer architecture, it is capable not only of performing relay switching tasks but also of performing other applications such as:
- Timing,
- Counting,
- Calculating,
- Comparing,
- Processing of analog signals.
Advantages
- Increased Reliability. Once a program has been written and tested, it can be easily downloaded to other PLCs. Since all the logic is contained in the PLC’s memory, there is no chance of making a logical wiring error. The program takes the place of much of the external wiring that would normally be required for control of a process. Hardwiring, though still required to connect field devices, is less intensive. PLCs also offer the reliability associated with solid-state components.
- More Flexibility. It is easier to create and change a program in a PLC than to wire and rewire a circuit. With a PLC the relationships between the inputs and outputs are determined by the user program instead of the way they are interconnected. Original equipment manufacturers can provide system updates by simply sending out a new program. End users can modify the program in the field, or if desired, security can be provided by hardware features such as key locks and by software passwords.
- Lower Cost. PLCs were originally designed to replace relay control logic, and the cost savings have been so significant that relay control is becoming obsolete except for power applications. Generally, if an application has more than about a half-dozen control relays, it will probably be less expensive to install a PLC.
- Communications Capability. A PLC can communicate with other controllers or computer equipment to perform such functions as supervisory control, data gathering, monitoring devices and process parameters, and download and upload programs.
- Faster Response Time. PLCs are designed for high speed and real-time applications. The programmable controller operates in real time, which means that an event taking place in the field will result in the execution of an operation or output. Machines that process thousands of items per second and objects that spend only a fraction of a second in front of a sensor require the PLC’s quick-response capability.
- Easier to Troubleshoot. PLCs have resident diagnostics and override functions that allow users to easily trace and correct software and hardware points. For example, a control system consisting of hundreds of input and output field devices may be contained within a very large manufacturing area. Thus, it would take a considerable amount of time to check each device at its location. By having each device wired back to a common point on a PLC module, each device could be checked for operation quickly.
Parts of PLC

- The processor (CPU) is the “brain” of the PLC. A typical processor usually consists of a microprocessor for implementing the logic and controlling the communications among the modules. The processor requires memory for storing user program instructions, numerical values, and I/O devices status.
- The power supply supplies DC power to other modules that plug into the rack. For large PLC systems, this power supply does not normally supply power to the field devices. With larger systems, power to field devices is provided by external alternating current (AC) or direct current (DC) supplies. For some small micro-PLC systems, the power supply may be used to power field devices.
- A programming device is used to enter the desired program into the memory of the processor. The program can be entered using relay ladder logic, which is one of the most popular programming languages. Instead of words, ladder logic programming language uses graphic symbols that show their intended outcome. A program in ladder logic is like a schematic for a relay control circuit. It is a special language written to make it easy for people familiar with relay logic control to program the PLC. Hand-held programming devices are sometimes used to program small PLCs because they are inexpensive and easy to use. Once plugged into the PLC, they can be used to enter and monitor programs. Both compact hand-held units and laptop computers are frequently used on the factory floor for troubleshooting equipment, modifying programs, and transferring programs to multiple machines.
- The I/O system forms the interface by which field devices are connected to the controller. The purpose of this interface is to condition the various signals received from or sent to external field devices. Input devices such as pushbuttons, limit switches, and sensors
Fixed and Modular I/Os
- Fixed I/O is typical of small PLCs that come in one package with no separate, removable units. The processor and I/O are packaged together, and the I/O terminals will have a fixed number of connections built in for inputs and outputs. The main advantage of this type of packaging is lower cost. The number of available I/O points varies and usually can be expanded by buying additional units of fixed I/O. One disadvantage of fixed I/O is its lack of flexibility; you are limited in what you can get in the quantities and types dictated by the packaging. Also, for some models, if any part in the unit fails, the whole unit must be replaced.

- Modular I/O is divided by compartments into which separate modules can be plugged. This feature greatly increases your options and the unit’s flexibility. You can choose from the modules available from the manufacturer and mix them any way you desire. The basic modular controller consists of a rack, power supply, processor module (CPU), input/output (I/O modules), and an operator interface for programming and monitoring. The modules plug into a rack. When a module is slid into the rack, it makes an electrical connection with a series of contacts called the backplane, located at the rear of the rack. The PLC processor is also connected to the backplane and can communicate with all the modules in the rack.

PLCs vs Computers

The architecture of a PLC is basically the same as that of a personal computer. A personal computer (PC) can be made to operate as a programmable logic controller if you provide some way for the computer to receive information from devices such as pushbuttons or switches. You also need a program to process the inputs and some way to turn devices on and off.
However, some important characteristics distinguish PLCs from personal computers.
- The PLC is designed to operate in an industrial environment with wide ranges of ambient temperature and humidity.
- The PLC is programmed in relay ladder logic or other easily learned languages.
- Most PLCs execute a single program in an orderly and sequential fashion from first to last instruction.
- PLC control systems have been designed to be easily installed and maintained.
PLCs and Computers
Human Machine Interface
PLC software that allows the user to monitor and control the process is called a human machine interface (HMI). It enables the user to view a process—or a graphical representation of a process—on a monitor, determine how the system is running, trend values, and receive alarm conditions. Many operator interfaces do not use PLC software. PLCs can be integrated with HMIs, but the same software does not program both devices.

Programmable automation controllers.
most recently automation manufacturers have responded to the increased requirements of industrial control systems by blending the advantages of PLC-style control with that of PC-based systems. Such a device has been termed a programmable automation controller, or PAC. Programmable automation controllers combine PLC ruggedness with PC functionality. Using PACs, you can build advanced systems incorporating software capabilities such as advanced control, communication, data logging, and signal processing with rugged hardware performing logic, motion, process control, and vision.

PLC Applications
Programmable Logic Controllers (PLCs) are used in a wide variety of applications, including:
- Machine control: PLCs are used to control machines in a variety of industries, such as manufacturing, food and beverage, and packaging. They can be used to control the speed, direction, and sequence of operations of machines.
- Process control: PLCs are used to control industrial processes, such as chemical plants, oil refineries, and water treatment plants. They can be used to monitor and control variables such as temperature, pressure, and flow rate.
- Robotics: PLCs are used to control robots in a variety of applications, such as assembly lines, welding, and painting. They can be used to send commands to the robot and to receive feedback from the robot’s sensors.
- Motion control: PLCs are used to control the motion of actuators, such as motors and valves. They can be used to position actuators accurately and to control their speed and torque.
- Data acquisition: PLCs can be used to collect data from sensors and to store the data in memory. The data can then be used to monitor the performance of a process or to troubleshoot problems.
- Safety interlocks: PLCs can be used to implement safety interlocks, which are used to prevent dangerous situations from occurring. For example, a PLC can be used to interlock a machine so that it cannot start if a door is open.
- Building automation: PLCs are used to control building automation systems, such as HVAC, lighting, and security. They can be used to monitor and control the temperature, humidity, and lighting in a building, as well as to provide security features such as access control and fire alarms.
- Transportation: PLCs are used to control transportation systems, such as elevators, escalators, and railways. They can be used to control the speed, direction, and braking of vehicles, as well as to provide safety features such as door interlocks and emergency stop buttons.
- Medical devices: PLCs are used to control medical devices, such as infusion pumps and ventilators. They can be used to monitor and control the flow of medication or the ventilation of a patient, as well as to provide safety features such as alarms and interlocks.
- Other applications: PLCs are also used in a variety of other applications, such as packaging, printing, and water treatment.