[go: up one dir, main page]

0% found this document useful (0 votes)
454 views34 pages

Introduction To Programmable Controllers: Thomas A. Hughes

Uploaded by

ahmedzidan7344
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
454 views34 pages

Introduction To Programmable Controllers: Thomas A. Hughes

Uploaded by

ahmedzidan7344
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Volume EMC 52.

01

Introduction to
Programmable Controllers
Thomas A. Hughes

• Brief History of PLCs


• Basic Components of PLC Systems
• SoftLogic or SoftPLC

Taken from Programmable Controllers, Third Edition


Notice

The information presented in this publication is for the general education of the reader. Because neither the
authors nor the publisher have any control over the use of the information by the reader, both the authors and
the publisher disclaim any and all liability of any kind arising out of such use. The reader is expected to
exercise sound professional judgment in using any of the information presented in a particular application.

Additionally, neither the authors nor the publisher have investigated or considered the effect of any patents on
the ability of the reader to use any of the information in a particular application. The reader is responsible for
reviewing any possible patents that may affect any particular use of the information presented.

Any references to commercial products in the work are cited as examples only. Neither the authors nor the
publisher endorse any referenced commercial product. Any trademarks or tradenames referenced belong to the
respective owner of the mark or name. Neither the authors nor the publisher make any representation regarding
the availability of any referenced commercial product at any time. The manufacturer’s instructions on use of
any commercial product must be followed at all times, even if in conflict with the information in this
publication.

Copyright © 2001 ISA — The Instrumentation, Systems, and Automation Society

All rights reserved.

Printed in the United States of America.

No part of this publication may be reproduced, stored in retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of
the publisher.

ISA
67 Alexander Drive
P.O. Box 12277
Research Triangle Park
North Carolina 27709
Editor’s Introduction

This “mini-book” is available both in downloadable form, as part of the ISA Encyclopedia of
Measurement and Control, and bound in a print format.

“Mini-books” are small, unified volumes, from 25 to 100 pages long, drawn from the ISA catalog of
reference and technical books. ISA makes mini-books available to readers who need narrowly focused
information on particular subjects rather than a broad-ranging text that provides an overview of the entire
subject. Each provides the most recent version of the material—in some cases including revisions that have
not yet been incorporated in the larger parent volume. Each has been re-indexed and renumbered so it can
be used independently of the parent volume. Other mini-books on related subjects are available.

The material in this mini-book was drawn from the following ISA titles:

• Programmable Controllers, Third Edition, by Thomas A. Hughes, Chapter 1.


Order Number: 1-55617-729-1

See Appendix A of this document to view the complete table of contents for Programmable Controllers,
Third Edition.

To order: Internet: www.isa.org


Phone: 919/549-8411
Fax: 919/549-8288
Email: info@isa.org
Contents

Chapter 1 INTRODUCTION TO PROGRAMMABLE CONTROLLERS 1


Introduction, 1
Brief History of PLCs, 2
Basic Components of PLC Systems, 4
SoftLogic or SoftPLC, 20

Appendix A TABLE OF CONTENTS FOR PROGRAMMABLE CONTROL-


LERS, THIRD EDITION 23

INDEX 27

v
1
Introduction to
Programmable
Controllers

Introduction
Programmable controllers were originally designed to replace relay-based
control systems and solid-state, hard-wired logic control panels. However,
the modern programmable controller’s system is far more complex and
powerful.

The most basic function performed by programmable controllers is to


examine the status of inputs and, in response, control some process or
machines through outputs. The logical combination of inputs to produce
an output or outputs is called control logic. Several logic combinations are
usually required to carry out a control plan or program. This control plan
is stored in memory using a programming device that inputs the program
into the system. The processor (usually a high-speed microprocessor)
periodically scans the control plan in memory in a predetermined
sequential order. The amount of time required to examine the inputs and
outputs, perform the control logic, and execute the outputs is called the
scan time.

Figure 1-1 shows a simplified block diagram of a programmable


controller. In this diagram, a level switch and panel-mounted pushbutton
are wired to input circuits, and the output circuits are connected to an
electric solenoid valve and a panel-mounted indicator light. The output
devices are controlled by the control program in the logic unit.

Figure 1-1 shows a typical configuration of the early programmable


controller applications, which were intended to replace relay or hard-
wired logic control systems. The input circuits are used to convert the
various field voltages and currents into the low voltage signals (normally

1
2 Introduction to Programmable Controllers

L1 L2
120V ac

Level Solenoid
Switch Valve

Input Logic Output


Panel
Circuits Unit Circuits Light

Push
Button

Figure 1-1. Simplified diagram for a programmable controller system.

0 to 5 volts direct current [vdc]) used by the logic unit. The output circuits
convert the logic signals to a level that will drive the field devices. For
example, in Figure 1-1, 120-volt alternating current (vac) power is
connected to the field input devices, so the input circuits are used to
convert the 120 vac into the 0- to 5-volt logic signals used by the control
unit.

Brief History of PLCs


In 1968, a major automobile manufacturer wrote a design specification for
the first programmable controller. The primary goal was to eliminate the
high cost associated with the frequent replacement of inflexible relay-
based control systems. The specification also called for a solid-state
industrial computer that could be easily programmed by maintenance
technicians and plant engineers. It was hoped that the programmable
controller would reduce production downtime and provide expandability
for future production improvements and changes. In response to this
design specification, several manufacturers developed computer-based
control devices called programmable controllers.

The first programmable controller was installed in 1969, and it proved to


be a vast improvement over relay-based control systems. The controllers
were easy to install and program, they used less plant floor space, and
they were more reliable than relay-based control systems. The initial
programmable controller not only met the automobile manufacturer’s
production needs, but further design improvements in later models led to
widespread use of programmable controllers in other industries.

Two main factors in the initial design of the programmable controllers


probably led to their success. First, highly reliable solid-state components
were used, and the electronic circuits were designed for the harsh
Introduction to Programmable Controllers 3

industrial environment. The input/output (I/O) circuits were designed


and built to withstand electrical noise, moisture, oil, and the high
temperatures encountered in industry. The second important factor was
that the programming language that was initially selected was based on
standard electrical ladder logic design. Some earlier computer system
applications had failed because plant technicians and engineers could not
be trained easily in standard computer software. However, most were
already trained in relay ladder logic design, so they could quickly learn
programming in a language that was based on the familiar relay ladder
diagrams.

When microprocessors were introduced in 1974 and 1975, the basic


capabilities of programmable controllers were greatly expanded and
improved. They were able to perform sophisticated math and data
manipulation functions, which greatly increased the use of programmable
controllers in more complex control applications.

In the late 1970s, improved communication components and circuits made


it possible to place programmable controllers thousands of feet from the
equipment they controlled. Several programmable controllers could now
exchange data and thus more effectively control processes and machines.
Also, microprocessor-based input and output modules allowed
programmable controller systems to evolve into the analog control world.

Programmable controllers are found in thousands of industrial


applications. They are used to control chemical, petrochemical, food,
pharmaceutical, wastewater treatment, water treatment, nuclear, natural
gas, and mining processes. They are found in material transfer and storage
systems that transport and store both the raw materials and the finished
products. They are used with robots to perform hazardous industrial
operations, thus promoting safer operations. Programmable controllers
are used in conjunction with other computers to perform process and
machine data collection and reporting functions, including statistical
process control, quality assurance, and online diagnostics. They are
utilized in energy management systems to reduce costs and to improve
the environmental control of industrial facilities and office buildings.

The introduction of the personal computer (PC) in the early 1980s greatly
increased the power and utility of the programmable controller system in
process and machine control. Because personal computers were
inexpensive they were used extensively as programming devices and
operator interface control stations. The development of low-cost graphical
control software packages for PCs has led to the extensive use of graphical
user interfaces (GUIs) in programmable controller applications.
4 Introduction to Programmable Controllers

Because personal computers are used widely both in control and business
applications, the abbreviation PC is generally reserved for personal
computers, and the abbreviation PLC is used for programmable
controllers or programmable logic controllers. Thus, the abbreviation PLCs
will be used in this book to represent programmable controllers.

Basic Components of PLC Systems


Regardless of size, cost, or complexity, all programmable controllers share
the same basic components and functional characteristics. A
programmable controller will always consist of a processor, a memory
unit, an input/output system, a programming language, a programming
device, and a power supply. A block diagram of a typical PLC system is
shown in Figure 1-2.

INPUTS POWER
I/O
SYSTEM SUPPLY
OUTPUTS

PROCESSOR

PROGRAMMING
DEVICE MEMORY

Figure 1-2. Block diagram of a typical PLC system.

The Processor
The processor consists of one or more standard or custom microprocessors
and other integrated circuits that perform the logic, control, and memory
functions of the PLC system. The processor reads the inputs, executes
logic as determined by the application program, performs calculations,
and controls the outputs accordingly.

The processor controls the operating cycle or processor scan. This


operating cycle consists of a series of operations performed sequentially
and repeatedly. A typical PLC processor operating cycle is shown in
Figure 1-3.
Introduction to Programmable Controllers 5

Start Cycle
Output Scan Input Scan

Start
Start Control
Output Scan Program Scan

Control Program Scan

Figure 1-3. PLC processor operating cycle.

During the input scan, the PLC examines the external input devices to see
if a signal is present or absent, that is, if the input devices are in an ON or
OFF state. The status of these inputs is temporarily stored in an input
image table or memory file. During the program scan, the processor scans
the instructions in the control program, uses the input status from the
input image file, and determines if an output will or will not be energized.
The resulting status of the outputs is written to the output image table or
memory file. Based on the data in the output image table, the PLC
energizes or deenergizes its associated output circuits, which control
external devices. This operating cycle typically takes 1 to 25 milliseconds
(thousandths of a second). The input and output scans are normally very
short relative to the time required for the program scan.

Memory
Memory is used to store the control program for the PLC system; it is
usually located in the same housing as the central processing unit (CPU).
The information stored in memory determines how the input and output
data will be processed.

Memory stores individual pieces of data called bits. A bit has two states:
1 or 0. Memory units are mounted on circuit boards and are usually
specified in thousands or ‘‘K’’ increments, where 1K is 1,024 words (i.e.,
210 = 1,024) of storage space. Programmable controller memory capacity
may vary from less than 1,000 words to over 64,000 words (64K words)
depending on the brand of programmable controller. The complexity of
the control plan will determine the amount of memory required.

Although there are several different types of computer memory, they can
always be classified as either volatile or nonvolatile. Volatile memory will
6 Introduction to Programmable Controllers

lose its programmed contents if all operating power is lost or removed.


Volatile memory is easily altered and is quite suitable for most
programming applications when they are supported by battery backup or
a recorded copy of the program. Nonvolatile memory will retain its data
and program even if there is a complete loss of operating power. It does
not require a backup system.

The most common form of volatile memory is random access memory, or


RAM. RAM is relatively fast and provides an easy means to create and
store application programs. If normal power is disrupted, PLCs with RAM
use battery or capacitor backups to prevent program loss.

Electrically erasable programmable read-only memory (EEPROM) is a


nonvolatile memory that is programmed using application software,
which runs on a personal computer or through a micro-PLC handheld
programmer.

The user can access two areas of memory in the PLC system: program files
and data files. Program files store the control application program,
subroutine files, and the error file. Data files store data associated with the
control program, such as input/output status bits, counter and timer
preset and accumulated values, and other stored constants or variables.
Together, these two general memory areas are called user or application
memory. The processor also has an executive or system memory that
directs and performs operational activities such as executing the control
program and coordinating input scans and output updates. This process
system memory, which is programmed by the PLC manufacturer, cannot
be accessed or changed by the user.

I/O System
The I/O system provides the physical connection between the process
equipment and the microprocessor. This system uses various input circuits
or modules to sense and measure the physical quantities of the process,
such as motion, level, temperature, pressure, flow, and position. In
response to the status sensed or the values measured, the processor
controls various output modules. These modules drive field devices such
as valves, motors, pumps, and alarms to exercise control over a machine
or a process.

Input Types
The inputs from field instruments or sensors supply the data and
information the processor needs to make the logical decisions required to
control a given process or machine. These input signals come from devices
as varied as pushbuttons, hand switches, thermocouples, strain gauges,
Introduction to Programmable Controllers 7

and so on. The signals are connected to input modules to filter and
condition the signal so the processor can use it.

Output Types
The outputs from the programmable logic controller energize or
deenergize control devices to regulate processes or machines. These
output signals are control voltages from the output circuits, and they are
generally not high-power signals. For example, an output module sends a
control signal that energizes the coil in a motor starter. The energized coil
closes the power contacts of the starter. These contacts then close to start
the motor. The output modules are usually not directly connected to the
power circuit but rather to devices such as the motor starter and heater
contactors that apply high-power (greater than 10 amps) signals to the
final control devices.

I/O Structure
PLCs are classified as micro, small, medium, and large mainly based on
the I/O count. Micro-PLCs generally have an I/O count of 32 or less, small
PLCs have less than 256 I/O points, medium-sized PLCs have an I/O
count of less than 1,024, and large PLCs have an I/O count greater than
1,024. Micro-PLCs are self-contained units comprised of the processor, the
power supply, and I/O. Because they are self-contained, micro-PLCs are
also called packaged controllers. A modular PLC is one that has separate
components or modules.

A packaged controller offers the advantages of being smaller, costing less,


and being easy to install. A typical wiring diagram for a micro-PLC is
shown in Figure 1-4. It shows an Allen-Bradley Micro-1000 PLC with nine
inputs and five outputs. The unit is powered with 120 vac through an
internal power supply that operates the internal I/O circuits and the built-
in microprocessor. This power supply also generates 24 volts direct
current (vdc) for the field input switches and contacts.

In medium and large PLC systems the I/O modules are normally installed
or plugged into a slot in a ‘‘universal’’ modular housing. The term
universal in this context means that any module can be inserted into any
I/O slot in the housing. Modular I/O housings are also normally designed
so the I/O modules can be removed without turning off the ac power or
removing the field wiring.

Figure 1-5 shows some typical configurations for I/O modular housings.
The backplane of the housings into which the modules are plugged has a
printed circuit card that contains the parallel communications bus to the
processor. It also contains the dc voltages for operating the digital and
8 Introduction to Programmable Controllers

Allen-Bradley
Micro-1000 PLC
Level I/O Address
Switch
I/0 O/0 M1
Pressure
Switch Pump Starter
I/1 VAC

I/2 O/1 K1

Position Switch Heater Contactor


I/3 VAC

Pump auxiliary I/4 O/2


(Aux.) Contacts
I/5 VAC

O/5
Spare I/9
VAC
DC Com
L1
+24 Vdc Out H
120 Vac In
N
L2

Figure 1-4. Typical micro-PLC wiring diagram.

Power
CPU
Supply

4 I/O Slots

Power
CPU
Supply

8 I/O Slots

Power
CPU
Supply

12 I/O Slots

Figure 1-5. Typical I/O modular housings.


Introduction to Programmable Controllers 9

analog circuits in the I/O modules. These I/O housings can be mounted in
a control panel or on a subpanel in an enclosure. The housings are
designed to protect the I/O module circuits from dirt, dust, electrical
noise, and mechanical vibration.

The backplane of the I/O chassis has sockets for each module. They
provide the power and data communications connection to the processor
for each module.

Discrete Inputs/Outputs
Discrete is the most common class of input/output in a programmable
controller system. This type of interface module connects field devices that
have two discrete states, such as ON/OFF or OPEN/CLOSED, to the
processor. Each discrete I/O module is designed to be activated by a field-
supplied voltage signal, such as +5 vdc, +24 vdc, 120 vac, or 220 vac.

In a discrete input (DI) module, if an input switch is closed an electronic


circuit in the input module senses the supplied voltage. To indicate the
status of that device it then converts the supplied voltage into a logic-level
signal that is acceptable to the processor. A logic 1 indicates “ON” or
“CLOSED,” and a logic 0 indicates “OFF” or “OPENED” for a field input
device or switch. A typical discrete input module is shown in Figure 1-6.

A
Push Button (NC)
00

Liquid Level Switch (NC) 01

Valve Limit Switch (NO)


02

Valve Limit Switch (NC) 03

Pressure Switch (NC) 04

Pressure Switch (NO)


05

Flow Switch (NC)


06

Temperature Switch (NC)


07

Hot 120 Vac Neutral

Figure 1-6. Typical discrete input module wiring diagram.


10 Introduction to Programmable Controllers

Most input modules will contain a light-emitting diode (LED) to indicate


the status of each input.

In a discrete output (DO) module, the output interface circuit switches the
supplied control voltage that will energize or deenergize the field device.
If an output is turned ON through the control program, the interface
circuit switches the supplied control voltage to activate the referenced
(addressed) output device.

Figure 1-7 shows a wiring diagram for a typical discrete output module. It
can be thought of as a simple switch through which power can be
provided to control the output device. During normal operation, the
processor sends the output state that was determined by the logic
program to the output module. The module then switches the power to
the field device.

A fuse is normally provided in the output circuit of the module to prevent


excessive current from damaging the wiring to the field device. If the fuse
is not provided, it should be included in the system design.

Hot Neutral
120 Vac
In TB-1 Field wiring
A N

0 Heater 1
1 H1

1 Heater 1
2 H2

Feed Valve FV-1 FV-1


2 3

Feed Valve FV-1 FV-2


3 4

Pump 3 Starter
4 5 P3

5 Pump 4 Starter 6 P4

6 Mixer 1 Starter 7 M1

7 Mixer 2 Starter 8 M2

N Neutral
N
Panel wiring

Figure 1-7. Typical discrete output module wiring diagram.


Introduction to Programmable Controllers 11

Analog I/O Modules


The analog I/O modules make it possible to monitor and control analog
voltages and currents, which are compatible with many sensors, motor
drives, and process instruments. By using analog I/O, it is possible to
measure or control most process variables with appropriate interfacing.

Analog I/O interfaces are generally available for several standard


unipolar (single polarity) and bipolar (negative and positive polarity)
ratings. In most cases, a single input or output interface can accommodate
two or more different ratings and can satisfy either a current or a voltage
requirement. The different ratings can be selected via either hardware (i.e.,
switches or jumpers) or software.

Digital I/O Modules


Digital I/O modules are similar to discrete I/O modules in that they
process discrete ON/OFF signals. However, the main difference is that
discrete I/O interfaces require only a single bit to read an input or control
an output. On the other hand, digital I/O modules process a group of
discrete bits in parallel or serial form.

Typical devices that interface with digital input modules are binary
encoders, bar code readers, and thumbwheel switches. LED displays and
intelligent display panels are just two of the instruments that are driven by
digital output modules.

Special-Purpose Modules
The discrete and analog I/O modules will normally cover about 80
percent of the input and output signals encountered in programmable
controller applications. However, to process certain types of signals or
data efficiently, the programmable controller system will require special-
purpose modules. These special interfaces include those that condition
input signals, such as thermocouple modules, pulse counters, or other
signals that cannot be interfaced using standard I/O modules. Special-
purpose I/O modules may also use an onboard microprocessor to add
intelligence to the interface. These intelligent modules can perform
complete processing functions independent of the CPU and the control
program scan.

Another important class of special-purpose I/O modules are


communication modules that communicate with distributed control
systems (DCSs), other PLC networks, plant computers, or other intelligent
devices.
12 Introduction to Programmable Controllers

Programming Languages
The programming language allows the user to communicate with the
programmable controller via a programming device. Programmable
controller manufacturers use several different programming languages,
but they all use instructions to convey a basic control plan to the system.

A control plan or program is defined as a set of instructions arranged in a


logical sequence to control the actions of a process or machine. For
example, the program might direct the programmable controller to turn a
motor starter on when a pushbutton is depressed. It might at the same
time direct the programmable controller to turn on a control panel-
mounted run light when the motor starter auxiliary contacts are closed.

A program is written by combining instructions in a certain order. Rules


govern the way in which instructions are combined as well as the actual
form of the instructions. These rules and instructions combine to form a
language. The three most common types of languages encountered in
programmable controller systems are as follows:

1. Ladder logic (LAD)


2. Statement list (STL)
3. Function block diagram (FBD)
Figure 1-8 shows a simple logic function implemented using each of the
three common types of PLC languages. The logic function shown is an
AND function, that is, if pushbutton 1 (PB_1) is closed and pushbutton 2
(PB_2) is closed then the GO_Light is on.

Ladder Logic (LAD)


Ladder logic (LAD) is the most common language used in PLC applications.
The reason for this is relatively simple. The original programmable
controllers were designed to replace electrical relay-based control systems.
Those systems were designed by technicians and engineers using a
symbolic language called ladder diagrams. The ladder diagram consists of a
series of symbols interconnected by lines to indicate the flow of current
through the various devices. The ladder drawing consists of basically two
things. The first is the power source, which forms the sides of the ladder
(rails), and the second is the current that flows through the various logic
input devices that form the rungs of the ladder. If there is electrical current
flow through the relay contacts in a rung, the output relay coil will be
turned on. This is termed power flow in the ladder rung.

In electrical design, the ladder diagram is intended to show only the


circuitry necessary for the basic operation of the control system. Another
Introduction to Programmable Controllers 13

Ladder Logic (LAD)


“PB_1” “PB_2” “GO_Light”

Statement List (STL)


A “PB_1”
A “PB_2”
= “GO_Light”

Function Block Diagram (FBD)

“PB_1” “GO_Light”
&
“PB_2” =

Figure 1-8. A sample logic function using three PLC languages.

diagram, called the wiring diagram, is used to show the physical connection
of the control devices. The discrete I/O module diagrams shown earlier
are examples of wiring diagrams. A typical electrical ladder diagram is
shown in Figure l-9. In this diagram, a pushbutton (PBl) is used to
energize a pump start control relay (CRl) if the level in a liquid storage
tank is not high. Each device has a special symbol assigned to it so the
diagram can be read easier and faster.

The same control application can be implemented using a PLC ladder


logic (LAD) program, as shown in Figure l-10. The two diagrams are read

L1 Start L2
PB1 Tank Level Control
Not High Relay 1
Rung 1 CR1
SEAL
LSH-1
CR1(1)
Pump Starter

Rung 2 P1
CR1(2)

Figure 1-9. Typical electrical ladder diagram.


14 Introduction to Programmable Controllers

Start Tank Level Run Pump


PB Not High
O:000/00
I:010/00 I:010/01
Rung 1

Run Pump
O:000/00
Pump ON
Run Pump Light
O:000/01
O:000/00
Rung 2

Figure 1-10. Typical ladder diagram (LAD) program.

in the same way, from left to right, with the logic input conditions on the
left and the logical outputs on the right. In the case of electrical diagrams,
there must be electrical continuity to energize the output devices. For
programmable controller ladder programs, there must be logic continuity
to energize the outputs.

In ladder programs, three basic instructions are used to form the program.
The first symbol is similar to the normally open (NO) relay contacts used in
electrical ladder diagrams. This instruction uses the same NO symbol in
ladder programs. It instructs the processor to examine its assigned bit
location in memory. If the bit is ON (logic l), the instruction is TRUE and
there is logic continuity through the instruction on the ladder rung. If the
bit is OFF (logic 0), there is no logic continuity through the instruction on
the rung.

The second important instruction is similar to the normally closed (NC)


contact from electrical ladder diagrams. It is called the examine off
instruction. Unlike the examine on instruction, it directs the processor to
examine the bit for logical 0 or the OFF condition. If the bit is OFF, the
instruction is TRUE and there is logic continuity through the instruction. If
the bit is ON, the normally closed instruction is FALSE and there is no
logic continuity.

The third instruction is the output coil instruction. This instruction is


similar to the relay coil in electrical ladder diagrams. It directs the
processor to set a certain location in memory to ON or l if there is logic
continuity in any logic path preceding it. If there are no complete logic
continuity paths in the ladder rung, the processor sets the output coil
instruction bit to 0 or OFF.
Introduction to Programmable Controllers 15

In Figure 1-10, the reference addresses for the logic bits are given by the
letters I and O followed by a five-digit number above the instructions. The
letter I before the five-digit number indicates an input bit, and the letter O
before the five-digit number indicates an output bit. The reference address
indicates where in the memory the logic operation will take place.

In the ladder logic program shown in Figure 1-10, the examine on


instruction for the start pushbutton (PB) directs the processor to see if the
reference address I:010/00 is ON. In the same way, the examine on
instruction for the Tank Level Not High input instructs the processor to see if
the reference address I:010/01 is OFF. If there is logic continuity through
both instructions, the output coil instruction at address O: 000/00 is
turned ON. Logic continuity from the left side to the right end of a rung is
called logical power flow in PLC programming.

This same output bit is then used to ‘‘seal in’’ the start pushbutton
instruction. It also turns on the energized instruction bit O:000/01 to turn
on the pump run light.

Statement List (STL)


Statement list (STL) is a textual programming language that you can use to
create the code for a PLC control program. Its syntax for statements is
similar to microprocessor assembly language and consists of instructions
followed by addresses on which the instructions act. The STL language
contains a comprehensive range of instructions for creating a complete
user program. For example, in the Siemens S7 programming software
package, there are over 130 different basic STL instructions and a wide
range of addresses available depending on the PLC model you use.

STL instruction statements have two basic structures: one statement


comprised of an instruction alone (for example, NOT) and another in
which the statement is comprised of both an instruction and an address.
The most common structure is for the statement to have an instruction and
an address. The address of an instruction statement indicates a constant or
the location where the instruction finds a value on which to perform an
operation.

The Boolean bit logic instructions are the most basic type of STL instructions.
These instructions perform logic operations on single bits in PLC memory.
The basic bit logic instructions are AND (A) and its negated form AND
NOT (AN), OR (O), and EXCLUSIVE OR (OR) and its negated form,
EXCLUSIVE OR NOT (XN). These instructions check the signal state of a
bit address to establish whether the bit is activated (1) or not activated (0).
16 Introduction to Programmable Controllers

Bit logic instructions are also called relay logic instructions since they can
execute commands that can replace a relay logic circuit. Figure 1-11 is an
example of AND logic operation. The STL program is listed on the left
side, and the relay logic circuit is shown on the right side for comparison.
In this example, the statement list program uses an AND instruction (A) to
program two normally open (NO) contacts in series. Only when the signal
state of both the normally open contacts is 1 can the state of output Q4.0
be 1 and the coil be energized.

Statement List Relay Logic Diagram


Program
Power Rail

A I 1.0 I 1.0 NO Contact

A I 1.1 I 1.1 NO Contact

= Q 4.0 Q 4.0 Coil

Figure 1-11. Comparison of STL program and relay logic circuit.

Function Block Diagram (FBD)


The function block diagram (FBD) is a graphical programming language. It
allows the programmer to build complex control procedures by taking
existing functions from the FBD library and wiring them in a graphic
diagram area. An FBD describes a relationship or function between input
and output variables. A function is described as a set of elementary
function blocks, as shown in Figure 1-12. Input and output variables are
connected to blocks by connection lines.

Function Block Logical “AND” symbol

input_1 &
output
input_2

Figure 1-12. Typical elementary function block.


Introduction to Programmable Controllers 17

You can build an entire function operated by an FBD program with


standard elementary function blocks from the FBD library. Each
elementary function block has a fixed number of input connection points
and a fixed number of output connection points. For example, the Boolean
AND function block shown in Figure 1-12 has two inputs and only one
output. The inputs are connected on its left border. The outputs are
connected on its right border. An elementary function block performs a
single function between its inputs and its outputs. For example, the
elementary function block shown in Figure 1-12 performs the Boolean
AND operation on its two inputs and produces a result at the output. The
name of the function to be performed by the block is written in its symbol.
In the case of the AND function the symbol is &.

Programming Devices
Programming devices are used to enter, store, and monitor the
programmable controller software. They can be dedicated portable unit
systems or personal computer-based systems. The personal computer-
based systems normally have these basic components: keyboard and
mouse; color graphics display or CRT; personal computer; printer; and
communications interface card and cable, as shown in Figure 1-13.

You normally connect the programming devices to the programmable


controller system only while programming, starting up, or
troubleshooting the control system. Otherwise, the programming device is
disconnected from the system.

The programming terminals are normally either a handheld programmer


or a personal computer-based system. The handheld programmers are
inexpensive and portable; they are normally used to program small

Color
Graphics
PLC Display
Comm.
Card PERSONAL
COMPUTER PRINTER
Communications Cable
Keyboard Mouse

Power
PLC DI DI DO DO AI AI AO TC TC
Supply

Typical I/O Modules

Figure 1-13. Typical programmable controller system.


18 Introduction to Programmable Controllers

programmable controllers. Most of these units resemble portable


calculators but with larger displays and a somewhat different keyboard.
The displays are generally LED (light-emitting diode) or dot matrix LCD
(liquid crystal display). The keyboard consists of alphanumeric keys,
programming instruction keys, and special-function keys. Even though
they are mainly used for writing and editing the control program, the
portable programmers are also used for testing, changing, and monitoring
the program.

The standard programming terminal is a personal computer like the one


shown in Figure 1-13 in which the programming software loaded on the
hard drive. These units can perform program editing and storage. They
also have added features such as the option to print out programs and
connect them to local area networks (LANs). LANs give the programmer
or engineer access to any programmable controller in the communications
network, so you can monitor and control any device in the network.
Normally, laptop PCs are used because they are light and portable and can
be easily used in the field while testing, starting up, and modifying the
control program.

Power Supply
The power supply converts ac line voltages to dc voltages to power the
electronic circuits in a programmable controller system. These power
supplies rectify, filter, and regulate voltages and currents to supply the
correct amounts of voltage and current to the system. The power supply
normally converts 120 vac or 240 vac line voltage into dc voltages such as
+5 vdc, –15 vdc, or +15 vdc.

The power supply for a programmable controller system may be


integrated with the processor, memory, and I/O modules into a single
housing, or it might be a separate unit connected to the system through a
cable. As a system expands to include more I/O modules or special-
function modules, most programmable controllers require an additional
or auxiliary power supply to meet the increased power demand.
Programmable controller power supplies are usually designed to
eliminate the electrical noise that is present on the ac power and signal
lines of industrial plants so it does not introduce errors into the control
system. They are also designed to operate properly in the higher-
temperature and humidity environments present in most industrial
applications.

Graphical User Interface


Two methods are commonly used to provide operators with color process
graphics displays in programmable controller-based control systems. The
Introduction to Programmable Controllers 19

first is to hard-wire the programmable controller I/O modules to a


graphics display panel with hardwired lights and digital indicators. This
method is cost effective in a small system that will not be changed. It is
generally not recommended in larger control systems that will be
expanded in the future. The second method is to use an industrial-grade
personal computer loaded with process color graphics software. This
method has the following advantages: you can easily modify the process
display screens for process changes, and the computer can perform other
functions such as listing alarms, generating reports, and programmable
controller software.

These features are best explained by considering a personal computer-


based graphical user interface (GUI) system on a typical process control
system, as shown in Figure 1-14. The software for vendor-supplied GUI
color displays is normally menu-driven and relatively easy to use. The
process display screens are usually based on the process and instrument
drawings for the process being controlled.

Process
AUTO
Gas In
FV1 FV2 OFF

MAN.
FV4
Heating
Gas In FV3

In High High In
Service Press Press Service
Out of Tower Tower Out of
Service Service
1 2
In Low Low In
Regen. Press Press Regen.

Heating FV5
Gas Out FV8
FV6

FV7

Process
Gas Out

Figure 1-14. Dehydration GUI display.


20 Introduction to Programmable Controllers

For example, if we built a process display based on a dehydration process,


the computer-generated display would be as shown in Figure 1-14. An
advantage of a PC-based GUI is that process data and alarm messages can
be displayed on the screen.

In the GUI graphics of Figure 1-14, Tower 1 is shown in service so that its
process gas inlet valve FV-1 and process gas outlet valve FV-7 are open
and its heating gas inlet valve FV-3 and heating gas outlet valve FV-5 are
closed. Tower 2 is shown in regeneration with valves FV-4 and FV-6
opened and valves FV-2 and FV-8 closed. The open valves in Figure 1-14
have no fill color, and the closed valves are solid black. We can also display
process conditions on the graphics screen, such as tower pressure high or
low, as shown in Figure 1-14.

The process values, such as valves open and closed, are transmitted to the
GUI application with special communications interface software called
drivers. The GUI software is normally configured using a cross-referenced
table that lists the PLC input and output addresses that will drive or
animate each point or information window on the graphic displays.
Normally, a large number of communications drivers are provided with
the GUI software so you can interface with the various PLC manufacturer
and PLC types. The GUI programmer simply selects the correct PLC
manufacturer and the correct PLC model number for the application.

Another important advance in programmable controller is using personal


computers to directly replace PLC processors in applications. Generally,
the standard PLC input and output modules are controlled by an
industrial-grade personal computer. These systems are generally called
SoftLogic or SoftPLC systems.

SoftLogic or SoftPLC
The original hard-logic PLC had the advantage of being designed for
harsh industrial environments. However, with recent designs of
industrial-grade personal computers this advantage has been lost. One
disadvantage of most PLCs is that they use proprietary software. With
personal computers, faster and more powerful capabilities are introduced
at rapid and regular intervals. Personal computer speeds have historically
doubled every eighteen months. This is not true of PLCs, however,
because their proprietary architectures require additional engineering so
advanced microprocessor technology can be adapted to them.

As a result, it is estimated that hard-logic PLC performance lags personal


computer industry advances by eighteen months to two years, and the
gap is widening. With PC processing power leapfrogging itself at this
Introduction to Programmable Controllers 21

same rate, PLCs are having great difficulty keeping up with commodity
PCs retailing to consumers for under $1,000. Moreover, after a decade of
exponential growth in their capabilities, PCs now come in rugged
packages, with ever faster processors, real-time operating systems to
handle time-critical operations, larger memory, and a multitude of
Windows-based software products. All this comes at ever lower cost
because of competitive pricing and high-volume manufacturing.

Thus, the personal computer is starting to replace the PLC processor in


small- and medium-sized automation projects. Some PLC manufacturers
are actually using PC circuit cards inside their PLCs and calling the system
a “SoftPLC.” The potential for increased use of personal computers to
directly replace proprietary PLCs appears strong.

EXERCISES
1.1 Explain the operation and purpose of the processor in a typical
programmable controller system.
1.2 What is the main purpose of the input and output system in a PLC
system?
1.3 List some discrete input devices typically found in process
industries.
1.4 List some discrete output devices typically encountered in
industrial applications.
1.5 List some analog signal values typically found in process
applications.
1.6 Explain the difference between volatile and nonvolatile memory.
1.7 List some common applications for personal computers in
programmable controller systems.
1.8 What device is most commonly used to program PLCs?
1.9 Discuss the three basic instructions used in ladder logic programs.
1.10 What is power flow in a relay ladder diagram?
1.11 Explain the concept of logical power flow in a ladder diagram
program.
1.12 What are the two basic structures used in STL instruction
statements?
22 Introduction to Programmable Controllers

BIBLIOGRAPHY
1. Allen-Bradley Co., Inc. Micro Mentor--Understanding and Applying
Micro Programmable Controllers (Allen-Bradley, 1995).
2. Gilbert, R. A., and J. A. Llewellyn. Programmable Controllers—
Practices and Concepts (Industrial Training Corp., 1985).
3. Jones, C. T., and L. A. Bryan. Programmable Controllers Concepts and
Applications (International Programmable Controllers, 1983).
4. Plato Computer-Based Training. Programmable Controller
Fundamentals (Allen- Bradley, 1985).
5. Webb, J. W., and R. A. Reis. Programmable Logic Controllers—
Principles and Applications, 3d ed. (Prentice-Hall, 1995).
6. Wisnosky, D. E. SoftLogic: Overcoming Funnel Vision (Wizdom
Controls, 1996).
Appendix A
Table of Contents for
Programmable Controllers,
Third Edition

PREFACE xi

ABOUT THE AUTHOR xiii

Chapter 1 INTRODUCTION TO PROGRAMMABLE CONTROLLERS 1


Introduction, 1
Brief History of PLCs, 2
Basic Components of PLC Systems, 4
SoftLogic or SoftPLC, 20

Chapter 2 BINARY LOGIC FUNDAMENTALS 23


Introduction, 23
Binary Signals and Codes, 23
Numbering Systems, 24
Binary Data Codes, 30
Binary Logic Functions, 36
Logic Function Symbols, 40
Ladder Logic Diagrams, 41

Chapter 3 ELECTRICAL AND ELECTRONIC FUNDAMENTALS 47


Introduction, 47
Fundamentals of Electricity, 47
Selecting Wire Size, 60
Electrical Control Devices, 66

Chapter 4 INPUT/OUTPUT SYSTEMS 73


Introduction, 73
Discrete Inputs, 73
Discrete Outputs, 74
23
24 Table of Contents for Programmable Controllers, Third Edition

I/O Signal Types, 75


Intelligent I/O Modules, 86
Communications Modules, 89
Designing I/O Systems, 91

Chapter 5 MEMORY AND ADDRESSING 97


Introduction, 97
Memory Components and Structure, 97
Memory Types, 99
Memory Organization, 102
User Program Memory Area, 105
I/O Addressing, 106
Hardware-to-Software Interface, 108

Chapter 6 LADDER DIAGRAM PROGRAMMING 115


Introduction, 115
Basic LAD Instruction Set, 116
Timer and Counter Instructions, 123
Data Transfer Operations, 129
Arithmetic Operations, 131
Data Comparison Operations, 133
Program Control Instructions, 134
PLC Control Program Documentation, 136

Chapter 7 ADVANCED LAD PROGRAMMING 141


Introduction, 141
Advanced LAD Instructions, 141

Chapter 8 STANDARD PLC PROGRAMMING LANGUAGES 159


Introduction, 159
International Standard for PLC Languages, 159
Sequential Function Chart Language, 161
Structured Text Language, 164
Statement List Programming, 167

Chapter 9 FUNCTION BLOCK DIAGRAM PROGRAMMING 193


Introduction, 193
Elements and Box Structure, 193
Bit Logic Instructions, 195
Timer Instructions, 203
Counter Instructions, 212

Chapter 10 DATA COMMUNICATION SYSTEMS 225


Introduction, 225
Basic Communications, 225
Table of Contents for Programmable Controllers, Third Edition 25

Transmission Methods, 228


Signal Multiplexing, 231
Error Control and Checking, 233
Communications Protocols, 237
Serial Synchronous Transmission, 239
Standard Network Architecture, 247
Serial Hardware Standards, 249

Chapter 11 SYSTEM DESIGN AND APPLICATIONS 253


Introduction, 253
System Design, 253
Natural Gas Dehydration Application, 261
Two-Stage Alternating Pump Application, 272

Chapter 12 DESIGN, INSTALLATION, AND MAINTENANCE 279


Introduction, 279
Control Panel Design, 279
Equipment Layout Design, 289
System Start-Up and Testing, 290
Maintenance Practices, 292
Troubleshooting, 294
Documentation, 299

Appendix A ANSWERS TO EXERCISES 301

INDEX 331
Index

analog I/O module 11 graphical user interface (GUI) 19, 20


AND function 12, 17
application memory 6 hand switches 6
heater contactors 7
bit 5, 11, 14, 15
logic instruction 15, 16 I/O circuits 7
Boolean negation 15 I/O modules 7, 11, 18
Boolean value 17 I/O system 6
input
contactors 7 and output modules 3, 20
control circuits 1, 6
application 3, 6, 13 image table 5
logic 1 scan 5, 6
panel 1, 9, 12 input/output (I/O) 3
plan 1, 5 input/output system 4
program 1, 5, 6, 15, 18
counters 11 ladder diagram (LAD) 3, 12
CPU 5, 11 ladder drawing 12
current 2, 10 ladder logic 3, 12, 15
LED display 11
data light-emitting diode (LED) 10
files 6 logic unit 1
memory 1, 4–??, 5, ??–6
digital I/O modules 11 memory 4, 5, 6, 18
discrete I/O module 9, 11, 13 unit 4, 5
discrete input (DI) module 9 micro-PLC 6, 7
discrete output (DO) module 10 microprocessor 1, 4
distributed control systems (DCSs) 11 modular I/O housings 7
motor starter 7
electrical
ladder diagram 13, 14 nonvolatile memory 6
electrically erasable programmable read-only normally closed contacts 14
memory (EEPROM) 6 normally closed instruction 14
exclusive OR 15 normally open contacts 14, 16

27
28 Index

NOT function 15

operating cycle 4
OR function 15
output coil 14
output image table 5

personal computer 3, 17, 18, 21


power supply 4, 7, 18
processor 1, 4, 6
processor scan 4
program files 6
program scan 5
programmable controllers 1, 2, 3, 12
programmable read-only memory 6
programming device 1, 4, 12, 17
programming language 3, 12, 15
programming terminals 17
pushbuttons 6

read-only memory 6
relay 12, 13, 14
ladder logic 3
logic instructions 16

scan time 1
seal in 15
statement list language 15
statement list programming 16
strain gauges 6
system memory 6

thermocouple 6
thermocouple input module 11
troubleshooting 17

universal modular housing 7

volatile memory 5
voltage 1, 9, 11

You might also like