programmable logic controller (plc)portal.unimap.edu.my/portal/page/portal30/lecture...
Post on 17-Mar-2020
43 Views
Preview:
TRANSCRIPT
PROGRAMMABLE LOGIC CONTROLLER (PLC)
Introduction
Background History
Early machines were controlled by mechanical means using cams, gears, levers, and
other basic mechanical devices. As the complexity grew, so did the need for a more
sophisticated control system. This system contained wire relay and switch control
elements. These elements were wired as required to provide the control logic necessary
for the particular type machine operation. This was acceptable for a machine that never
needed to be changed or modified, but as manufacturing techniques improved and plant
changeover to new products became more desirable and necessary, a more versatile
means of controlling this equipment had to be developed.
Hardwired relay and switch logic was cumbersome and time consuming to modify.
Wiring had to be removed and replaced to provide for the new control scheme. This
modification was difficult and time consuming to design and install and any small ―bug‖
in the design could be a major problem to correct since it also required rewiring of the
system. A new means to modify control circuitry was needed. The development and
testing ground for this new means was the U.S. auto industry. The time period was the
late 1960s and early 1970s, and the result was the programmable logic controller or PLC.
Automotive plants were confronted with a change in manufacturing techniques every
time a model changed and, in some cases, for changes on the same model if
improvements had to be made during the model year. The PLC provided an easy way to
reprogram the wiring rather than actually rewiring the control system.
The PLC that was developed during this time was not very easy to program. The
language was cumbersome to write, requiring highly trained programmers. These early
devices were merely relay replacements and could do very little else. The PLC has at first
gradually, and in recent years rapidly, developed into a sophisticated and highly versatile
control system component. Units today are capable of performing complex math
functions including numerical integration and differentiation and operate at the fast
microprocessor speeds now available. Older PLCs were capable of only handling discrete
inputs and outputs (i.e., on-off type signals), while today‘s systems can accept and
generate analog voltages and currents as well as wide range of voltage levels and pulsed
signals. PLCs are also designed to be rugged. Unlike their personal computer cousin, they
can withstand the vibration, shock, elevated temperatures, and electrical noise witch
manufacturing equipment is exposed.
As more manufacturers become involved in PLC production and development, and PLC
capabilities expand, the programming language is also expanding. This is necessary to
allow the programming of these advanced capabilities. Also manufacturers tend to
develop their own versions of ladder logic language (the language used to program
PLCs). This complicates learning to program PLCs in general since one language cannot
be learned that is applicable to all types. However, as with other computer languages,
once the basics of PLC operation and programming in ladder logic are learned, adapting
to various manufacturer‘s devices is not a complicated process. Most system designers
eventually settle on one particular manufacturer that produces a PLC is personally
comfortable to program and has the capabilities suited to his or her area of applications.
Definition
A Programmable Logic Controller (PLC) is defined by Capiel (1982) as: (based on
National Electrical Manufacturers Association (NEMA) standard ICS3-1978 Part ICS3-
304):
―A digitally operating electronic system designed for use in an industrial environment,
which uses a programmable memory for the internal storage of instructions for
implementing specific functions such as logic, sequencing, timing, counting and
arithmetic to control through analog or digital input/output modules, various types of
machines or processes‖.
The diagram block of a PLC functions are display in Figure 2.1.
Figure 2.1 PLC Functions
A programmable logic controller (PLC) is a microprocessor based device that can be
utilized to control industrial system such as electric motors, conveyors, robots, etc.
The PLC was first introduced in the late 1960s in the automotive industry by General
Motors (GM) Corporation, where an initial specification was provided: the controller
must be:
1. Easily programmed and reprogrammed, preferably in-plant, to alter its sequence
of operations.
2. Easily maintained and repaired—preferably using plug-in modules.
3. More reliable in a plant environment.
Timing Counting
Programmable Logic Controller
Data
Handling Control
Logic Sequencing
4. Smaller than its relay equivalent.
5. Cost competitive, with solid-state and relay panels then in use.
Prior to PLC technology, electrical relay logic devices were used in industrial and process
control systems. Relay logic devices are control panels with external inputs, outputs,
counters, timers and other circuits wired to them. The control panel that held the relay
logic devices was much larger and more expansive than a PLC system. In addition,
modifying a relay logic panel required rewiring relay devices. This process is both
expensive and time consuming. A PLC, by contrast, requires minor wiring.
Consequently, a PLC system can be modified and reprogrammed within a few hours.
Although PLCs are similar to ‗conventional‗ computers in terms of hardware
technology, they have specific features suited to industrial control:
Rugged, noise immune equipment
Modular plug-in construction, allowing easy replacement/addition of units (e.g.
input/output).
Standard input/output connections and signal levels.
Easily understood programming language (e.g. ladder diagram or function chart)
Ease of programming and reprogramming in-plant.
PLC Advantages and Disadvantages
Following are 13 major advantages of using a programmable controller:
1. Flexibility. In the past, each different electronically controlled production machine
required its own controller; 15 machines might require 15 different controllers.
Now it is possible to use just one model of a PLC to run any one of the 15
machines. Furthermore, you would probably need fewer than 15 controllers,
because one PLC can easily run many machines. Each of the 15 machines under
PLC control would have its own distinct program.
2. Implementing Changes and Correcting Errors. With a wired relay-type panel, any
program alterations require time for rewiring of panels and devices. When a PLC
program circuit or sequence design change is made, the PLC program can be
changed from a keyboard sequence in a matter of minutes. No Rewiring is required
for a PLC-controlled system. Also, if a programming error has to be corrected a
PLC control ladder diagram, a change can be typed in quickly.
3. Large Quantities of Contacts. The PLC has a large number of contacts for each coil
available in its programming. Suppose that a panel-wired relay has four contacts
and all are in use when a design change requiring three more contacts is made.
Time would have to be taken to procure and install a new relay or relay contact
block. Using a PLC, however, only three more contacts would be typed in. The
three contacts would automatically available in the PLC. Indeed, a hundred contacts
can be used from one relay—if sufficient computer memory is available.
4. Lower Cost. Increased technology makes it possible to condense more functions
into smaller and less expensive packages. Now you can purchase a PLC with
numerous relays, timers, and counters, a sequencer, and other functions for a few
hundred dollars.
5. Pilot Running. A PLC programmed circuit can be pre run and evaluated in the
office or lab. The program can be typed in, tested, observed, and modified if
needed, saving valuable factory time. In contrast, conventional relay systems have
been best tested on the factory floor, which can be very time consuming.
6. Visual Observation. A PLC circuit‘s operation can be seen during operation directly
on a CRT screen. The operation or miss-operation of a circuit can be observed as it
happens. Logic path light up on the screen as they are energized. Troubleshooting
can be done more quickly during visual operation.
In advanced PLC systems, an operator message can be programmed for each
possible malfunction. The malfunction description appears on the screen when the
malfunction is detected by the PLC logic (for example: ―MOTOR #7 IS
OVERLOADED‖). Advanced PLC systems also have descriptions of the function
of each circuit component. For example, input #1 on the diagram could have
―CONVEYOR LIMIT SWITCH‖ on the diagram as a description.
7. Speed of Operation. Relay can take an unacceptable amount of time to actuate. The
operational speed for the PLC program is very fast. The speed for the PLC logic
operation is determined by scan time, which is a matter of milliseconds.
8. Ladder or Boolean Programming Method. The PLC programming can be
accomplished in the ladder mode by an electrician. Alternatively, a PLC
programmer who works in digital or Boolean control systems can also easily
perform PLC programming.
9. Reliability and Maintainability. Solid-state devices are more reliable, in general,
than mechanical system or relays and timers. The PLC is made of solid-state
components with very high reliability rates. Consequently, the control system
maintenance costs are low and downtime is minimal.
10. Simplicity of Ordering Control System Components. A PLC is one device with one
delivery date. When the PLC arrives, all counters, relays, and other components
also arrive. In designing relay panel, however, you may have 20 different relays and
timers from 12 different suppliers. Obtaining the parts on time involves various
delivery dates and availabilities. With a PLC you have one product and one lead
time for delivery. In a relay system, forgetting to buy one component would mean
delaying the startup of the control system until that component arrives. With the
PLC, one more relay is always available—provided that you ordered a PLC with
enough extra computing power,
11. Documentation. An immediate printout of the true PLC circuit is available in
minutes, if required. There is no need to look for the blue print of the circuit in
remote files. The PLC prints out the actual circuit in operation at a given moment.
Often, the file prints for relay panels are not properly kept up to date. A PLC
printout is the circuit at present time; no wire tracing is needed for verification.
12. Security. A PLC program change can not be made unless the PLC is properly
unlocked and programmed. Relay panels tend to undergo undocumented changes.
People on late shift do not always record panel alteration made when the office area
is locked up for the night.
13. Ease of Changes by Reprogramming. Since the PLC can be reprogrammed quickly,
mixed production processing can be accomplished. For example, if part B comes
down the assembly line while part A is still processed, a program for part B‘s
processing can be reprogrammed into the production machinery in a matter of
seconds.
These 13 items are some of advantages of using a PLC. There will, of course, be other
advantages in individual applications and industries.
Following are some disadvantages of, or perhaps precautions involved in, using PLCs:
a. Newer Technology. It is difficult to change the thinking of some personnel from
ladders and relays to the PLC computer concept. Although today, with the
pervasive use of computers not only at home and in the office but on the factory
floor, acceptance of the computer as a powerful and reliable productivity—
enhancing tool is, if not universal, almost so. Electricians and technicians are lining
up to take courses on PLCs because they know that doing so contributes to job
security and advancement.
b. Fixed Program Applications. Some applications are single-function applications. It
does not pay to use a PLC that includes multiple programming capabilities if they
are not needed. One example is in the use of drum controller/sequencers. Some
equipment manufacturers still use a mechanical drum with pegs at an overall cost
advantage. Their operational sequence is seldom or never changed, so the
reprogramming available with the PLC would not be necessary.
c. Environmental Considerations. Certain process environments, such as high heat and
vibration, interfere with electronic devices in PLCs, which limit their use.
d. Fail-Save Operation. In relay systems, the stop button electrically disconnects the
circuit; if the power fails, the system stops. Furthermore, the relay system does not
automatically restart when power is restored. This, of course, can be programmed
into the PLC; however, in some PLC programs, you may have to apply an intpu
voltage to cause a device to stop. These systems are not fail-safe. This advantage
can be overcome by adding safety relays to a PLC system.
e. Fixed-Circuit Operation. If the circuit in operation is never altered, a fixed control
system (such as a mechanical drum ) might be less costly than a PLC. The PLC is
most effective when periodic changes in operation are made.
PLC Configurations
Programmable controllers are much like personal computers in that the user can be
overwhelmed by the vast array of options and configurations available. Therefore, when
in comes to selecting a PLC for an application, experience is the best teacher. As one
gains experience with the various options and configurations available, it becomes less
confusing to select the unit that will best perform in a particular application.
Basic PLC are available on a single printed circuit board as shown in Figure 2.2. They are
sometimes called single board PLCs or open frame PLCs.
Figure 2.2 Open frame PLC
These are totally self-contained (with the exception of a power supply), and, when
installed in a system, they are simply mounted inside a control cabinet on threaded
standoffs. Screw terminals on the printed circuit board allow for the connection of the
input, output and power supply wires. These units are generally not expandable, meaning
that extra inputs, outputs, and memory cannot be added to the basic unit. However, some
of the more sophisticated models can be linked by cable to expansion boards that provide
extra input/output. Therefore, with few exceptions, when using this type of PLC, the
system designer must take care to specify a unit that has enough inputs, outputs, and
programming capability to handle both the present need of the system and any future
modifications that may required. Single board PLCs are very inexpensive, easy to
program, small, and consume little power, but generally speaking, they do not have a
large number of inputs and outputs and have a somewhat limited instruction set. They are
best suited to small, relatively simple control applications.
PLCs are also available housed in a single case (sometimes referred to as a shoe box)
with all input and output, power and control connection pints located on the single unit as
shown in Figure 2.3. These are generally chosen according to available program memory
and required number of voltage levels of inputs and outputs to suit the application. These
system generally have an expansion port (an interconnection socket) that will allow the
addition of specialized units such as high-speed counters and analog input and output
units or additional discrete inputs or outputs. These expansion units are either plugged
directly into the main case or connected to it with ribbon cable or other suitable cable.
Figure 2.3 Shoebox-style PLCs
More sophisticated units, with a wider array of options, are modularized. An example of
a modularized PLC is shown in Figure 2.4
Figure 2.4 Modularized PLC
PLC Block Diagram (Overall PLC System)
All PLC systems are comprised of the same basic building block that detect incoming
data, process it, and control various outputs. Figure 2.5 displays the schematic diagram of
a PLC.
Figure 2.5 Block diagram of a PLC device
With the exception of the rack assembly, the PLC consists of at least four main units:
(1) the central processing unit (CPU)
(2) power supply
(3) input modules
(4) output modules
All PLC devices have discrete, or fixed, input and output ports. Discrete input ports are
ports that are either open (off) or closed (on). Discrete output ports are ports that are
either energized (on) or de-energized (off).
Larger and more advanced PLC devices will also have analog, or variable, input and
output ports. With variable input ports and variable output ports, converter chips are
used to convert variable voltage/current to binary data.
Figure 2.6a displays the major sections of programmable controller with input and output
transducers. A typical PLC bloc diagram is shown in Figure 2.6b.
(a) Major sections of a PLC
(b) Typical PLC block diagram
Figure 6 Major sections and typical block diagram of a PLC
Rack Assembly
These modules can be contained in one housing or placed on different slots of a chassis.
These slots are called racks, such as shown in Figure 2.7
Figure 2.7 The rack assembly of a PLC
The PLC rack serves several functions:
- Physically holds the module in place
- Also provides electrical connections between the modules by using a printed
circuit board, called a back plane, at the back of the rack assembly.
The modules are easily inserted into channels on the rack. They fit into sockets mounted
on the motherboard to make electrical contact with the other circuitry. The ability to plug
modules into the rack allows maintenance personnel to replace defective units quickly.
If all the units are in one fixed enclosure, the PLC is called a fixed PLC. If each unit is
placed in different racks, the PLC is called a modular PLC.
Central Processing Unit
The CPU is the heart of the PLC system. Figure 2.8 shows the schematic diagram of a
typical central processing unit. The central processing unit (CPU) includes the
microprocessor, memory and support chips in a PLC system.
Figure 2.8 Block diagram of a central processing unit (CPU)
The microprocessor unit (MPU) is the brain of the central processing unit that receives,
analyzes, processes, and sends data. The processor (sometimes called a CPU), as in the
self contained units, is generally specified according to memory required for the program
to be implemented. In the modularized version, capability can also be a factor. This
includes features such as higher math functions, PID control loops, and optional
programming commands. The processor consists of the microprocessor, system memory,
serial communication port for printer, PLC LAN link and external programming devices,
and in some cases, the system power supply (backup batteries) to power the processor
and I/O modules. The backup battery keeps the user process control ladder program in
storage in the event of a plant power failure. The data are in digital pulse form. Figure 2.9
displays a diagram of an internal circuit of a typical microprocessor.
Figure 2.9 MPU internal registers
Internal registers are used by the MPU to hold data for arithmetic logic unit. The
arithmetic logic unit (ALU) decodes and carries out the math and logic instructions.
Intel and Motorola are two major microprocessor manufacturers in the United States.
PLCs can employ either Intel, Motorola or other manufacturers‘ microprocessors. The
microprocessors manufactured by Intel are very common. They are used in IBM and IBM
compatible computers.
Microprocessors are classified as two how powerful they are. Two factors determine
power : bit size and clock speed. They are 4-, 8-. 16-, and 32-bits microprocessors, which
manipulate data 4,8, 16, or 32 bit at any time, respectively. The larger the bit size, the
more powerful the computer. Clock speed determines how quickly a microprocessor
executes instructions. Clock speed range from a low of 1 MHz to over 300 MHz. The
faster the clock speed, the more powerful the computer.
A description of a few of the Intel and Motorola microprocessors :
Intel Bit Size Clock Speed Motorola
8085 8-bit 1 MHz 6800
8086 16-bit 4.77 MHz 6802
80186 16-bit 8 MHz
80286 16-bit 12.5 MHz 6809
80386 32-bit 33 MHz 68000
80386SX 68010
80486 32 –bit 50 MHz 68020
Pentium 32-bit/64-bit 200 MHz 68030
Pentium Pro 68040
Pentium with MMX
The Intel 80486 and Pentium microprocessor are used by larger and more advanced PLC
systems. Smaller and medium size PLC system use the Intel 8085, 8086, 80286 and
80386 microprocessors.
The Motorola 68000, 68010,68020, 68030 and 68040 processors are 32-bit processors.
These processors are used by Apple Computers and other advanced PLC systems.
Motorola 6800, 6802,6809 are 8-bit processors. These 8-bits processors are used by
smaller PLC devices.
Memory Devices
There two types of internal memory devices available to a CPU:
- random access memory (RAM) and
- read only memory (ROM).
Random Access Memory (RAM)
Random access memory (RAM) is used by CPU for temporary data storage which loss
their contents when power is turned off : volatile memories. RAM can be written to and
read from when correct control signals are present.
There are two types of RAM chips:
- static RAM and
- dynamic RAM
Static RAM (SRAM) stores data bits in its internal flip-flops or bistable circuits. Flip-flops
are sequential digital devices that generate a different output for every input on the next
clock pulse. SRAM memory devices are faster than dynamic RAM. Usually the cache
memory of a computer uses SRAM. Cache memory holds the data that was most recently
read from the system memory. If these data requested again, the cache can furnish it to
the microprocessor at a much faster speed than the system memory.
However, since every flip-flop is built using at least four transistors, static RAM holds
less data per a square inch area than dynamic RAM. Hence, static RAM is more
expensive than dynamic RAM.
Dynamic RAM (DRAM) stores data in the form of charge on capacitors. An advantage of
DRAM is that, typically, only one transistor is used to hold one bit of data in a DRAM
memory chip. Thus, the DRAM holds more data bits per square inch area than the
SRAM. This makes DRAM memory devices cost less than SRAM memory devices.
However, due to capacitor leakage, the data in dynamic RAM must be refreshed or
updated within very short intervals (such as every millisecond). This requires refreshing
circuitry on the computer motherboard.
Smaller and medium PLC devices use SRAM, while larger and more advanced PLC
devices may use DRAM memory devices.
Read Only Memory (ROM)
A microprocessor unit can only read data from the ROM. The software that resides in a
ROM is called firmware. This group does not loss data when power is removed: non-
volatile memory.
There are two different types of ROM memory devices:
1. Non-erasable memories consist of:
- Masked or preprogrammed ROM
- Programmable ROM (PROM)
2. Erasable memories consist of:
- Erasable programmable ROM (EPROM) or ultraviolet-erasable
programmable EPROM (UVEPROM)
- Electrically erasable PROM (EEPROM) or Flash ROM.
Masked ROM or preprogrammed ROM is usually permanently programmed by the
manufacturer at the factory and can not be subsequently altered. ROMs are used for the
production of large batches of identically programmed devices. Therefore, a customer
must order several thousand masked ROM chips from a factory.
Programmable ROM (PROM) which can be programmed by the user (via a PROM
programmer). This involves the breaking of ‗weak links‘ in the memory chip to form the
desired circuit, and is not a reversible process. (Similar to programmable logic array
(PLA)). Hence, PROM is programmed or ―burned‖ only once by the programmer. In
other words, the manufacturer furnishes the chip in an un-programmed or semi-
programmed state. The user than programs the chip to his or her requirements. No
erasures are possible. To change the program in a programmed PROM, we throw it away
and replace it with a new, un-programmed PROM. The PROM is seldom used because it
requires special programming circuits. It does, however, have the advantage of being an
unalterable backup to a ROM.
EPROM which can be programmed in a similar way to PROMs, and can have their
contents erased by exposure to ultraviolet light for approximately 30 minutes.(They have
a transparent quartz window over the actual chip).Thus it is also called a UVPROM.
EPROMs can then be re-programmed, and this procedure may be carried out several
times. A special device call ROM burner is used to program the PROM and EPROM.
EPROM ICs
When exposed to UV light, the chip‘s memory bits are reset to zero. The chip,s window
is covered during normal use to prevent unwanted erasure. The advantage of EPROM is
that it can be reused. There are two major disadvantages of the EPROM, however. One is
downtime interval required for its reprogramming. Downtime includes removal time, UV
light exposure time, and reinsertion time. Two, when EPROM is exposed to UV light, all
its memory locations are erased. The EPROM must then be completely reprogrammed,
even if only one or two memory slots required updating.
EEPROM or Flash ROM is similar to EPROM, but it can be erased electrically by
injecting an electrical current through it. Usually a higher voltage (e.g. +12 V, or -12 V)
is used to program or erase the flash ROM while it is on a computer motherboard. These
larger voltage levels are available on almost all PC motherboard. Te EEPROM‘s
advantage over EPROM is the ease and speed with which it is reset and erased.
Flash ROM is more expensive than EPROM. EPROM is more expensive than PROM.
The nonvolatile random access memory (NOVRAM) is a combination chip. It is a
combination of an EEPROM and a RAM. When the power is about to go off, the contents
of the RAM memory are quickly stored in the EEPROM. The stored data can then be
read into the RAM memory when the power is again restored. The NOVRAM chip
combines the flexibility of RAM memory with the non-volatility of EEPROM.
Note: Many CPUs contain backup batteries that keep the user process control ladder
program in storage in the event of a plant power failure. Typical retentive backup
time is one month to one year. The basic operating system is stored permanently
in the CPU, in rand only memory (ROM), and is not lost when input power is lost.
However, the user process control ladder program, being in random access
memory (RAM), is not stored permanently. Battery backup power enables the
CPU to retain the user program in the event of power loss. Only the user program
can be lost or erased when PLC CPU power is lost.
Whether solid-state memory is volatile or non-volatile, it chips are classified according to
bit (cell) size. A bit is a 0 or a 1 (low or high voltage) that occupies a given cell. Cells are
arranged in slots, usually 8 or 16 bits wide. When bits are thus combined, they are
referred to as words. An 8-bit word is called a byte. Two bytes are often arranged side by
side to form a 16-bit word. In Figure 2.10a we see the arrangement for a 1-kilobyte (1
KB) memory. It has 1 K (actually 1024) slot locations, each 8 bits, wide. Figure 2.10b
shows a typical 2 KB memory. It has 1 K slot locations, each 16 bits (or 2 bytes) wide.
Today‘s PLCs contain anywhere from 1 to 256 KB of solid-state memory, most of which
is RAM.
Obviously, the more processes we want to control, the more memory of the PLC requires.
The amount of memory we need is described in individual manufacturer‘s specification
manuals. We need more memory for analog control than for discrete operation of a
comparable process. As memory size increases, the cost of the CPU unit also increases. It
is possible to buy much memory if our needs are not calculated properly.
When an application is matched to a PLC, the memory required depends on the number
of inputs, outputs, and the complexity of the control diagram. A most important feature of
a PLC as these factors increase is expandability of memory. Some PLC models do not
have memory expansion capabilities and have to be completely replaced if more memory
for bigger task becomes necessary. However, many PLC models can have memory
modules added to the existing CPU. Adding a new memory module is much less costly
than replacing the entire PLC system. It is wise to consider memory expandability when
purchasing a PLC.
PLC Power Supply The power supply provides voltages that are necessary to operate the circuitry through
out the PLC. Some sections of the PLC require an AC voltage, such as AC input and
output modules or the field devices that are connected to them. Other sections require a
low-level DC voltage source such as the internal circuitry of the PLC. Figure 2.10
displays the schematic diagram of a typical power supply in a PLC.
Figure 2.10 PLC power supply
This power supply circuit consists of 4 major sections:
- Step-down transformer
- Two full wave bridge rectifiers to provide positive and negative voltages
- Filter network
- Voltage regulator to maintains a constant DC voltage if power line
fluctuations or changing load demands occur.
Sometimes this power supply is equipped with line conditioner or varistor which
connected in series to input transformer that take care of any spikes in input power.
I/O Modules (Interfaces)
The input module performs four tasks electronically (serve four basic functions):
1. Termination. Each I/O module provides terminal connection to which field
devices can be controlled. Each terminal is assigned an identification number. It
senses the presence or absence of an input signal at each of its input terminals.
The input signal tells what switch, sensor, or other signal is on or off in the
process being controlled.
2. Signal Conditioning. Most of the voltages used by field devices are not
compatible with the low voltage data signals processed inside the PLC. It converts
the input signal for on, or high, to a dc level usable by the module‘s electronic
circuit. For a low, or off, input signal, no signal is converted, indicating off.
3. Isolation. The input module carries out electronic isolation by electronically
isolating the input module output from its input.
4. Indication. Each terminal has an associated indicator. Its function is to illuminate
when a voltage applied to that terminal. I/O modules use either LEDs or neon
lightbulbs as indicators. The electronic isolation circuit must produce an output to
be sensed the PLC CPU.
All these functions are illustrated by the module layout in Figure 2.11.
A typical input module has 4, 6,8 12, 16, or 32 terminals, plus common and safety ground
terminals.
Figure 2.8 PLC input module layout
The figure shows the circuit for only one terminal. All terminals in a given module have
identical circuit. The first block receives the input signal from the switch, sensor, and so
on. For ac voltage inputs, the dc converter consists of rectifiers and a means to step the
voltage down to a usable level, usually a zener diode. For dc voltages input, some type of
dc-to-dc conversion within the converter block is required.
The output of the converter is not directly connected to CPU. If it were, an input surge or
circuit malfunction could reach the CPU. For example, if a rectifier in the converter
should open or short out, we could have 120 volt ac fed to the CPU. Because most of
CPUs work on only 5 Vdc, they would be damaged. The isolation block protects the CPU
from this type of damage.
The isolation is usually accomplished by an optoisolator, as shown. The on-off signal is
carried on a light beam (produced by an LED) in one direction. Electrical surges will not
pass through the optoisolator in either direction.
When its input is on, the isolator sends a signal to the CPU via the output logic block.
When the isolator‘s output is on, it is sensed by a coded signal from the CPU. Each
modules is assigned a coded series of numbers by its SIP (a group of small-on-line-on-off
witches, from single in-line switch)or DIP (a group of small-on-line-on-off witches, from
dual in-line switch) switch settings. Each terminal number of the module is assigned a
number in consecutive order. The on-off status for each number is checked on each
sweep of the input scan. The result, on or off , is placed in RAM memory.
The output module operates in the opposite manner from the input module. A dc signal
from the CPU is converted through each module section (terminal) to a usable output
voltage, either ac or dc. A block diagram of the output module is shown in Figure 2.12.
Figure 2.12 PLC output module layout
A signal from the CPU is received by the output module logic, once for each scan, If the
CPU signal code matches the assigned number of the module, the module section is
turned on. The identification numbers of the module are again determined by the setting
of the module SIP switches. As with input modules, there are 4,6,8,12, 16, and even 32
terminals or sections. If no matching signal is received by a terminal during the output
scan, the module terminal is not energized.
The matching CPU signal, if received, goes through an isolation stage. Again, isolation is
necessary so that any erratic voltage surge from the output device does not get back into
the CPU and cause damage. The isolator output is then transmitted to switching circuitry
or an output relay. AC switching is usually accomplished by turning on a triac. The
output of a module section may be through a relay, or a dc or ac output. All three types
are shown in Figure 2.12.
All terminals of a single module have the same output system. In other words, an 8-
terminal module would not have some ac and some dc outputs or voltages of differing
values. All would be the same. An actual block diagram for a small PLC input/output
module (interface) is shown in Figure 2.13.
Figure 2.13 PLC input module layout
At the input end is an internal dc power supply (24 volts) that supplies voltage for up to
eight input switches or sensors (terminals 0 to 7). When a switch or sensor is closed, a
current path is completed through the LED of an optocopler, a phototransistor conducts,
and as result, a signal is received by the internal circuitry.
At the output end, six relays open or close respective contacts when ―told‖ to do so by the
internal circuitry. Output terminals 200 to 202 share a common return to the load power.
Terminal 203, 204, and 205 are completely independent of each other. Each has its own
connection to load power.
PLC Programming Units
The programming unit of a PLC provides a way for the user to enter data and to edit and
monitor programs stored in the processor unit. The programming unit communicates with
the processor unit by using a data communication link that transfers data in a serial or
parallel fashion. Most programmers also perform troubleshooting procedures by
simulating signals from input devices or by forcing output devices to energize through
keyboard entries. This method is called forcing inputs and outputs.
Some programming units also have the capability of storing programs in their memory
chips once they are written and then loading them into the PLC at a later time. This
process is called uploading and downloading.
Types of programming units used to perform these operation are:
- handheld programmers
- dedicated terminals, and
- Computer programmer: either personal computer or laptop computer
Handheld Programmers.
Handheld programmers, such as the one shown in Figure 2.14, are very small,
inexpensive device. They typically have membrane keys for entering data and LCD
displays that show one line of a ladder diagram. They are useful for programming simple
ladder diagram or for troubleshooting on the factory floor, because they are easily to
carry. Their primary disadvantage is that the ladder diagrams are difficult to follow on the
screen because only a small segment is shown at any given time. Many handhelds
programmers are capable of forcing input and output, and uploading and downloading.
Figure 2.14 Hand-held programmer modules
Dedicated Terminals
Each dedicated terminal is designed to be used with only one brand of PLC. It has a
keyboard for entering data and a display screen that can show several ladder rungs
simultaneously. Dedicated programmers usually provide troubleshooting operations
while the PLC is running. Their primary disadvantages are that they are too large to carry
out to the factory floor, they are expensive, and they cannot be used by other PLC brands.
Dedicated terminals can upload and download, or force inputs and outputs.
Microcomputers
A microcomputer is personal computer with a special circuit card. By using a special
software package, data can be entered on the keyboard and the ladder circuits are
displayed on the screen. This method is rapidly becoming the most popular way to
program PLCs.
A primary advantage of using a computer for programming is that the time utilization
capabilities of an existing PC are maximized. During the time the computer is not being
used for PLC program development, it can be used for other purposes. Monetary savings
are also possible because it is not necessary to purchase a handheld or dedicated
programming unit. Figure 2.15 shows a schematic diagram of the PLC and PC
connection.
Figure 2.15 Connecting a PC to a PLC
PLC Memory Maps
How is solid-state memory organized within the PLC? To find out, we draw what is
known as a memory map for a given PLC. Such a map might look like the one shown in
Figure 2.16. Memory chips are specified by the number of words and the size of the
words they can be hold. For example, 1Kx 8 holds 1024 x 8 = 8192 bits. A 1K x 16 has
1024 x 16 = 16,384 bits. Today‘s small and medium size PLCs can contain anywhere
from 1 to 256 kilobytes (KB) of memory, of which most would be for the RAM section.
Figure 2.16 Two kilobyte memory map layout for a PLC
Figure 2.16 shows a memory map in which memory space is divided into two segments:
user memory and system (storage) memory. The user memory segment holds the ladder
logic diagram. User memory segment is about 75 % of total memory. The system
memory segment stores information needed to carry out (execute) the user program.
Let us look at different sections of the memory:
Input image status: section that hold the status of the discrete input ports.
Output image status: section that hold the status of the discrete output ports.
Timer Status: section that holds the preset values and the accumulated values of
the timers.
Counter status: section that holds the preset values and the accumulated values of
the counters.
Other functions: section used for functions such as addition, subtraction,
multiplication, division, sequencer, shift registers, and comparison functions.
Status values are held at the bottom of the storage memory.
TERMINOLOGY
There are several different terms used to describe programmable controllers, most
referring to the functional operation of the machine in questions:
PC programmable controller (UK origin)
PLC programmable logic controller (American origin)
PBS programmable binary system (Swedish origin)
By their nature these terms tend to describe controllers that normally work in a binary
(on/off) environment. To avoid confusion with the personal computer ‗PC‘, the
abbreviation PLC is more preferable.
top related