You are on page 1of 94

EAB4223/EEB 5223

Industrial Automation and Control System

• PART 2:
Automation and PLC.

Assoc Prof Dr Nordin Saad


Department of Electrical & Electronics Engineering
Universiti Teknologi PETRONAS
23.03.005
Email: nordiss@petronas.com.my
Tel: 05-368 7835
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 1
This topic covers the key and base areas of automation. The learning approach
used is the mixed-mode delivery comprises of lecture-tutorial-lab activities..

Synopsis
Synopsis Learning
Learning Outcomes
Outcomes
This
This course
coursecover
cover topics
topics related
related to
to measurements
measurements
(PLTF)
(PLTF) and automation in the processindustry.
and automation in the process industry.These
These that
thatstudents
studentsare
areexpected
expectedtotoachieved
achievedafter
after
include
includeaastudy
studyon
onindustrial
industrialsensors
sensorsandandactuators,
actuators, successfully completing the course
successfully completing the course
industrial
industrialcontrollers
controllerssuch
suchas ascomputer-based
computer-basedcontrol,
control,
PLC, DCS and FF.
PLC, DCS and FF.

Process
Process ,, Industrial
Industrial Instr.&
Instr.& Meas.
Instr.& Meas. Automation
Automation DCS
DCSand
and Foundation
Foundation Fieldbus
Fieldbus
The learning outcomes related to The learning outcomes related to The learning outcomes related to
Industrial instruments and Automation and the implementation of DCS and Foundation Fieldbus use
Measurements Programmable logic controller in process industries.
• Have knowledge and
understanding of the various
• Have knowledge and • Have knowledge and
process industry instruments,
understanding of the PLC understanding of a DCS and its
concept of measurements,
architecture and its importance in use in process industries, and
calibration and configuration
automation. the features and architecture of a
requirements and their applications.
Foundation Fieldbus system, and
• Be able to develop a PLC program
• Be able to design and develop a its improvement over the
to perform sequential, and batch
control loop consisting the process conventional DCS.
control.
instruments, based on a prescribed
requirement.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 2


Objectives
The focus of this topic:
•develop sequence diagram for a given problem
description involving electro-pneumatic actuators, sensors
and electrical actuators (motor and etc), and field devices.
•develop and implement a ladder diagram for a process in
a manufacturing plant, batch process, and robotic system.
Batch process
Electro-pneumatic Robotic System
C
Se

PL
ns

Manufacturing system
or
s

Programming!!!
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 3
CONTENTS

• Overview of Automation
• Programmable Logic Controller
• Development of Ladder diagram
and,
• Several examples

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 4


EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 5
What is ‘Automation’?
• Automation is the ability of a system
and/or devices to perform work
intelligently with minimum or without
human supervision or intervention. It is
a system designed to extend the
capacity of machines to perform tasks
formerly done by human, and to control
sequences of operation without human
intervention.
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 6
Continue…

What is ‘Automation’?
The term Automation also been used to describe
non-manufacturing system in which programmed or
automatic devices can operate independently or
nearly independently of human control. In the fields
of communications, aviation, or astronautics, for
example, such devices as automatic switching
equipment, automatic pilots, and automatic guidance
control systems are used to perform various
operations much faster or better that could be
accomplished by humans.
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 7
Why need ‘Automation’?
• To increase product standards with consistent
quality.
- increased production and lowered costs,
thereby making goods available to more people
with better quality.
• To gain higher throughput.
- more can be produced at lower costs, thus
allows wages to increase which leads to the
increase of workers’ motivation.
• To reduce labor dependencies.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 8


Who need ‘Automation’?
• Small and medium scale industries (SMIs) in the
manufacturing sectors.
SMI could benefit from low cost automation to
replace repetitive process usually carried out by
human.

• Multinational companies (MNC).


Current technology allows almost every aspect of
manufacturing process can be automated, hence
reducing dependencies on production workers
and at the same time increasing productivity and
quality.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 9


Where does ‘Automation’ apply to?

• Assembly line
• Test and finishing packaging (repetitive
process)
• Hazardous environment
• High speed and precision process, and
• Computerized-plant management.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 10


Benefits of automation:
• Cost reduction in terms of labor requirement
• Increase efficiency in terms of Quality and
Quantity
• Flexible to market demand (faster and flexible).
i.e., changes in product and changes in process
• Reliable – automation processes can sustain long
hours but still maintaining its desired performance
(consistent quality and durability).
• High repeatability
• Safe
• A solution for labor shortage
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 11
Examples of ‘Automation’?
• Industrial: z Domestic:
Camera inspection Automatic gate
Mark and Lead Test inspection Washing machine
Pick and place system
Conveyor system
Automatic packer sorter
z Commercial:
Automatic bonding machine Office Automation
Die-attached machine. Intelligent building
Lifts and escalators
z Public utilities:
Automatic Teller Machines (ATM)
Traffic light

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 12


EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 13
What is a PLC?

• A PLC is a computer, having


connections to external inputs and
outputs.
• The program of a PLC has the task to
set the outputs, i.e. depending on the
inputs, the outputs, and the program.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 14


CONTROL DEVICES
1. Mechanical control-cam, governor, etc.
2. Pneumatic control-compressed air, valves, etc.
3. Electromechanical control-switches, relays,
timers, counters, etc.
4. Electronics control-similar to electromechanical
control, except uses electronic switches
5. Computer control

• Programmable Logic Controller

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 15


FUNCTIONS OF CONTROLLERS
1. On-off control
2. Sequential control
3. Feedback control, and
4. Motion control

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 16


PROGRAMMABLE LOGIC
CONTROLLER
A substitute for hardwired relay panels.

“ A digitally operating electronic apparatus which uses a


programmable memory for the internal storage of
instructions by implementing specific functions such as
logic sequencing, timing, counting, and arithmetic to
control, through digital or analog input/output modules,
various types of machines or processes. The digital
computer which is used to perform the functions of a
programmable controller is considered to be within this
scope. Exclude are drum and other similar mechanical
sequencing controllers.”
National Electrical Manufacturing Association (NEMA) -
1968
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 17
The Design criteria for the first PLC,
specified in 1968- Hydraulic Division of
General Motors Corporation
-The Specification-
Purpose - To eliminate the A solid-state system with
high cost associated with computer flexibility
inflexible relay-controlled
systems. Capable of surviving
industrial environment
Able to be easily
programmed and
maintained by plant
personnel
To be re-usable.
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 18
The first PLC appeared in early 1970s.
Merely ‘relay replacement’ machines.
Other capabilities were later added, e.g.,
Counters, Timers, Arithmetic, Text handling,
Analogue signal handling, and PID control

TRADITIONAL AREA OF PLC APPLICATION IS


THAT OF SEQUENTIAL CONTROL

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 19


PLC improves production efficiency. The present state
of intense industrial competition requires that:

• The speed of the • Minimising


production downtime of
equipment and production
production line can equipment.
be set up.
• Low cost production
• Lowering material
and labor cost of a equipment.
product
• Improving quality
and lowering rejects.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 20


PLC meets most of the above needs…
• Traditionally, automation is only applicable
to single item high volume production
• Now, necessary to automate production of
multiple variety of products, in moderate
quantity, as well as achieving higher overall
productivity and requiring minimum
investment in plant and equipment.
• FMS answers these needs. The system
includes, NC machines, industrial robots,
automatic transports and computerized
control of production. PLC in the use of most
automated production equipment.
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 21
Electromechanical Control

Advantages Disadvantages

Standardised High operating costs


components Modifications are
Insensitive to difficult
interference Unclear system layout
Inexpensive for small Wear (maintenance
system therefore required)
Short-term overload High space
capability requirements
Expensive components
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 22
Electronic Control
Advantages Disadvantages

High reliability after Frequent failures in the


earlier development initial phase.
problems. Unclear layout
Extremely high operating Modifications are difficult.
speed. Highly paid specialists are
Low space requirements. required.
Low power consumptions.
No moving parts.
Low costs.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 23


Programmable Controls (PLCs)
Advantages Disadvantages
High reliability after earlier No uniform programming language.
development problems. Slower than parallel logic system since
Simple trouble-shooting, due to plug-in processing is carried out cyclically.
design.
Simple installation.
No standardisation required (means
more flexibility).
Low space requirements.
Low power consumption.
No moving parts.
Rapid modification of program.
Production and programming can be
carried out in parallel.
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 24
Comparison Wired logic and PLC
Wired Logic PLC
Control device Specific purpose General purpose
(Hardware)

Control Scale Small and medium Medium and large

Change or addition of Difficult Easy


specification

Delivery period Several days Almost immediate

Maintenance (by makers and Difficult Easy


users)

Reliability Depend on design and Very high


manufacturer
Economic efficiency Advantage on small scale Advantage on small,
operation medium and large scale
scale operation
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 25
A typical control system
INPUT DEVICES CONTROLLER OUTPUTS

Selector switch
Alarm
Pushbuttons
Control relays
Photoelectric switches Relays
Fans
Limit switches Timers
Lights
Circuit breakers Counters
Horns
Proximity switches Logic Units
Valves
Level switches Mechanical Cams
Motor starters
Motor starter contacts etc.
Solenoids
Relay contacts
etc.
etc.

RRE
EPPL
LAAC
CEED
DBBY
Y

Programmable
Programmable
Logic
Logic Controller
Controller

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 26


Applications
Control Type Functions
Sequence control Auto/Semi-auto manual
control of machine/process

Sophisticated Control Analog control (T,P,F,L, etc)


Servo motor control
Stepper motor control
Supervisory control Process monitoring and alarm
Fault diagnosis and
monitoring F.A., F.M.S.,
C.I.M. etc.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 27


TRADITIONAL VS PROGRAMMABLE CONTROL
SYSTEMS
Conventional Controlled Programmable Controlled
controller plant Logic Controller plant
S1 S1
+
+

Memory holds a control program


Input 1
S2 S2
+
Input 2
K1
K1

Output 1

- -

Its behaviour depends on the wiring Its behaviour depends on the


arrangements instruction stored in memory

PLC replaces most of the relay panel wiring by


software programming

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 28


Electrical connections to a PLC
Note: Each PLC has three sets of terminals through
which it connects to the plant/industrial processes.

Input devices
Power P> θ
terminals Input
240 VAC
terminals
INPUT 1 INPUT 2 INPUT 3
PE

N N PLC
L
L

COMMON OUTPUT 1 OUTPUT 2 OUTPUT 3 Output


terminals
Output devices

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 29


INPUT DEVICES

θ Ρ>

a. pushbutton b. Selector c. Thermostat d. Pressure


switch switch

e. Level switch f. Relay g.


contact Proximity h. Photoelectric
sensor sensor.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 30


OUTPUT DEVICES

a. Contactor b. Relay coil c. Valve coil


coil

d. Signal lamp e. Hooter

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 31


TYPES OF SWITCHES

Selector switch
RATING:
24 Volts AC/DC
Pushbutton switches
48 Volts AC/DC
Photoelectric switches
120 Volts AC/DC
Limit switches
230 Volts AC/DC
Proximity switches
TTL level
Level switches
(Transistor-to-
Thumbwheel switches transistor +/- 5V)
Slide switches Isolated Input

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 32


How PLC works?
Conventional relay/contactor control systems perform all
controlling processes at the same time.
In a PLC the program sequence is executed step by step and is
repeated cyclically.

Input
Inputlevel
level Processing
Processing Output
Outputlevel
level

(Reactions) (Details)
Reads in The given The outputs are
inputs and commands set according to
transfers the (program) will results of the
value to a be executed step processor
memory area by step

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 33


Common Structure of a PLC
Input devices send signals
into the controller

Input circuits
The The power supply

Power supply
processor serves the
takes its Memory Micropro controller with a
instructions cessor variety of stable
from the (CPU)
direct voltages
memory

Output circuits

Output devices receive signals from the controller

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 34


PLC COMPONENTS
1. Processor Microprocessor based, may allow arithmetic operations,
logic operators, block memory moves,computer interface,
local area network, functions, etc.
2. Memory Measured in words (2 bytes)
ROM
RAM
PROM
EEPROM
EPROM
EAPROM
and Bubble Memory.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 35


THE DIFFERENT AREAS IN MEMORY , AND
THE FUNCTIONS

1. SYSTEM MEMORY
• Executive- A permanently stored collection of
supervisory programs to direct system activities
e.g., program execution, communication with
other devices, and fault diagnosis.
• Scratch pad- A temporary store used by the
CPU to store small amount of data generated
during program execution.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 36


THE DIFFERENT AREAS IN MEMORY , AND
THE FUNCTIONS
2. APPLICATION MEMORY
• Data table area- This holds the User Program, a
Data Table for counter and timer preset values
and the Input/Output Table.
Also known as ‘Markers’ , ‘Flags’, ‘Internal
INPUT TABLE outputs’, ‘Internal coils’, Internal control
relays’.
OUTPUT TABLE They do not operate any external devices,
INTERNAL STORAGE BITS instead used for latching and interlocking
purposes in the control program.
STORAGE REGISTERS
CONTROL PROGRAM A group of bits holding information in binary, BCD,
or ASCII format. Values e.g., timer presets and
INSTRUCTIONS
accumulated values, counter presets and
accumulated values, compare set points, maths
operation results and ASCII characters.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 37


PLC COMPONENTS … continue
3. I/O Modular plug-in peripheral
AC voltage input and output
DC voltage input and output
numerical input and output
special-purpose modules, for eg. High speed
timers, and stepping motor controllers.

4. Power supply AC Power


5. Peripheral Hand-held programmer (HHP)
Operator console
Printer
Graphic processor
Simulator
Network communication interface

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 38


ANALOG I/Os
Analog inputs:
Flow sensors, humidity sensors,
potentiometers, pressure sensors,
temperature sensors.

Analog outputs:
Analog meters, analog valves and
actuators, DC and AC motor drives.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 39


SOME SPECIAL I/Os
Thermocouple input : Low level analog signal,
filtered, amplified, and digitized before
sending to the processor through I/O bus.

Fast input: 50 to 100 microsecond


pulse signal detection.

ASCII I/O: Communicates with ASCII devices.

Stepper motor output: Provide directly control of


stepper motor.

Servo interface:Control DC servo motor for point-to-


point control
and axis positioning.

PID control : The Proportional Integral Derivative is used


for closed loop process control.

Network module.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 40


The Technical features
Input a. Number of external inputs
b. Types of external inputs
Output a. Number of external outputs
b. Types of external outputs
Auxiliary relays a. Number of output relays/holding relays etc.
Counters a. Number of counters
Timers a. Number of timers
Memory a. RAM
b. EPROM
c. EEPROM
Peripherals a. Handheld programming console
b. L.S.S.- Ladder Support Software
c. G.P.C. Graphic Programming Console
d. F.I.T. Factory Intelligent Terminal
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 41
PLC WIRING DIAGRAM
DC Power supply

PLC + -
A 01 01 02 HR20 +V

02 11 MTR
B HR20
03 12
External HR20 11

switches
-V

Stored program

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 42


Isolation
Inputs and outputs are electrically separated (no
electrical connection), using
- opto-electronic coupler

Or

-or electromechanical relay

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 43


INPUT CONNECTIONS
DC Power Supply DC Power Supply

L1 L2 + - + -
AC input
+V
devices
1 1
1
2 2 2
3
3 3
-V
DC
COMMON input GND
devices
(a)
(b) (c)
AC 120 or 230VAC, e.g.,
AC input modules convert DC TTL
signals to logic ‘1’ or ‘0’ Low level DC
High DC (compatible with TTL)
state

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 44


OUTPUT CONNECTIONS
DC Power Supply DC Power Supply

L1 L2 + - + -

+V
+V
L1
1
1 1
2 2 2
3
3 3
-V
-V
GND
(a) (b) (c) TTL
AC output module interface DC output module interface TTL output module
logic signal from processor with logic signal from processor interface logic signal
a AC output field device : with a DC output field device : from processor with a
voltage > +5 V. TTL compatible
voltage 120 or 230 VAC.
voltages

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 45


CONNECTING FIELD DEVICES TO
DC Input/Output modules.

Two common types of field circuits operate in the


ON/OFF switching condition.

a. Contact circuits- e.g., relays operate in the


ON/OFF condition as their
mechanical contacts open or close.

b. Solid state circuits- common use of


transistor (ON- saturation) (OFF-cutoff)

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 46


Sinking input module
Turning ‘ON” PNP produces a positive DC at DC input module
output lead of field device

+
DC power +V Sinking
supply Output input
terminal
- Switching
element
PNP
DC common
‘1’ state: +DC voltage

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 47


Sourcing input module
Turning ‘ON” NPN produces a very low DC at
output lead of field device. DC input module
‘1’ state:
+VDC
near ground potential

Conventional Sourcing
+ current
DC power
Output input
supply DC common terminal

- Switching
element NPN

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 48


Types of outputs

a. Open collector NPN – current sinking


b. Open collector PNP – current sourcing
Current sinking: the load (field device) is connected
bet. the output and the positive lead of the P/S.
To +V DC

+VDC
Conventional
current
Output Field DC Power
device Supply

DC
Common
To DC
Switching element Sinking output common
terminal
NPN transistor
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 49
Current sourcing: the load (field device) is connected bet.
the output and the negative common lead of the P/S.

Sourcing output terminal

To +V DC
+ V DC
Conventional
current
Output Field
device
DC To DC
Common common

Switching element
PNP transistor

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 50


Scan Time
Scan time: The process of reading the inputs, executing
the program and updating the outputs.
Scan time is normally a continuous and sequential
process of reading the status of inputs, evaluating the
control logic and updating the outputs.
Scan time indicates how fast the controller can react to
field inputs and correctly solve the control logic.

I/O Update Program scan

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 51


What is a SCAN Cycle?
9A PLC resolves the logic of a ladder diagram (program) rung by rung,
from the top to the bottom.
9Usually, all the outputs are updated based on the status of the internal
registers.
9Then the input states are checked and the corresponding input registers
are updated.
9Only after the I/Os have been resolved, is the program then executed.
This process is run in an endless cycle.
9The time it takes to finish one cycle is called the scan time. In some
controllers the idle state is eliminated. In this case, the scan time varies
depends on the program length.
Output
Begin

SCAN Input
Idle cycle
Resolve
EEB5223/EAB4223 Industrial Automation & Control Systems
logic Topic 2- 52
Factors influencing scan time
Scan time (time required to make a single scan) vary
between 1 ms to 30 ms.
The use of remote I/O subsystems increases scan
time: having to transmit the I/O update to remote
subsystem.
Monitoring of the control program adds overhead
time to the scan: the micro has to send the status of
the coils and contacts to the display (CRT) or other
monitoring devices.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 53


Types of PLC Programming Language
The IEC 1161-3 Standard
a. Structured text programming (ST)- A high level language that has some
similarities to Pascal. Statements can be used to assign values to
variables
b. Logic diagram – A graphical language, and most widely used. Use
Boolean mnemonics to represent the process, before converting into
logic diagram.
c. Functional Block Diagram Programming (FBD) – A graphical language.
Used in applications involving the flow of signals between control
blocks.
d. Instruction List (IL)- A low level programming language, much like
assembly language programming.
e. Sequential Function Chart (SFC)- A graphical programming method.
Very useful for describing sequential type processes.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 54


LADDER DIAGRAM

A ladder diagram is a means of graphically representing the


logic required in a relay logic system, representing +V and
0V
Consists of a number of rungs connecting two vertical lines.
PB1 PB2 R1 0V
+V
Rail Rail
R1

Rung
R1 A

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 55


Programming a PLC

The General Rule

SET RESET OUTPUT

LATCH

We’ll use the general rule to create the ladder


diagram. More examples in lecture and tutorial…

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 56


PLC Ladder Diagram INSTRUCTIONS

1. Relay
2. Timer and Counter
3. Program Control
4. Arithmetic
5. Data Manipulation
6. Data Transfer, and
7. Others, such as sequencers.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 57


RELAYS

A switch whose operation is activated by an electromagnet.


contact

A Relay consists of
coil two parts, the coil and
input the contact.
Relay coil
R1

Output contact R1

Contacts: Coil:
a. Normally open a. Coil
b. Normally closed b. Negative coil
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 58
LOGIC STATES

ON: TRUE, contact closure, energize, etc.


OFF: FALSE, contact open, de-energize, etc.

Do not confuse the internal relay and


program with the external switch and relay.
Internal symbols are used for programming,
External devices provide actual interface.

(In the notes we use the symbol “~’ to


represent negation. AND and OR are logic
operators).

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 59


AN EXAMPLE OF RELAY LOGIC
For a process control, it is desired to have the process
start (by turning on a motor) five seconds after a part
touched a limit switch. The process is terminated
automatically when the finished part touches a
second limit switch. An emergency switch will stop
the process any time when it is pushed.

PB1 (EMERGENCY STOP)


LS1 LS2

TIMER
5
R2
R1 (MOTOR)
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 60
Rung 1: R1=(LS1+R1).(~PB1.~LS2)
Rung 2: R1 (delayed 5 seconds)

LS1 PB1
R1
LS2

R1

TIMER R2
R1

PR=5
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 61
EXAMPLE: CONTROLLING A CONVEYOR BELT

PARTS
BIN

FREE STANDING CONVEYOR

INFRA RED REJECT


THROUGH SOLENOID CONVEYOR
BEAM
MOTOR

INFRA RED
st REFLECTIVE

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 62


Programming a PLC

The General Rule

SET RESET OUTPUT

LATCH

A very very important rule!!!


As we’ll see….

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 63


Program 1:
When START switch (st) is energized, conveyor will
move. If switch (st) is de-energized, the belt will still
moving until sensor (infra red through beam) is
blocked.
TIMING mct HRMC mc- LADDER st HRMC
DIAGRAM DIAGRAM s0
mc
HRMC
st
HRMC mct
s0

HRMC SET=st
HRMC=(st+HRMC).s0
RESET=s0
mct HRMC
mc-
HRMC
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 64
Program 2:
When START switch (st) is energized, the conveyor
will move. It will stop 1.5 sec after the infra red through
sensor is blocked by part on the belt.

mct HRMC 1.5s mc-

mc

st

s0

TIM01

tim01

HRT1 Set=s0
Reset=tim01
HRT1=(s0+HRT1).tim01
HRMC Set=st HRMC=(st+HRMC).tim01
Reset=tim01
mct mct=HRMC
mc- EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 65
FLOW CHART
A pictorial representation of the sequence of operations to
be carried out.
Different shaped boxes are used to represent different
actions.
PROCESS ACTIVATE
BOX RELAY R1

DECISION
LS1 active
BOX
?

TERMINATION
BOX START

CONNECTOR
A

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 66


Flow Chart …example.

START Translate into


ladder diagram L1 P1 R1

no
L1 active
? yes L2 L3
no L2 active
?

P1 active
no
? yes L3 active
?

ACTUATE
RELAY R1

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 67


LOGIC DIAGRAM

The International Standards Organisation (ISO) symbols:

NOT NOR
1 >1
T=A’ T=(A+B)’

AND NAND
& & T=(A.B)’
T=A.B

OR Inhibition
>1 & T=A.B’
T=A+B
R-S Flip-flop
EX-OR
=1 S Y
T=A.B’+B.A’ R Y’
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 68
Example: The use of a logic diagram
A process:
“If limit switch L1 AND key P1 are activated, OR,
NOT limit switch L2 AND limit switch L3 are
activated, then relay R1 is activated.”
Expressed by a single Boolean equation: L1.P1 + L2.L3 = R1

The logic implementation of this function into a form


required for input into PLC.

L1
P1 & R1
1
L2
1 &
L3

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 69


SEQUENCE CHARTS

Also known as:


Time motion diagrams, state diagrams, or bar chart.
Used for:
•Visualising the operation of switching systems.

•Describing the step-by-step operation of relay


systems, pneumatic systems, or any other type of
switching systems.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 70


Example: PLC control of actuators (solenoid
valves)
ACTUATOR - A ACTUATOR - B

S2 S3 S4 S5

Y1 Y2

START

S1

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 71


Example: (a) energising Y1, (b) de-energising Y1
ACTUATOR - A

S2 S3 S2 S3

Y1 Y1

(a) Cylinder extended (b) Cylinder retracted


EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 72
Wiring diagram (Electro-pneumatic system)

S1
00000 10000
+ S2 Y1
00001 10001
- S3 00002 10002
S4
00003 10003
S5 Y2
00004 10004
00005 10005
. .
. + .
. .
-
COM COM
+ -
+12VDC

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 73


TIMER
A Timer consists of an internal clock, a count value register, and an
accumulator. It is used for timing purposes.

Input
Clock
Reset
Accumulator
reset
Register Output

Contact
output
Count
0 1 2 3 4 5

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 74


PLC TIMER
ON –delay Timer:
Example: If a timer in the circuit has a preset of 10 seconds, after a
10-second delay, the timer ON-delay energise contact closes and
power is supplied to an output device via the contact.

Timing coil input

On-delay energise

Time delay

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 75


PLC TIMER
OFF –delay Timer:
Example: If a timer in the circuit has a preset of 10 seconds, after a
10-second delay, the timer OFF-delay de-energise contact opens
and power is removed from the controlled device.

Timing coil input

On-delay de-energise

Time delay

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 76


COUNTER
Digital counters output in the form of a relay contact when a pre-
assigned count value is reached.

Input
input Register 5
Reset
Accumulator
reset
Output
Contact

output
Count
0 1234 5 0 1

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 77


PLC COUNTER
CNT (Counter) is a preset decremental counter.
It decrements one count every time an input signal goes from OFF
to ON. The counter must be programmed with a count input, a
reset input, a counter number and a set value (SV).
The set value can range from 0 to 9999.

Count Counter
input CNT 01 number

003 SV

Reset
input

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 78


Example: A Traffic light control

A B

C D

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 79


Traffic Light Control
The sequence diagram for routes A,B,C and D.
120s
24s 4s 2s 24s 4s 2s 24s 4s 2s 24s 4s 2s
ROUTE A
Red
Amber
Green

ROUTE B
Red
Amber
Green

ROUTE C
Red
Amber
Green

ROUTE D
Red
Amber
Green
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 80
Solution: Consider routes A and B ONLY.
24s 4s 2s 24s 4s 2s
TIM0
tim0

TIM1
tim1

TIM2
tim2

TIM3
tim3
TIM4
tim4
TIM5
tim5

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 81


Solution example: Consider routes A and B ONLY.
24s 4s 2s 24s 4s 2s

ROUTE A
Red [(tim5+tim0+tim1).tim2]+[tim4.tim5]
Amber tim3+tim4
Green
tim2+tim3

ROUTE B
Red (tim1+tim2+tim3+tim4).tim5
Amber
Green tim0+tim1
tim5+tim0

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 82


Solution example: Routes A and B ONLY
TIM5 TIM3 TIM4 AMBER-A
TIM0
24S
TIM0 TIM2 TIM3 GREEN-A
TIM1
4S
TIM1
TIM2 TIM1 TIM5
2S RED-B
TIM2
TIM3
24S
TIM2
TIM3
TIM4
4S TIM3
TIM4
TIM5
2S
TIM5 TIM2 TIM4
RED-A

TIM0
TIM0 TIM1 AMBER-B

TIM1
TIM5 TIM0 GREEN-B

TIM4 TIM5

END

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 83


EXAMPLE: CAR PARK CONTROL
This is a simple car park control system that allow only a
maximum of 100 parking spaces. Every time a car comes in,
the LC will automatically add one through sensor S1. Any car
that goes out will automatically be subtracted by one through
sensor S2. When 100 cars are registered, the car park full sign
will be lighted to inform oncoming vehicles not to enter.

Car coming in
CAR PARK
FULL

S1 (00000) (00200)

S2 (00001)

Car going out


EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 84
Examples of DIFU and DIFD

DIFU and DIFD turns an output ON for one scan time.


DIFU turns its output ON when it detects an OFF-ON
transition in its input signal. DIFD turns its output ON
when it detects an ON-OFF transitions in its input
signal.
Timing diagram:
INPUT

DIFU

DIFD

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 85


Examples of CMP

Compare (CMP) is used to compare the data in a specific


channel, with the data in another channel, or a four-digit,
hexadecimal constant. Therefore, two data must be
specified immediately after the CMP instruction. One of
the data must be a channel.

Ladder symbols:

CMP
source
destination
EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 86
Examples of ADD
ADD (Addition)
ADD totals the data in two different channels, or one
channel and a constant and then outputs the sum to a third
channel.
Three data must be specified: an augend, an addend and a
result channel.
Ladder symbols:
ADD
Augend
Addend
Results

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 87


Examples of SUB
SUB (Substract)
SUB finds the difference between the data in one channel
and the data in another channel or a constant, and then
result to a third channel.
Three data must be specified: an minuend, an
substracthend and a result channel.

Ladder symbols:

SUB
Minuend
Substracthend
Results

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 88


00000
Example: Parking control DIFU
1. Sense car coming in 01000
01000
2. Add 1 for every car ADD
HR00
3. Sense car going out #0001
00001
4. Subtract 1 for every car
DIFU
5. Compare with 100 01001
01001
6. Indicator ON for CAR PARK FULL
SUB
HR00
AR01 #0001
Note: Auxiliary relay -: contains flags
and bits for special functions. CMP
HR00
AR01 always turns ‘ON’). #0100
AR01 AR02
If constant equal 100, AR02 turns ON.
00200
AR03 turns ON if constant greater AR03
than 100.

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 89


EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 90
Sequence Function Chart (GRAFCET)
SFC is an approved means of organising the program in a PLC. A
program based on SFC has an inherently stable structure, has
shorter scan time, and is easy to troubleshoot.

Double box: Initial step


0

Between two steps is a


transition
(enables the next step to become active,
and the preceeding step inactive).

Single box: Step

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 91


Sequence Function Chart (GRAFCET)
Example:
When FORWARD PB switch is pressed and released, the
conveyor will move. It will stop 1.5 sec after the infra red through
sensor, S1, is blocked by the part on the belt.

0 Motor stopped

Forward pushbutton?

1 Motor runs forward

Sensor S1 is blocked?

2 Motor runs forward

Motor runs for 1.5 s?

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 92


Sequence Function Chart (GRAFCET)
To cater for more complex control requirements, two branching
techniques are envisaged: selective and parallel
•Selective branching: allows a choice of sequences.

Example: There are 3 choices available.


•Steps 34, 35, 36, 37 and back to 34
34
•Steps 34, 38, 39, 37 and back to 34
a e h
•Steps 34, 39, 37 and back to 34
35 38
Note: Conditions ‘a’, ‘e’ and ‘h’ must be
b f exclusive.
36 39 •If 34 is active and ‘a’ is true, 35 is activated.
c g
•If 34 is active and ‘e’ is true, 38 is activated
37 •If 34 is active and ‘h’ is true, 39 is activated.
d

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 93


Sequence Function Chart (GRAFCET)
•Parallel branching : allows for two or more sequences to
proceed simultaneously.
Example:
The main sequence diverges into three sub-
53 sequences after step 53.
p •Steps 54, 55

54 57 59 •Steps 57, 58

q t
•Step 59

55 58
If 53 is active and ‘p’ is true, 54, 57, and 59 are
activated together.
r When 55, 58, and 59 are active and ‘r’ is true, 56
56
is activated.

Note: Two or more steps can be active at the same time.


End
End of
of Lecture
Lecture notes
notes on
on PLC
PLC

EEB5223/EAB4223 Industrial Automation & Control Systems Topic 2- 94

You might also like