PLC (Programmable Logic Controller)
A programmable logic controller (PLC) or programmable
controller is a digital computer used for automation of industrial
processes, such as control of machinery on factory assembly lines.
Unlike general-purpose computers, the PLC is designed for multiple
inputs and output arrangements, extended temperature ranges, immunity to
electrical noise, and resistance to vibration and impact. Programs to
control machine operation are typically stored in battery-backed or
non-volatile memory. A PLC is an example of a real time system since
output results must be produced in response to input conditions within a
bounded time, otherwise unintended operation will result.
Hence, a programmable logic controller is a
specialized computer used to control machines and processes. It
therefore shares common terms with typical PCs like central processing
unit, memory, software and communications. Unlike a personal computer though the
PLCis
designed to survive in a rugged industrial atmosphere and to be very
flexible in how it interfaces with inputs and outputs to the real world.
The components that make a PLC work can be divided into three core areas.
PLCs come in many shapes and sizes. They can be so
small as to fit in your shirt pocket while more involved controls
systems require large PLC racks. Smaller PLCs (a.k.a. “bricks”) are
typically designed with fixed I/O points. For our consideration, we’ll
look at the more modular rack based systems. It’s called “modular”
because the rack can accept many different types of I/O modules that
simply slide into the rack and plug in.
Figure 1 Power supply and Rack
Figure 2 Backplane
Rack
The rack is the component that holds everything
together. Depending on the needs of the control system it can be
ordered in different sizes to hold more modules. Like a human spine the
rack has a backplane at the rear which allows the cards to communicate
with the CPU. The power supply plugs into the rack as well and supplies
a regulated DC power to other modules that plug into the rack. The
most popular power supplies work with 120 VAC or 24 VDC sources.
CPU
The brain of the whole PLC is the CPU module. This
module typically lives in the slot beside the power supply.
Manufacturers offer different types of CPUs based on the complexity
needed for the system.
The CPU consists of a microprocessor, memory chip and
other integrated circuits to control logic, monitoring and
communications. The CPU has different operating modes. In programming mode it accepts the downloaded logic from a PC. The CPU is then placed in run modeso that it can execute the program and operate the process.
Since a PLC is a dedicated controller it will only process this one program over and over again. One cycle through the program is called a scan time and involves reading
the inputs from the other modules, executing the logic based on these
inputs and then updated the outputs accordingly. The scan time happens
very quickly (in the range of 1/1000th of a second). The memory in the
CPU stores the program while also holding the status of the I/O and
providing a means to store values.
Figure 3 Components of a PLC
Comparison of PLC with other control devices
The main difference from other computers is that
PLCs are armored for severe condition (dust, moisture, heat, cold, etc)
and have the facility for extensive input/output (I/O) arrangements.
These connect the PLC to
sensors
and actuators. PLCs read limit switches, analog process variables (such
as temperature and pressure), and the positions of complex positioning
systems. Some even use machine vision. On the actuator side, PLCs
operate electric motors, pneumatic or hydraulic cylinders, magnetic
relays or solenoids, or analog outputs. The input/output arrangements
may be built into a simple PLC, or the PLC may have external I/O modules
attached to a computer network that plugs into the PLC.
PLCs were invented as replacements for automated
systems that would use hundreds orressed all decision making logic in
simple ladder logic which appeared similar to electrical schematic
diagrams. The electricians were quite able to trace out circuit problems
with schematic diagrams using ladder logic. This program notation was
chosen to reduce training demands for the existing technicians. Other
early PLCs used a form of instruction list programming, based on a
stack-based logic solver.
The functionality of the PLC has evolved over the
years to include sequential relay control, motion control, process
control, distributed control systems and networking. The data handling,
storage, processing power and communication capabilities of some modern
PLCs are approximately equivalent to desktop computers. PLC-like
programming combined with remoteI/O hardware, allow a general-purpose desktop computer to overlap some PLCs in certain applications.
Under the IEC 61131-3 standard, PLCs can be
programmed using standards-based programming languages. A graphical
programming notation called Sequential Function Charts is available on
certain programmable controllers.
PLCs
are well-adapted to a range of automation tasks. These are typically
industrial processes in manufacturing where the cost of developing and
maintaining the automation system is high relative to the total cost of
the automation, and where changes to the system would be expected during
its operational life. PLCs contain input and output devices compatible
with industrial pilot devices and controls; little electrical design is
required, and the design problem centers on expressing the desired
sequence of operations in ladder logic (or function chart) notation. PLC
applications are typically highly customized systems so the cost of a
packaged PLC is low compared to the cost of a specific custom-built
controller design. On the other hand, in the case of mass-produced
goods, customized control systems are economic due to the lower cost of
the components, which can be optimally chosen instead of a “generic”
solution, and where the non-recurring engineering charges are spread
over thousands of sales.
For high volume or very simple fixed automation
tasks, different techniques are used. For example, a consumer dishwasher
would be controlled by an electromechanical cam timer costing only a
few dollars in production quantities.
A microcontroller-based design would be
appropriate where hundreds or thousands of units will be produced and so
the development cost (design of power supplies and input/output
hardware) can be spread over many sales, and where the end-user would
not need to alter the control. Automotive applications are an example;
millions of units are built each year, and very few end-users alter the
programming of these controllers. However, some specialty vehicles such
as transit busses economically use PLCs instead of custom-designed
controls, because the volumes are low and the development cost would be
uneconomic.
Very complex process control, such as used in the
chemical industry, may require algorithms and performance beyond the
capability of even high-performance PLCs. Very high-speed or precision
controls may also require customized solutions; for example, aircraft
flight controls.
PLCs may include logic for single-variable
feedback analog control loop, a “proportional, integral, derivative” or
“PID controller.” A PID loop could be used to control the temperature of
a manufacturing process, for example. Historically PLCs were usually
configured with only a few analog control loops; where processes
required hundreds or thousands of loops, a distributed control system
(DCS) would instead be used. However, as PLCs have become more powerful,
the boundary between DCS and PLC applications has become less
clear-cut.