Professional Documents
Culture Documents
The control system needed the capability to pass data collection to a central system.
The method used to program the controller had to be simple, so that it could be easily
understood by plant personnel.
Leading Brands Of PLC
AMERICAN 1. Allen Bradley
2. Gould Modicon
3. Texas Instruments
4. General Electric
5. Westinghouse
6. Cutter Hammer
7. Square D
EUROPEAN 1. Siemens
2. Klockner & Mouller
3. Festo
4. Telemechanique
JAPANESE 1. Toshiba
2. Omron
3. Fanuc
4. Mitsubishi
Areas of Application
Annunciators Injection Molding Cranes Slitting
Auto Insertion Assembly Crushing Sorting
Bagging Motor Winding Cutting Stackers
Baking Oil Fields Digesters Stitching
Blending Painting Drilling Stack Precipitators
Boring Palletizers Electronic Testing Threading
Brewing Pipelines Elevators Tire Building
Calendaring Polishing Engine Test Stands Traffic Control
Casting Reactors Extrusion Textile Machine
Chemical Drilling Robots Forging Turbines
Color Mixing Rolling Generators Turning
Compressors Security Systems Gluing Weaving
Conveyors Stretch Wrap Grinding Web Handling
Heat Treating Welding
PLCs
Widely Applied in Every Industry
Were Developed to Simplify the Implementation of
Control Automation Systems in Plants and Assembly
Lines
Designed to Minimize the Number of Control Relays in
a Process and Maximize the Ways Relays can be Used
First Applied to Automobile Industry in the Late 1960s
Flexible, Reliable and Low Cost
PLCs Are ...
Similar to a Microcontroller:
Microprocessor Based
Onboard Memory for Storing Programs
Special Programming Language: Ladder Logic
Input/Output Ports
1) on-off control,
2) sequential control,
3) feedback control, and
4) motion control.
PLCs Are...
Dissimilar to Microcontrollers:
Intended for Industrial Applications
I/O Designed to interface with Control Relays
Emphasis on Maximum Reliability
Advantages of PLC
A. Flexibility
v Universal Controller - can replace various independent/ standalone controller.
B. Implementing Changes and Correcting Errors
v Do not have to rewiring relay panel.
v Change program using keyboard.
D. Lower Cost
v Advancement in technology and open architecture of PLC will reduce the
market price.
I. Reliability
In general -very reliable
L. Security
Software lock on a program (Password)
C. Environment Consideration
Not adapted for very high temperature, high humidity level, high vibration, etc.
D. Fail-safe operation
Does not start automatically when power failure ( can be programmed into )
Not "Fail-safe" -Fail-shorted rather than OPEN
E. Fixed-circuit operation
Fixed control system -less costly
PLC Size
1. SMALL - it covers units with up to 128 I/Os and
memories up to 2 Kbytes.
- these PLCs are capable of providing simple to
advance levels or machine controls.
2. MEDIUM - have up to 2048 I/Os and memories up to 32
Kbytes.
3. LARGE - the most sophisticated units of the PLC family.
They have up to 8192 I/Os and memories up to 750 Kbytes.
- can control individual production processes or
entire plant.
PROGRAMMABLE LOGIC CONTROLLER
Invented in 1968 as a substitute for hardwired relay panels.
I M O M
N O
P D U O
U U PROCESSOR T D
T L P U
From E U L
To
SENSORS T E OUTPUT
Pushbuttons, Solenoids,
contacts, contactors,
limit switches, alarms
etc. etc.
PROGRAMMING
DEVICE
Programming Device
Types:
The main purpose of the I/O interface is to condition the various signals received
from or sent to the external input and output devices.
Input modules converts signals from discrete or analog input devices to logic
levels acceptable to PLCs processor.
Output modules converts signal from the processor to levels capable of driving
the connected discrete or analog output devices.
I/O Module
DC INPUT MODULE
IS NEEDED TO:
USE TO Prevent voltage
DROP THE transients from
VOLTAGE damaging the
TO LOGIC processor.
LEVEL Helps reduce the
effects of electrical
noise
Current Buffer,
FROM Limiting Filter,
OPTO- TO
INPUT Resistor ISOLATOR hysteresis
PROCESSOR
DEVICE Circuits
I/O Module
AC INPUT MODULE
IS NEEDED TO:
CONVERTS THE AC Prevent voltage
INPUT TO DC AND transients from
DROPS THE damaging the
VOLTAGE TO LOGIC processor.
LEVEL Helps reduce the
effects of electrical
noise
Rectifier, Buffer,
FROM Resistor Filter,
OPTO- TO
INPUT Network ISOLATOR Hysteresis
PROCESSOR
DEVICE Circuits
24
25
27
OUTPUTS
INPUTS MOTOR
CONTACTOR
LAMP
PUSHBUTTONS
PLC
Allen-Bradley 1746-1A16
L2 I= Input
L1
Module
I:2 slot # in
rack
0
P. B SWITCH Module
Terminal #
Address I:2.0/0
LADDER PROGRAM
INPUT MODULE
WIRING DIAGRAM
CONTACTOR
L1 N.
L2 O
MOTOR
C SOLENOI
L2L1 D
FIELD VALVES
LAMP
WIRING
BUZZER
OUTPUT MODULE
WIRING
L1 O:4
L2
CONTACTOR 0
LADDER PROGRAM
Discrete Input
A discrete input also referred as digital input is an input that is either ON or
OFF are connected to the PLC digital input. In the ON condition it is referred to
as logic 1 or a logic high and in the OFF condition maybe referred to as logic o
or logic low.
Normally Open
Pushbutton
Normally Closed
Pushbutton
Normally Open switch
OFF PLC
Logic 0
Input
Module
24 V dc
IN
OFF PLC
Logic 1
Input
Module
24 V dc
Analog Input
An analog input is an input signal that has a continuous
signal. Typical inputs may vary from 0 to 20mA, 4 to 20mA
or 0 to10V. Below, a level transmitter monitors the level of
liquid in the tank. Depending on the level Tx, the signal to the
PLC can either increase or decrease as the level increases
or decreases.
Level Transmitter IN
PLC
Analog
Tank Input
Module
35
Digital Output
A discrete output is either in an ON or OFF condition. Solenoids,
contactors coils, lamps are example of devices connected to the
Discrete or digital outputs. Below, the lamp can be turned ON or OFF by the PLC
output it is connected to.
OUT
PLC
Lamp
Digital
Output
Module
36
Analog Output
An analog output is an output signal that has a continuous
signal. Typical outputs may vary from 0 to 20mA, 4 to 20mA
or 0 to10V.
OUT
E Supply air
PLC 0 to 10V P
Analog
Output
Module
Pneumatic control valve
37
Memory Map Organization
System memory includes an area called the EXECUTIVE,
composed of permanently-stored programs that direct all
system activities, such as execution of the users control
program, communication with peripheral devices, and other
SYSTEM system activities.
The system memory also contains the routines that
implement the PLCs instruction set, which is composed of
specific control functions such as logic, sequencing, timing,
counting, and arithmetic.
System memory is generally built from read-only memory
devices.
APPLICATION
The application memory is divided into the data table area
Data Table and user program area.
The data table stores any data associated with the users
User Program control program, such as system input and output status
data, and any stored constants, variables, or preset values.
The data table is where data is monitored, manipulated, and
changed for control purposes.
The user program area is where the programmed
instructions entered by the user are stored as an application
control program.
While the PLC is running, the scanning process includes the following four
phases, which are repeated continuously as individual cycles of operation:
PHASE 1
Read Inputs
Scan
PHASE 2
Program
Execution
PHASE 3
Diagnostics/
Comm
PHASE 4
Output
Scan
PHASE 1 Input Status scan
A PLC scan cycle begins with the CPU reading the status of its inputs.
The time it takes to implement a scan cycle is called SCAN TIME. The scan
time composed of the program scan time, which is the time required for
solving the control program, and the I/O update time, or time required to
read inputs and update outputs. The program scan time generally depends
on the amount of memory taken by the control program and type of
instructions used in the program. The time to make a single scan can vary
from 1 ms to 100 ms.
PLC Communications
Common Uses of PLC Communications Ports
Monitoring data and alarms, etc. via printers or Operator Interface Units
(OIUs).
PLC Communications
Serial Communications
Common Standards
RS 232
Local Area Network provides a physical link between all devices plus
providing overall data exchange management or protocol, ensuring that each
device can talk to other machines and understand data received from them.
Manufacturer Network
Allen-Bradley Data Highway
Gould Modicon Modbus
General Electric GE Net Factory LAN
Mitsubishi Melsec-NET
Square D SY/NET
Texas Instruments TIWAY
Specifications
OUTPUT-PORT POWER RATINGS
SCAN TIME
This is the speed at which the controller executes the relay-ladder logic
program. This variable is usually specified as the scan time per 1000 logic
nodes and typically ranges from 1 to 200 milliseconds.
Specifications
MEMORY CAPACITY
Power flows through these contacts when they are closed. The
normally open (NO) is true when the input or output status bit
controlling the contact is 1. The normally closed (NC) is true
when the input or output status bit controlling the contact is 0.
Coils
A B C
Rung
A C
Rung
A C
Rung
Read all field input devices via the input interfaces, execute the user
program stored in application memory, then, based on whatever control
scheme has been programmed by the user, turn the field output devices on
or off, or perform whatever control is necessary for the process application.
The main difference from other computers is that PLCs are armored for severe
conditions (dust, moisture, heat, cold, etc) and have the facility for extensive
input/output (I/O) arrangements
Advantages Continued:
Cost effective for controlling complex systems.
Flexible and can be reapplied to control other systems quickly and easily.
Computational abilities allow more sophisticated control.
Trouble shooting aids make programming easier and reduce downtime.
Reliable components make these likely to operate for years before failure
AP = Automates Programmables industriels
PLC = Programmable Logic Controller: Definition
SPS=SpeicherprogrammierbareSteuerungen
Formerly: cabled relay control (hence 'logic'), analog (pneumatic, hydraulic) governo
Distinguish Instrumentation
flow meter, temperature, position,. but also actors (pump, )
Control
programmable logic controllers with digital peripherals & field bus
Visualization
Human Machine Interface (HMI) in PLCs (when it exists) is limited
to service help and control of operator displays
PLC in a cabinet
CPU1 CPU2
serial connections
redundant
field bus
connection inputs/outputs
example: turbine control (in the test lab)
Global players
Types of PLC
(1) Compact
Monolithic construction
Monoprocessor
Fieldbus connection
(3) Soft-PLC
Linux or Windows NT or CE-based automation products
Direct use of CPU or co-processors
Compact PLC
primitive or no HMI
CPU CPU Analog Binary I/O
cost effective if the rack can be filled I/O fieldbus
courtesy ABB
courtesy Backmann
Rung 0
Rung 1
Rung 2
Ladder Diagrams (2)
he contact plan or "ladder diagram" language allows an easy transition from the
aditional relay logic diagrams to the programming of binary functions.
make contact
origin: (contact travail)
02
electrical 01 relay coil
circuit (bobine)
03 50
break contact
(contact repos)
01 02
corresponding 50 rung
03
ladder diagram
50 50
02
Parallel + 01
40 01
02 40
02
0 1 4 5 12
50
2 3 6 7
N0 & 1 STR 2 & 3 / STR STR 4
10 11 & 5 STR N 6 & 7
00 01
literal expression:
FUN 02 200
!00 & 01 FUN 02 = 200
bFB(A:=1, B:=OK);
nstruction List (IL) Z := X - INT_TO_REAL (bFB.OUT1);
IF Z>57.0 THEN aFB(A:=0, B:=ERR);
ELSE aFB(A:=1, B:=Z is OK);
A: LD %IX1 (* PUSH BUTTON *) END_IF
ANDN %MX5 (* NOT INHIBITED *)
ST %QX2 (* FAN ON *)
PLC Modules
The modular nature of PLC components makes the
design, instillation and maintenance of the first
level of control much simpler.
Similar to the peripheral devices, which can be
obtained for a personal computer, there are
literally thousands of interface modules supported
by PLCs.
While these modules may be numerous they all
have the same function, obtaining or delivering
control signals and information between the
measurement level and the operator interface
level.
The modular nature is possibly the greatest
strength of PLCs and several common modules
will be described below.
Digital Inputs/Outputs (I/O)
By far the most common industrial signals used in PLCs are simple
digital control signals.
Referred to as Digital I/O (Digital input/output), they can be measured in
there thousands for substantial industrial plants.
They are used to measure an amazing verity of events.
The most common digital signal encountered is a simple switch, A
switch is nothing more than an electrical switch used to indicate some
physical
Digital I/O signals come in many forms from 12 Volt DC to
position.
240 Volt AC, but the most common industrial signals are
24Volt DC and 120V AC.
There are Digital I/O modules to measure all of these
signals, an extra variation is the number of signals per
module ranging from 8, 16 and 32 etc.
Most digital modules have electrical protection usually in the
form of optocoupling to prevent damage to the PLC from
standard electrical faults.
Analogue Inputs/Outputs (I/O)
Analogue signals enter and leave the PLC in voltage and
current form, The resolution of most analogue signals is
between 11 and 16 bits.
While voltage is commonly used in practice it can be
sensitive to noise (induced voltages in electrical equipment
rooms can be substantial) This makes current control the
superior choice.
The
Amost common analogue
signal of 4.0mA equatessignals
to zero,appear in the form of a
4-20mA current signal, i.e.
A signal of 20mA equates to 2048 for an 11 bit input,
The reason for the 4.0mA starting point is a fail-safe feature,
if the instrument fails or the signal cable is damaged the
current falls to zero and the PLC can alarm the operating
system of the failure immediately.
This fail-safe feature is not possible for voltage signals which
pass through zero volts.
Other interface modules
Digital I/O and Analogue I/O signals comprise the vast
majority of PLC signals.
However, not all devices can be controlled by these simple
signals and it is often required that PLCs communicate to
foreign instruments using many different communications
protocols,
Again in most instances there is simply a module
predesigned to make this interface possible.
Some examples include RS232, RS485, DH485, DH+,
Modbus, Ethernet etc.
Memory
(Addressing , Internal Registers)
The memory in PLCs needs to be predefined by the
programmer, similar to defining variables in standard
programming.
The memory is divided into data files, each data file has a
unique number and a character prefix which refers to the
type of data.
For example, in the Allen Bradley PLC-5 system, we
have;
The ASCII character (or characters) denotes the data area
type. Other types of defined words include T-timers, C-
counters and S-status registers etc.
Note that the Output and Input numbers are dropped from
file 0 and 1 respectively, this is because these files are not
programmable.
Status file 2 (S2:##) is also fixed within Allen Bradley PLCs.
(Status bits include such information as arithmetic overflow
The internal
warnings, data areas of status
communication Integers and
and Floating time
processor pointand
addresses simply point to a linear memory region.
dates etc)
However the Input and Output address actually correspond
to a physical address. For example I:12/03 has the format, I:
{Rack address}{slot number}/{Input number}.
Physically this is the 3rd input on the 2nd slot in the 1st
Rack.
This input is show below in figure,
Physical I/O Addressing
Note: PLCs usually start counting from zero and use the
octal counting system. ie an eight slot rack will have slots
numbered from 0 to 7.
This is the case for racks, slots and input numbers.
So the first possible input would be Rack 0, slot 1 input 0
(Slot 0 in Rack 0 is not available for inputs since it is always
reserved for the Central Processing Unit, CPU)
Addressing Format
The addressing format has been demonstrated here
because in writing a PLC program the address is used by the
PLC in the ladder logic.
For example, if in the Start /Stop logic of figure (6) the Start
PB = I:13/04 and Stop PB = I:13/05 and the output Coil =
O:12/03 then the ladder logic would look more like figure
below
PLC Programming Architecture
A PLC program can be divided into many small subroutines.
In this respect PLCs replace function and procedures with
subroutines.
Each subroutine is executed from top to bottom in a
predetermined order.
Once all the subroutines have been scanned it simply begins
again with the first subroutine.
The nature of subroutines makes a modular programming
structure possible, It is always beneficial to group segments
For example a program may be divided in the following way:
of code which serve similar purposes.
Subroutine U:20 Pumps sequencing logic file.
Subroutine U:21 Pump No.1 alarming and drive file.
Subroutine U:22 Pump No.2 alarming and drive file.
Subroutine U;23 Pump No.3 alarming and drive file.
Here subroutine 20 controls the sequencing of 21,22 and 23
while the drive files are virtually identical for each pump by
starting and stopping the pump while reporting alarms and
the healthy status to file 20.
Fault finding problems in the code is greatly simplified when
all the code for a faulty device is listed in a single
The development of a plant wide PLC standard is an
subroutine.
essential step in automating a large control system.
The benefits are twofold, if the programming standard is
well understood many code developers can work on the
code producing a uniform control system.
The second advantage is that for anyone not involved in the
code production only needs to learn one standard to have a
good understanding of the program structure of all the
plants PLCs.
Allen-Bradley PLCs
R1
TIMER
R1 R2
PB1
LS1 LS2
PR=5
TIMER
5
Motor
R2
R1
Bar code reader
microswitch Stopper
Part Conveyor
Robot
Machine
14 11
01
Main street
VIT street
Cycle time
Main 3 1 4
VIT 5 1 2
input output
64 VIT Red
65 VIT Yellow
Programmable
Controller
66 VIT Green
67 Main Red
70 Main Yellow
71 Main Green
901
RUNG1 RTO
80
901 901
RUNG2 RST
901 902
RUNG3 67 M. Red
902
RUNG4 67
RTO
30
RUNG5 901 902
RST
901 903
RUNG6 66 V. Green
903
RUNG7 66
RTO
901 903 20
RUNG8 RST
902 904 M. Green
RUNG9 71
904
71
RUNG10 RTO
901 904 40
RUNG11 RST
904 905
RUNG12 70 M. Yellow
905
70
RUNG13 RTO
901 905 10
RUNG14 RST
903 906
RUNG15 65 V. Yellow
906
65
RUNG16 RTO
901 906 10
RUNG17 RST
902 907
RUNG18 64 V. Red
907
RUNG19 64
RTO
901 907 50
RUNG 20 RST