ch-2 Petruzella PDF
ch-2 Petruzella PDF
ch-2 Petruzella PDF
Chapter Objectives
After completing this chapter, you will be able to: This chapter exposes you to the details of PLC
2.1 List and describe the function of the hardware hardware and modules that make up a PLC con-
components used in PLC systems trol system. The chapters illustrations show the
2.2 Describe the basic circuitry and applications for various subparts of a PLC as well as general
discrete and analog I/O modules, and interpret typical connection paths. In this chapter we discuss
I/O and CPU specifications the CPU and memory hardware components,
2.3 Explain I/O addressing including the various types of memory that are
2.4 Describe the general classes and types of PLC available, and we describe the hardware of the
memory devices input/output section, including the difference be-
2.5 List and describe the different types of PLC tween the discrete and analog types of modules.
peripheral support devices available
17
Output
Output
Power
Power
Input
Input
Hopper
Communication
Stop/Start On/Off
control
Motor
Sensor
O 0 : 0 1 / 00
examples of SLC 500 real-world general input and output in Figure2-9. A module is made up of a printed circuit
addresses: board and a terminal assembly. The printed circuit board
contains the electronic circuitry used to interface the
circuit of the processor with that of the input or output
device. Modules are designed to plug into a slot or con-
nector in the I/O rack or directly into the processor. The
O:4/15 Output module in slot 4, terminal 15
terminal assembly, which is attached to the front edge of
I:3/8 Input module in slot 3, terminal 8 the printed circuit board, is used for making field-wiring
O:6.0 Output module, slot 6 connections. Modules contain terminals for each input
I:5.0 Input module, slot 5 and output connection, status lights for each of the inputs
and outputs, and connections to the power supply used to
power the inputs and outputs. Terminal and status light
Every input and output device connected to a discrete arrangements vary with different manufacturers.
I/O module is addressed to a specific bit in the PLCs Most PLC modules have plug-in wiring terminal strips.
memory. A bit is a binary digit that can be either 1 or 0. The terminal block is plugged into the actual module as il-
Analog I/O modules use a word addressing format, which lustrated in Figure2-10. If there is a problem with a mod-
allows the entire words to be addressed. The bit part of ule, the entire strip is removed, a new module is inserted,
the address is usually not used; however, bits of the digital and the terminal strip is plugged into the new module.
representation of the analog value can be addressed by the Unless otherwise specified, never install or remove I/O
programmer if necessary. Figure 2-6 illustrates bit level modules or terminal blocks while the PLC is powered.
and word level addressing as it applies to an SLC 500 A module inserted into the wrong slot could be dam-
controller. aged by improper voltages connected through the wiring
Figure2-7 illustrates the Allen-Bradley ControlLogix arm. Most faceplates and I/O modules are keyed to pre-
tag-based addressing format. With Logix5000 controllers, vent putting the wrong faceplate on the wrong module.
you use a tag (alphanumeric name) to address data (vari- In other words, an output module cannot be placed in the
ables). Instead of a fixed numeric format the tag name slot where an input module was originally located.
itself identifies the data. The field devices are assigned Input and output modules can be placed anywhere in a
tag names that are referenced when the PLC ladder logic rack, but they are normally grouped together for ease of
program is developed. wiring. I/O modules can be 8, 16, 32, or 64 point cards
PC-based control runs on personal or industrial hard- (Figure2-11). The number refers to the number of inputs
ened computers. Also known as soft PLCs, they simulate or outputs available. The standard I/O module has eight
the functions of a PLC on a PC, allowing open architecture inputs or outputs. A high-density module may have up to
systems to replace proprietary PLCs. This implementa- 64 inputs or outputs. The advantage with the high-density
tion uses an input/output card (Figure2-8) in conjunction module is that it is possible to install up to 64 inputs or
with the PC as an interface for the field devices. outputs in one slot for greater space savings. The only dis-
Combination I/O modules can have both input and out- advantage is that the high-density output modules cannot
put connections in the same physical module as illustrated handle as much current per output.
Program files
(a)
Output Input
Power
Analog
Thermocouple IN 0
analog input IN 0
I0:2.0
(address)
Meter
OUT 0
analog
2: 20 OUT 0
output
O0:2.0
(address)
0 1 2
module
Analog
Processor
Address Address
Type Slot Word Bit Inputs Outputs Type Slot Word Bit
1 0 0
Not used
Not used
2 0 O 2 0
1 1
(b)
Figure 2-6 SLC 500 bit level and word level addressing. (a) Bit level
addressing. (b) Word level addressing.
Description assigned
Start to alias tag
I_PBO
Alias tag pointing
<Local:6:1.Data.0> to base address
Base address
Input instruction
Terminal
block
Status
Status
indicators Input Output
Inputs Outputs
Power supply
connections
0 0
1 1
2 2
Input 3 3 Output
connections 4 4 connections
5 5
6 6
7 7
Power supply
connections
The modules themselves receive their voltage and cur- Table 2-1 Common Ratings for Discrete
rent for proper operation from the backplane of the rack I/O Interface Modules
enclosure into which they are inserted, as illustrated in Fig-
ure2-13. Backplane power is provided by the PLC module Input Interfaces Output Interfaces
power supply and is used to power the electronics that re- 12 V AC/DC /24 V AC/DC 1248 V AC
side on the I/O module circuit board. The relatively higher 48 V AC/DC 120 V AC
120 V AC/DC 230 V AC
230 V AC/DC 120 V DC
5 V DC (TTL level) 230 V DC
5 V DC (TTL level)
24 V DC
Discrete outputs
Power
supply
Discrete inputs
L1 Zener
Input Bridge diode Opto-electrical Logic To processor
(120 VAC) signal rectifier level isolation circuits (low VDC)
L2 detection
currents required by the loads of an output module are The zener diode (ZD) voltage rating sets the mini-
normally provided by user-supplied power. Module power mum threshold level of voltage that can be detected.
supplies typically may be rated for 3 A, 4 A, 12 A, or 16 A When light from the LED strikes the phototransis-
depending on the type and number of modules used. tor, it switches into conduction and the status of
Figure2-14 shows the block diagrams for one input of the pushbutton is communicated in logic to the
a typical alternating current (AC) discrete input module. processor.
The input circuit is composed of two basic sections: the The optical isolator not only separates the higher
power section and the logic section. An optical isolator is AC input voltage from the logic circuits but also
used to provide electrical isolation between the field wir- prevents damage to the processor due to line volt-
ing and the PLC backplane internal circuitry. The input age transients. In addition, this isolation also helps
LED turns on or off, indicating the status of the input de- reduce the effects of electrical noise, common in the
vice. Logic circuits process the digital signal to the pro- industrial environment, which can cause erratic op-
cessor. Internal PLC control circuitry typically operates at eration of the processor.
5 VDC or less volts.
For fault diagnosis, an input state LED indicator
A simplified diagram for a single input of a discrete AC
is on when the input pushbutton is closed. This in-
input module is shown in Figure2-15. The operation of
dicator may be wired on either side of the optical
the circuit can be summarized as follows:
isolator.
The input noise filter consisting of the capacitor and An AC/DC type of input module is used for both
resistors R1 and R2 removes false signals that are AC and DC inputs as the input polarity does not
due to contact bounce or electrical interference. matter.
When the pushbutton is closed, 120 VAC is applied A PLC input module will have either all inputs iso-
to the bridge rectifier input. lated from each other with no common input con-
This results in a low-level DC output voltage that is nections or groups of inputs that share a common
applied across the LED of the optical isolator. connection.
Input module
terminal strip
ZD Digital
Field wiring R3 logic
C circuit
Common
L2
Internal module circuit
Figure 2-15 Simplied diagram for a single input of a discrete AC input module.
Discrete input modules perform four tasks in the PLC When the processor calls for an output load to be
control system. They: energized, a voltage is applied across the LED of
the opto-isolator.
Sense when a signal is received from a field device.
The LED then emits light, which switches the pho-
Convert the input signal to the correct voltage level
totransistor into conduction.
for the particular PLC.
This in turn triggers the triac AC semiconductor
Isolate the PLC from fluctuations in the input
switch into conduction allowing current to flow to
signals voltage or current.
the output load.
Send a signal to the processor indicating which sen-
Since the triac conducts in either direction, the out-
sor originated the signal.
put to the load is alternating current.
Figure2-16 shows the block diagram for one output of The triac, rather than having ON and OFF status,
a typical discrete output module. Like the input module, actually has LOW and HIGH resistance levels,
it is composed of two basic sections: the power section respectively. In its OFF state (HIGH resistance),
and the logic section, coupled by an isolation circuit. The a small leakage current of a few milliamperes still
output interface can be thought of as an electronic switch flows through the triac.
that turns the output load device on and off. Logic circuits As with input circuits, the output interface is usually
determine the output status. An output LED indicates the provided with LEDs that indicate the status of each
status of the output signal. output.
A simplified diagram for a single output of a discrete Fuses are normally required for the output module,
AC output module is shown in Figure2-17. The operation and they are provided on a per circuit basis, thus al-
of the circuit can be summarized as follows: lowing for each circuit to be protected and operated
As part of its normal operation, the digital logic cir- separately. Some modules also provide visual indi-
cuits of the processor sets the output status accord- cators for fuse status.
ing to the program. The triac cannot be used to switch a DC load.
Output module
Triac
terminal strip
LED output switch
L1
status indicator
Fuse
Optical
isolator
Field wiring
Digital
logic
circuit
Load L2
Internal module circuit
L1 Motor
Color Type of I/O
Red AC inputs/outputs
Interposing Blue DC inputs/outputs
CR relay coil
Orange Relay outputs
Green Specialty modules
L2 Black I/O wiring; terminal blocks
are not removable
Coil Contact AC/DC AC DC
solid-state circuitry that needs a DC signal voltage to current signal from the level transmitter field device. This
function. Field devices connected to the positive (1) side input is converted from an analog to a digital value for
of the field power supply are classified as sourcing field use by the processor. The circuitry of the analog output
devices. Conversely, field devices connected to the nega- module accepts the digital value from the processor and
tive (2) side or DC common of the field power supply are converts it back to an analog signal that drives the field
sinking field devices. tank level meter.
Analog input modules normally have multiple input
2.3 Analog I/O Modules channels that allow 4, 8, or 16 devices to be interface to
the PLC. The two basic types of analog input modules
Earlier PLCs were limited to discrete or digital I/O in-
are voltage sensing and current sensing. Analog sen-
terfaces, which allowed only on/off-type devices to be
sors measure a varying physical quantity over a specific
connected. This limitation meant that the PLC could have
range and generate a corresponding voltage or current
only partial control of many process applications. Today,
signal. Common physical quantities measured by a PLC
however, a complete range of both discrete and analog
analog module include temperature, speed, level, flow,
interfaces are available that will allow controllers to be
weight, pressure, and position. For example, a sensor may
applied to practically any type of control process.
Discrete devices are inputs and outputs that have only
PLC Level
two states: on and off. In comparison, analog devices rep- Level indicator
resent physical quantities that can have an infinite number transmitter Analog Analog
input Processor output
of values. Typical analog inputs and outputs vary from module module
0 to 20 milliamps, 4 to 20 milliamps, or 0 to 10 volts.
Figure2-22 illustrates how PLC analog input and output
modules are used in measuring and displaying the level
of fluid in a tank. The analog input interface module con-
tains the circuitry necessary to accept an analog voltage or Figure 2-22 Analog input and output to a PLC.
Ungrounded IN 0
thermocouple
CJC
IN 1
IN 2
IN 1
IN 2
IN 3
IN 3
measure temperature over a range of 0 to 500C, and out- modules must produce a range of digital values between
put a corresponding voltage signal that varies between 0 a maximum and minimum value to represent the analog
and 50 mV. signal over its entire span. Typical specifications are as
Figure2-23 illustrates an example of a voltage sensing follows:
input analog module used to measure temperature. The
connection diagram applies to an Allen-Bradley Micro-
Logic 4-channel analog thermocouple input module. A
varying DC voltage in the low millivolt range, propor-
10 V 210 to 110 V
tional to the temperature being monitored, is produced by Bipolar
the thermocouple. This voltage is amplified and digitized Span
5V 25 to 15 V
of
by the analog input module and then sent to the processor analog
on command from a program instruction. Because of the 10 V 0 to 110 V
input
Unipolar
low voltage level of the input signal, a twisted shielded 5V 0 to 15 V
pair cable is used in wiring the circuit to reduce unwanted
electrical noise signals that can be induced in the conduc- Resolution 0.3 mV
tors from other wiring. When using an ungrounded ther-
mocouple, the shield must be connected to ground at the
module end. To obtain accurate readings from each of the When connecting voltage sensing inputs, close adher-
channels, the temperature between the thermocouple wire ence to specified requirements regarding wire length is
and the input channel must be compensated for. A cold important to minimize signal degrading and the effects
junction compensating (CJC) thermistor is integrated in of electromagnetic noise interference induced along the
the terminal block for this purpose. connecting conductors. Current input signals, which
The transition of an analog signal to digital values is are not as sensitive to noise as voltage signals, are typi-
accomplished by an analog-to-digital (A/D) converter, the cally not distance limited. Current sensing input modules
main element of the analog input module. Analog volt- typically accept analog data over the range of 4 mA to
age input modules are available in two types: unipolar 20mA, but can accommodate signal ranges of 20 mA
and bipolar. Unipolar modules can accept an input signal to 120 mA. The loop power may be supplied by the sen-
that varies in the positive direction only. For example, if sor or may be provided by the analog output module as
the field device outputs 0 V to 110V, then the unipolar illustrated in Figure2-24. Shielded twisted pair cable is
modules would be used. Bipolar signals swing between a normally recommended for connecting any type analog
maximum negative value and a maximum positive value. input signal.
For example, if the field device outputs 210 V to 110V The analog output interface module receives from the
a bipolar module would be used. The resolution of an ana- processor digital data, which are converted into a propor-
log input channel refers to the smallest change in input tional voltage or current to control an analog field device.
signal value that can be sensed and is based on the num- The transition of a digital signal to analog values is accom-
ber of bits used in the digital representation. Analog input plished by a digital-to-analog (D/A) converter, the main
Analog output
Valve
PLC
Level
sensor
Analog input
Figure 2-27 Thumbwheel switch.
Figure 2-25 Typical analog I/O control system. Source: Photo courtesy Omron Industrial Automation, www.ia.omron.com.
Memory
module
Keyswitch Channel 1
ethernet
(10Base-T)
Hardware
address
Channel 0
RS232
(DH485, DF1,
or ASCII)
other functions such as timing, counting, latching, com- 2.7 Memory Design
paring, motion control and complex math functions.
PLC processors have changed constantly due to ad- Memory is the element that stores information, programs,
vancements in computer technology and greater demand and data in a PLC. The user memory of a PLC includes
from applications. Today, processors are faster and have space for the user program as well as addressable memory
additional instructions added as new models are intro- locations for storage of data. Data are stored in memory
duced. Because PLCs are microprocessor based, they can locations by a process called writing. Data are retrieved
be made to perform tasks that a computer can do. In ad- from memory by what is referred to as reading.
dition to their control functions, PLCs can be networked The complexity of the program determines the amount
to do supervisory control and data acquisition (SCADA). of memory required. Memory elements store individual
Many electronic components found in processors and pieces of information called bits (for binary digits). The
other types of PLC modules are sensitive to electrostatic amount of memory capacity is specified in increments of
voltages that can degrade their performance or damage 1000 or in K increments, where 1 K is 1024 bytes of
them. The following static control procedures should be memory storage (a byte is 8 bits).
followed when handling and working with static-sensitive The program is stored in the memory as 1s and 0s,
devices and modules: which are typically assembled in the form of 16-bit
words. Memory sizes are commonly expressed in thou-
Ground yourself by touching a conductive surface sands of words that can be stored in the system; thus 2K
before handling static-sensitive components. is a memory of 2000 words, and 64 K is a memory of
Wear a wrist strap that provides a path to bleed off 64,000 words. The memory size varies from as small as
any charge that may build up during work. 1K for small systems to 32 MB for very large systems
(Figure2-39). Memory capacity is an important prereq-
Be careful not to touch the backplane connector or
uisite for determining whether a particular processor will
connector pins of the PLC system (always handle
handle the requirements of the specific application.
the circuit cards by the edge if possible).
Memory location refers to an address in the CPUs
Be careful not to touch other circuit components in memory where a binary word can be stored. A word usu-
a module when you configure or replace its internal ally consists of 16 bits. Each binary piece of data is a bit
components. and eight bits make up one byte (Figure2-40). Memory
When not in use, store modules in its static-shield bag. utilization refers to the number of memory locations re-
If available, use a static-safe work station. quired to store each type of instruction. A rule of thumb
Input
module
Output
Processor memory Processor memory module
Input image table Output image table
Closed Output OFF
0000000000000000
Open 0000000000000010 0000000000000000
0000000000000000 0000000000000000
Input devices 0000000000000000 0000000000000000
0000000000000000 0000000010000000 Output ON
0000000000000000
Executed Program
program backup
Current
data
Parameters
Memory
bits,
timers,
counters
d ule
sor Mo
Figure 2-42 Battery used to back up processor RAM. Proces
h
Flasard
C
years in many cases. Some processors have a capacitor
that provides at least 30 minutes of battery backup when
Figure 2-44 Flash memory card installed in a socket on
the battery is disconnected and power is OFF.
the processor.
Erasable Programmable Read-Only Memory
(EPROM) provides some level of security against unau-
will resume running without having lost any working data
thorized or unwanted changes in a program. EPROMs are
after power is restored.
designed so that data stored in them can be read, but not
easily altered without special equipment. For example,
UV EPROMs (ultraviolet erasable programmable read- 2.9 Programming Terminal Devices
only memory) can only be erased with an ultraviolet light. A programming terminal device is needed to enter, mod-
EPROM memory is used to back up, store, or transfer ify, and troubleshoot the PLC program. PLC manufac-
PLC programs. turers use various types of programming devices. The
Electrically erasable programmable read-only mem- simplest type is the hand-held type programmer shown
ory (EEPROM) is a nonvolatile memory that offers the in Figure2-45. This proprietary programming device has
same programming flexibility as does RAM. The EEPROM a connecting cable so that it can be plugged into a PLCs
can be electrically overwritten with new data instead of programming port. Certain controllers use a plug-in panel
being erased with ultraviolet light. Because the EEPROM rather than a hand-held device.
is nonvolatile memory, it does not require battery backup.
It provides permanent storage of the program and can be
changed easily using standard programming devices. Typi-
cally, an EEPROM memory module is used to store, back
up, or transfer PLC programs (Figure2-43).
Flash EEPROMs are similar to EEPROMs in that they
can only be used for backup storage. The main difference
comes in the flash memory: they are extremely fast at sav-
ing and retrieving files. In addition, they do not need to
be physically removed from the processor for reprogram-
ming; this can be done using the circuitry within the pro-
cessor module in which they reside. Flash memory is also
sometimes built into the processor module (Figure2-44),
where it automatically backs up parts of RAM. If power
fails while a PLC with flash memory is running, the PLC Figure 2-45 Hand-held programming terminal.
Laptop computer
A (Disk drive)
C (Internal hard drive)
Software
A
Copy
C
Serial port
1. What is the function of a PLC input interface 21. With reference to discrete output module current
module? ratings:
2. What is the function of a PLC output interface a. What is the maximum current rating for a typical
module? 120 VAC output module?
b. Explain one method of handling outputs with
3. Define the term logical rack.
larger current requirements.
4. With reference to a PLC rack:
22. What electronic element can be used as the switch-
a. What is a remote rack?
ing device for DC discrete output modules?
b. Why are remote racks used?
23. A discrete relay type output module can be used to
5. How does the processor identify the location of a
switch either AC or DC load devices. Why?
specific input or output device?
24. With reference to sourcing and sinking I/O
6. List the three basic elements of rack/slot-based
modules:
addressing.
a. What current relationship are the terms sourcing
7. Compare bit level and word level addressing. and sinking used to describe?
8. In what way does tag-based addressing differ from b. If an I/O module is specified as a current-sinking
rack/slot-based addressing? type, then which type of field device (sinking or
9. What do PC-based control systems use to interface sourcing) it is electrically compatible with?
with field devices? 25. Compare discrete and analog I/O modules with
10. What type of I/O modules have both inputs and respect to the type of input or output devices with
outputs connected to them? which they can be used.
11. In addition to field devices what other connections 26. Explain the function of the analog-to-digital (A/D)
are made to a PLC module? converter circuit used in analog input modules.
12. Most PLC modules use plug-in wiring terminal 27. Explain the function of the digital-to-analog (D/A)
strips. Why? converter circuit used in analog output modules.
13. What are the advantage and the disadvantage of 28. Name the two general sensing classifications for
using high-density modules? analog input modules.
14. With reference to PLC discrete input modules: 29. List five common physical quantities measured by
a. What types of field input devices are suitable for a PLC analog input module.
use with them? 30. What type of cable is used when connecting a ther-
b. List three examples of discrete input devices. mocouple to a voltage sensing analog input mod-
15. With reference to PLC discrete output modules: ule? Why?
a. What types of field output devices are suitable 31. Explain the difference between a unipolar and bi-
for use with them? polar analog input module.
b. List three examples of discrete output devices. 32. The resolution of an analog input channel is speci-
16. Explain the function of the backplane of a PLC fied as 0.3 mV. What does this tell you?
rack. 33. In what two ways can the loop power for current
17. What is the function of the optical isolator circuit sensing input modules be supplied?
used in discrete I/O module circuits? 34. List three field devices that are commonly controlled
18. Name the two distinct sections of an I/O module. by a PLC analog output module.
19. List four tasks performed by a discrete input 35. State one application for each of the following spe-
module. cial I/O modules:
20. What electronic element can be used as the switch- a. High-speed counter module
ing device for a 120 VAC discrete output interface b. Thumbwheel module
module? c. TTL module
1. A discrete 120 VAC output module is to be used to c. If the ambient temperature rating for an I/O
control a 230 VDC solenoid valve. Draw a diagram module is specified as 60C, how much is this
showing how this could be accomplished using an expressed in degrees Fahrenheit?
interposing relay. 4. Create a five-digit code using the SLC 500 rack/
2. Assume a thermocouple, which supplies the input slot-based addressing format for each of the
to an analog input module, generates a linear volt- following:
age of from 20 mV to 50 mV when the temperature a. A pushbutton connected to terminal 5 of module
changes from 750F to 1250F. How much voltage group 2 located on rack 1.
will be generated when the temperature of the b. A lamp connected to terminal 3 of module
thermocouple is at 1000F? group0 located on rack 2.
3. With reference to I/O module specifications: 5. Assume the triac of an AC discrete output module
a. If the ON-delay time of a given discrete input fails in the shorted state. How would this affect the
module is specified as 12 milliseconds, how much device connected to this output?
is this expressed in seconds? 6. A personal computer is to be used to program sev-
b. If the output leakage current of a discrete output eral different PLCs from different manufacturers.
module is specified as 950 A, how much is this What would be required?
expressed in amperes?