chapter9 plc july 08 v1
TRANSCRIPT
-
8/8/2019 Chapter9 PLC July 08 v1
1/94
-
8/8/2019 Chapter9 PLC July 08 v1
2/94
Topic 2Topic 2-- 22EEB5223/EAB4223 Industrial Automation & Control Systems
This course cover topics related to measurements(PLTF) and automation in the process industry. Theseinclude a study on industrial sensors and actuators,
industrial controllers such as computer-based control,PLC, DCS and FF.
This course cover topics related to measurements(PLTF) and automation in the process industry. Theseinclude a study on industrial sensors and actuators,
industrial controllers such as computer-based control,PLC, DCS and FF.
Synopsis
SynopsisSynopsis Learning Outcomes
Learning OutcomesLearning Outcomes
that students are expected to achieved aftersuccessfully completing the course
that students are expected to achieved aftersuccessfully completing the course
The learning outcomes related toIndustrial instruments andMeasurements
Have knowledge andunderstanding of the variousprocess industry instruments,
concept of measurements,calibration and configurationrequirements and their applications.
Be able to design and develop acontrol loop consisting the processinstruments, based on a prescribed
requirement.
The learning outcomes related toAutomation and the implementation ofProgrammable logic controller
Have knowledge and
understanding of the PLCarchitecture and its importance inautomation.
Be able to develop a PLC programto perform sequential, and batchcontrol.
The learning outcomes related toDCS and Foundation Fieldbus usein process industries.
Have knowledge and
understanding of a DCS and itsuse in process industries, andthe features and architecture of aFoundation Fieldbus system, andits improvement over theconventional DCS.
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..
Process , Industrial Instr.& Meas.
Process , IndustrialProcess , Industrial InstrInstr.& Meas..& Meas. Automation
AutomationAutomation DCS and Foundation Fieldbus
DCS and FoundationDCS and Foundation FieldbusFieldbus
-
8/8/2019 Chapter9 PLC July 08 v1
3/94
Topic 2Topic 2-- 33EEB5223/EAB4223 Industrial Automation & Control Systems
The focus of this topic:
develop sequence diagram for a given problemdescription involving electro-pneumatic actuators, sensorsand electrical actuators (motor and etc), and field devices.
develop and implement a ladder diagram for a process ina manufacturing plant, batch process, and robotic system.
Batch process
Electro-pneumatic Robotic System
Manufacturing system
Sen
sors
PLC
Programming!!!
Objectives
-
8/8/2019 Chapter9 PLC July 08 v1
4/94Topic 2Topic 2-- 44EEB5223/EAB4223 Industrial Automation & Control Systems
CONTENTSCONTENTS
Overview of AutomationProgrammable Logic Controller
Development of Ladder diagram
and,
Several examples
-
8/8/2019 Chapter9 PLC July 08 v1
5/94Topic 2Topic 2-- 55EEB5223/EAB4223 Industrial Automation & Control Systems
-
8/8/2019 Chapter9 PLC July 08 v1
6/94Topic 2Topic 2-- 66EEB5223/EAB4223 Industrial Automation & Control Systems
What isWhat is AutomationAutomation??
Automation is the ability of a systemand/or devices to perform workintelligently with minimum or without
human supervision or intervention. It isa system designed to extend thecapacity of machines to perform tasksformerly done by human, and to controlsequences of operation without human
intervention.
-
8/8/2019 Chapter9 PLC July 08 v1
7/94Topic 2Topic 2-- 77EEB5223/EAB4223 Industrial Automation & Control Systems
What isWhat is AutomationAutomation??
Continue
The term Automation also been used to describenon-manufacturing system in which programmed orautomatic devices can operate independently or
nearly independently of human control. In the fieldsof communications, aviation, or astronautics, forexample, such devices as automatic switching
equipment, automatic pilots, and automatic guidancecontrol systems are used to perform variousoperations much faster or better that could be
accomplished by humans.
-
8/8/2019 Chapter9 PLC July 08 v1
8/94Topic 2Topic 2-- 88EEB5223/EAB4223 Industrial Automation & Control Systems
Why needWhy need AutomationAutomation??
To increase product standards with consistentquality.
- increased production and lowered costs,
thereby making goods available to more peoplewith better quality.
To gain higher throughput.
- more can be produced at lower costs, thusallows wages to increase which leads to theincrease of workers motivation.
To reduce labor dependencies.
-
8/8/2019 Chapter9 PLC July 08 v1
9/94Topic 2Topic 2-- 99EEB5223/EAB4223 Industrial Automation & Control Systems
Who needWho need AutomationAutomation?? Small and medium scale industries (SMIs) in the
manufacturing sectors.SMI could benefit from low cost automation toreplace repetitive process usually carried out by
human.
Multinational companies (MNC).
Current technology allows almost every aspect ofmanufacturing process can be automated, hencereducing dependencies on production workersand at the same time increasing productivity and
quality.
-
8/8/2019 Chapter9 PLC July 08 v1
10/94Topic 2Topic 2-- 1010EEB5223/EAB4223 Industrial Automation & Control Systems
Where doesWhere does AutomationAutomation apply to?apply to?
Assembly line Test and finishing packaging (repetitive
process)
Hazardous environment
High speed and precision process, and
Computerized-plant management.
-
8/8/2019 Chapter9 PLC July 08 v1
11/94Topic 2Topic 2-- 1111EEB5223/EAB4223 Industrial Automation & Control Systems
Benefits of automation: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 longhours but still maintaining its desired performance(consistent quality and durability).
High repeatability
Safe
A solution for labor shortage
-
8/8/2019 Chapter9 PLC July 08 v1
12/94Topic 2Topic 2-- 1212EEB5223/EAB4223 Industrial Automation & Control Systems
Examples ofExamples of AutomationAutomation??
Industrial:Camera inspection
Mark and Lead Test inspection
Pick and place system
Conveyor system
Automatic packer sorter
Automatic bonding machine
Die-attached machine.
Domestic:Automatic gate
Washing machine
Public utilities:
Traffic light
Commercial:
Office Automation
Intelligent building
Lifts and escalators
Automatic Teller Machines (ATM)
-
8/8/2019 Chapter9 PLC July 08 v1
13/94
Topic 2Topic 2-- 1313EEB5223/EAB4223 Industrial Automation & Control Systems
-
8/8/2019 Chapter9 PLC July 08 v1
14/94
Topic 2Topic 2-- 1414EEB5223/EAB4223 Industrial Automation & Control Systems
A PLC is a computer, havingconnections to external inputs andoutputs.
The program of a PLC has the task toset the outputs, i.e. depending on the
inputs, the outputs, and the program.
What is a PLC?
-
8/8/2019 Chapter9 PLC July 08 v1
15/94
-
8/8/2019 Chapter9 PLC July 08 v1
16/94
-
8/8/2019 Chapter9 PLC July 08 v1
17/94
Topic 2Topic 2-- 1717EEB5223/EAB4223 Industrial Automation & Control Systems
PROGRAMMABLE LOGICCONTROLLER
A substitute for hardwired relay panels.
A digitally operating electronic apparatus which uses aprogrammable memory for the internal storage of
instructions by implementing specific functions such aslogic sequencing, timing, counting, and arithmetic tocontrol, through digital or analog input/output modules,
various types of machines or processes. The digitalcomputer which is used to perform the functions of a
programmable controller is considered to be within thisscope. Exclude are drum and other similar mechanical
sequencing controllers.
National Electrical Manufacturing Association (NEMA) -1968
-
8/8/2019 Chapter9 PLC July 08 v1
18/94
Topic 2Topic 2-- 1818EEB5223/EAB4223 Industrial Automation & Control Systems
The Design criteria for the first PLC,specified in 1968- Hydraulic Division of
General Motors Corporation
Purpose - To eliminate thehigh cost associated withinflexible relay-controlled
systems.
-The Specification-
A solid-state system withcomputer flexibility
Capable of survivingindustrial environment
Able to be easily
programmed andmaintained by plant
personnel
To be re-usable.
-
8/8/2019 Chapter9 PLC July 08 v1
19/94
Topic 2Topic 2-- 1919EEB5223/EAB4223 Industrial Automation & Control Systems
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 ISTHAT OF SEQUENTIAL CONTROL
-
8/8/2019 Chapter9 PLC July 08 v1
20/94
Topic 2Topic 2-- 2020EEB5223/EAB4223 Industrial Automation & Control Systems
PLC improves production efficiency. The present stateof intense industrial competition requires that:
The speedof theproductionequipment andproduction line canbe set up.
Lowering materialand labor costof aproduct
Improving qualityand lowering rejects.
Minimisingdowntime ofproduction
equipment. Low cost production
equipment.
-
8/8/2019 Chapter9 PLC July 08 v1
21/94
Topic 2Topic 2-- 2121EEB5223/EAB4223 Industrial Automation & Control Systems
PLC meets most of the above needs
Traditionally, automation is only applicableto single item high volume production
Now, necessary to automate production ofmultiple variety of products, in moderatequantity, as well as achieving higher overallproductivity and requiring minimuminvestment in plant and equipment.
FMS answers these needs. The systemincludes, NC machines, industrial robots,automatic transports and computerizedcontrol of production. PLC in the use of mostautomated production equipment.
-
8/8/2019 Chapter9 PLC July 08 v1
22/94
Topic 2Topic 2-- 2222EEB5223/EAB4223 Industrial Automation & Control Systems
Electromechanical Control
Advantages Disadvantages
Standardisedcomponents
Insensitive tointerference
Inexpensive for small
systemShort-term overloadcapability
High operating costs
Modifications are
difficultUnclear system layout
Wear (maintenance
therefore required)High spacerequirements
Expensive components
-
8/8/2019 Chapter9 PLC July 08 v1
23/94
Topic 2Topic 2-- 2323EEB5223/EAB4223 Industrial Automation & Control Systems
Electronic ControlAdvantages Disadvantages
High reliability afterearlier developmentproblems.
Extremely high operatingspeed.
Low space requirements.
Low power consumptions.
No moving parts.
Low costs.
Frequent failures in theinitial phase.
Unclear layout
Modifications are difficult.
Highly paid specialists arerequired.
-
8/8/2019 Chapter9 PLC July 08 v1
24/94
Topic 2Topic 2-- 2424EEB5223/EAB4223 Industrial Automation & Control Systems
Programmable Controls (PLCs)Advantages Disadvantages
High reliability after earlier
development problems.
Simple trouble-shooting, due to plug-in
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 becarried out in parallel.
No uniform programming language.
Slower than parallel logic system since
processing is carried out cyclically.
C i Wi d l i d PLC
-
8/8/2019 Chapter9 PLC July 08 v1
25/94
Topic 2Topic 2-- 2525EEB5223/EAB4223 Industrial Automation & Control Systems
Comparison Wired logic and PLC
Wired Logic PLC
Control device
(Hardware)
Control Scale
Change or addition ofspecification
Delivery period
Maintenance (by makers andusers)
Reliability
Economic efficiency
Specific purpose
Small and medium
Difficult
Several days
Difficult
Depend on design andmanufacturer
Advantage on small scale
operation
General purpose
Medium and large
Easy
Almost immediate
Easy
Very high
Advantage on small,
medium and large scalescale operation
-
8/8/2019 Chapter9 PLC July 08 v1
26/94
Topic 2Topic 2-- 2626EEB5223/EAB4223 Industrial Automation & Control Systems
A typical control system
Selector switchPushbuttons
Photoelectric switchesLimit switches
Circuit breakers
Proximity switchesLevel switches
Motor starter contactsRelay contacts
etc.
RelaysTimers
Counters
Logic UnitsMechanical Cams
etc.
AlarmControl relays
FansLights
HornsValvesMotor starters
Solenoidsetc.
CONTROLLERINPUT DEVICES OUTPUTS
REPLACEDBY
REPLACEDBY
ProgrammableLogic Controller
ProgrammableLogic Controller
-
8/8/2019 Chapter9 PLC July 08 v1
27/94
Topic 2Topic 2-- 2727EEB5223/EAB4223 Industrial Automation & Control Systems
ApplicationsControl Type Functions
Sequence control Auto/Semi-auto manualcontrol of machine/process
Sophisticated Control Analog control (T,P,F,L, etc)
Servo motor controlStepper motor control
Supervisory control Process monitoring and alarmFault diagnosis andmonitoring F.A., F.M.S.,C.I.M. etc.
TRADITIONAL VS PROGRAMMABLE CONTROL
-
8/8/2019 Chapter9 PLC July 08 v1
28/94
Topic 2Topic 2-- 2828EEB5223/EAB4223 Industrial Automation & Control Systems
SYSTEMSConventional
controller
Controlled
plant
+
-
S1
S2
K1
Programmable
Logic Controller
Controlled
plant
S1
S2
K1
+
-
+
Input 1
Input 2
Output 1
Its behaviour depends on the wiringarrangements
Its behaviour depends on theinstruction stored in memory
Memory
holdsacontrolprogram
PLC replaces most of the relay panel wiring by
software programming
-
8/8/2019 Chapter9 PLC July 08 v1
29/94
Topic 2Topic 2-- 2929EEB5223/EAB4223 Industrial Automation & Control Systems
Electrical connections to a PLC
Note: Each PLC has three sets of terminals throughwhich it connects to the plant/industrial processes.
P>
N
L
PE
N
L
COMMON OUTPUT 1 OUTPUT 2 OUTPUT 3
INPUT 1 INPUT 2 INPUT 3
Input devices
Output devices
Inputterminals
Output
terminals
240 VAC
Powerterminals
PLC
-
8/8/2019 Chapter9 PLC July 08 v1
30/94
Topic 2Topic 2-- 3030EEB5223/EAB4223 Industrial Automation & Control Systems
INPUT DEVICES
>
K
a. pushbutton b. Selectorswitch
c. Thermostat d. Pressureswitch
e. Level switch f. Relaycontact
g.Proximitysensor
h. Photoelectricsensor.
-
8/8/2019 Chapter9 PLC July 08 v1
31/94
Topic 2Topic 2-- 3131EEB5223/EAB4223 Industrial Automation & Control Systems
OUTPUT DEVICES
a. Contactorcoil
b. Relay coil c. Valve coil
d. Signal lamp e. Hooter
TYPES OF SWITCHES
-
8/8/2019 Chapter9 PLC July 08 v1
32/94
Topic 2Topic 2-- 3232EEB5223/EAB4223 Industrial Automation & Control Systems
TYPES OF SWITCHES
Selector switch
Pushbutton switches
Photoelectric switches
Limit switches
Proximity switchesLevel switches
Thumbwheel switches
Slide switches
RATING:24 Volts AC/DC
48 Volts AC/DC
120 Volts AC/DC
230 Volts AC/DC
TTL level(Transistor-to-transistor +/- 5V)
Isolated Input
Ho PLC o k ?
-
8/8/2019 Chapter9 PLC July 08 v1
33/94
Topic 2Topic 2-- 3333EEB5223/EAB4223 Industrial Automation & Control Systems
Conventional relay/contactor control systems perform allcontrolling processes at the same time.
In a PLC the program sequence is executed step by step and is
repeated cyclically.
How PLC works?
Reads ininputs andtransfers the
value to amemory area
The givencommands(program) will
be executed stepby step
The outputs areset according toresults of the
processor
Input levelInput level
(Reactions)
ProcessingProcessing
(Details)
Output levelOutput level
Common Structure of a PLC
-
8/8/2019 Chapter9 PLC July 08 v1
34/94
Topic 2Topic 2-- 3434EEB5223/EAB4223 Industrial Automation & Control Systems
Common Structure of a PLC
Input circuits
Output circuits
Micropro
cessor
(CPU)
Memory
Powersup
ply
The power supply
serves the
controller with a
variety of stable
direct voltages
Output devices receive signals from the controller
Input devices send signals
into the controller
Theprocessor
takes its
instructions
from thememory
-
8/8/2019 Chapter9 PLC July 08 v1
35/94
Topic 2Topic 2-- 3535EEB5223/EAB4223 Industrial Automation & Control Systems
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.
THE DIFFERENT AREAS IN MEMORY , AND
-
8/8/2019 Chapter9 PLC July 08 v1
36/94
Topic 2Topic 2-- 3636EEB5223/EAB4223 Industrial Automation & Control Systems
THE DIFFERENT AREAS IN MEMORY , ANDTHE FUNCTIONS
1. SYSTEM MEMORY
Executive- A permanently stored collection of
supervisory programs to direct system activitiese.g., program execution, communication withother devices, and fault diagnosis.
Scratch pad- A temporary store used by theCPU to store small amount of data generatedduring program execution.
THE DIFFERENT AREAS IN MEMORY , AND
-
8/8/2019 Chapter9 PLC July 08 v1
37/94
Topic 2Topic 2-- 3737EEB5223/EAB4223 Industrial Automation & Control Systems
THE DIFFERENT AREAS IN MEMORY , ANDTHE FUNCTIONS
2. APPLICATION MEMORY
Data table area- This holds the User Program, aData Table for counter and timer preset valuesand the Input/Output Table.
INPUT TABLE
OUTPUT TABLE
INTERNAL STORAGE BITS
STORAGE REGISTERS
CONTROL PROGRAMINSTRUCTIONS
Also known as Markers , Flags, Internaloutputs, Internal coils, Internal controlrelays.
They do not operate any external devices,instead used for latching and interlockingpurposes in the control program.
A group of bits holding information in binary, BCD,or ASCII format. Values e.g., timer presets andaccumulated values, counter presets and
accumulated values, compare set points, maths
operation results and ASCII characters.
PLC COMPONENTS continue
-
8/8/2019 Chapter9 PLC July 08 v1
38/94
Topic 2Topic 2-- 3838EEB5223/EAB4223 Industrial Automation & Control Systems
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 speedtimers, and stepping motor controllers.
4. Power supply AC Power
5. Peripheral Hand-held programmer (HHP)
Operator console
Printer
Graphic processor
Simulator
Network communication interface
ANALOG I/O
-
8/8/2019 Chapter9 PLC July 08 v1
39/94
Topic 2Topic 2-- 3939EEB5223/EAB4223 Industrial Automation & Control Systems
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.
SOME SPECIAL I/Os
-
8/8/2019 Chapter9 PLC July 08 v1
40/94
Topic 2Topic 2-- 4040EEB5223/EAB4223 Industrial Automation & Control Systems
Thermocouple input : Low level analog signal,filtered, amplified, and digitized beforesending to the processor through I/O bus.
Fast input: 50 to 100 microsecondpulse 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 controland axis positioning.
PID control : The Proportional Integral Derivative is usedfor closed loop process control.
Network module.
The Technical features
-
8/8/2019 Chapter9 PLC July 08 v1
41/94
Topic 2Topic 2-- 4141EEB5223/EAB4223 Industrial Automation & Control Systems
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
PLC WIRING DIAGRAM
-
8/8/2019 Chapter9 PLC July 08 v1
42/94
Topic 2Topic 2-- 4242EEB5223/EAB4223 Industrial Automation & Control Systems
01
02
03
+V
11
12
01 HR20
HR20
HR20 11
02A
B
External
switches
Stored program
MTR
-V
+ -
DC Power supply
PLC
Isolation
-
8/8/2019 Chapter9 PLC July 08 v1
43/94
Topic 2Topic 2-- 4343EEB5223/EAB4223 Industrial Automation & Control Systems
Inputs and outputs are electrically separated (noelectrical connection), using
- opto-electronic coupler
Or
-or electromechanical relay
INPUT CONNECTIONSDC Power SupplyDC Power Supply
-
8/8/2019 Chapter9 PLC July 08 v1
44/94
Topic 2Topic 2-- 4444EEB5223/EAB4223 Industrial Automation & Control Systems
L1 L2
1
23
COMMON
1
2
3
GND
+ - + -
+V
-V
1
2
3
pp yDC Power Supply
(a)
(b) (c)AC 120 or 230VAC, e.g.,AC input modules convertsignals to logic 1 or 0state
DC
High DC
TTLLow level DC(compatible with TTL)
AC inputdevices
DCinputdevices
OUTPUT CONNECTIONSDC Power SupplyDC Power Supply
-
8/8/2019 Chapter9 PLC July 08 v1
45/94
Topic 2Topic 2-- 4545EEB5223/EAB4223 Industrial Automation & Control Systems
L1 L2
L1
12
GND
12
3
+ - + -
+V
-V
1
2
3
DC Power Supply
(a) (b) (c)
DC output module interfacelogic signal from processorwith a DC output field device :voltage > +5 V.
TTL
3
-V
+V
TTL output moduleinterface logic signalfrom processor with aTTL compatible
voltages
AC output module interfacelogic signal from processor witha AC output field device :
voltage 120 or 230 VAC.
CONNECTING FIELD DEVICES TO
-
8/8/2019 Chapter9 PLC July 08 v1
46/94
Topic 2Topic 2-- 4646EEB5223/EAB4223 Industrial Automation & Control Systems
CONNECTING FIELD DEVICES TODC Input/Output modules.
Two common types of field circuits operate in theON/OFF switching condition.
a. Contact circuits- e.g., relays operate in theON/OFF condition as their
mechanical contacts open or close.
b. Solid state circuits- common use of
transistor (ON- saturation) (OFF-cutoff)
Sinking input module
-
8/8/2019 Chapter9 PLC July 08 v1
47/94
Topic 2Topic 2-- 4747EEB5223/EAB4223 Industrial Automation & Control Systems
Sinking input module
+VOutputDC powersupply
DC common
DC input module
1 state: +DC voltage
SwitchingelementPNP
Sinkinginputterminal
+
-
Turning ON PNP produces a positive DC atoutput lead of field device
Sourcing input module
-
8/8/2019 Chapter9 PLC July 08 v1
48/94
Topic 2Topic 2-- 4848EEB5223/EAB4223 Industrial Automation & Control Systems
g p
Output
DC commonDC powersupply
DC input module
1 state:
near ground potential
Switchingelement NPN
Sourcing
inputterminal
+
-
+VDC
Conventionalcurrent
Turning ON NPN produces a very low DC at
output lead of field device.
Types of outputs
-
8/8/2019 Chapter9 PLC July 08 v1
49/94
Topic 2Topic 2-- 4949EEB5223/EAB4223 Industrial Automation & Control Systems
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.
+VDC
Output
DCCommon
Field
device
To +V DC
To DCcommonSwitching element
NPN transistor
Conventionalcurrent
DC PowerSupply
Sinking output
terminal
Current sourcing: the load (field device) is connected bet.
-
8/8/2019 Chapter9 PLC July 08 v1
50/94
Topic 2Topic 2-- 5050EEB5223/EAB4223 Industrial Automation & Control Systems
g ( )the output and the negative common lead of the P/S.
+ V DC
Output
DCCommon
Fielddevice
To +V DC
To DCcommon
Switching element
PNP transistor
Conventionalcurrent
Sourcing output terminal
-
8/8/2019 Chapter9 PLC July 08 v1
51/94
Topic 2Topic 2-- 5151EEB5223/EAB4223 Industrial Automation & Control Systems
Scan TimeScan time: The process of reading the inputs, executingthe program and updating the outputs.
Scan time is normally a continuous and sequentialprocess of reading the status of inputs, evaluating thecontrol logic and updating the outputs.
Scan time indicates how fast the controller can react tofield inputs and correctly solve the control logic.
I/O Update Program scan
What is a SCAN Cycle?A PLC resolves the logic of a ladder diagram (program) rung by rung
-
8/8/2019 Chapter9 PLC July 08 v1
52/94
Topic 2Topic 2-- 5252EEB5223/EAB4223 Industrial Automation & Control Systems
A PLC resolves the logic of a ladder diagram (program) rung by rung,from the top to the bottom.
Usually, all the outputs are updated based on the status of the internalregisters.
Then the input states are checked and the corresponding input registers
are updated.Only after the I/Os have been resolved, is the program then executed.This process is run in an endless cycle.
The time it takes to finish one cycle is called the scan time. In somecontrollers the idle state is eliminated. In this case, the scan time variesdepends on the program length.
Begin
SCANcycle
Output
Resolvelogic
IdleInput
Factors influencing scan time
-
8/8/2019 Chapter9 PLC July 08 v1
53/94
Topic 2Topic 2-- 5353EEB5223/EAB4223 Industrial Automation & Control Systems
Factors influencing scan time
Scan time (time required to make a single scan) varybetween 1 ms to 30 ms.
The use of remote I/O subsystems increases scantime: having to transmit the I/O update to remotesubsystem.
Monitoring of the control program adds overheadtime to the scan: the micro has to send the status ofthe coils and contacts to the display (CRT) or other
monitoring devices.
Types of PLC Programming Language
-
8/8/2019 Chapter9 PLC July 08 v1
54/94
Topic 2Topic 2-- 5454EEB5223/EAB4223 Industrial Automation & Control Systems
The IEC 1161-3 Standard
a. Structured text programming (ST)- A high level language that has somesimilarities to Pascal. Statements can be used to assign values tovariables
b. Logic diagram Agraphical language, and most widely used. UseBoolean mnemonics to represent the process, before converting intologic diagram.
c. Functional Block Diagram Programming (FBD) Agraphical language.Used in applications involving the flow of signals between controlblocks.
d. Instruction List (IL)- A low level programming language, much like
assembly language programming.
e. Sequential Function Chart (SFC)- Agraphical programming method.Very useful for describing sequential type processes.
LADDER DIAGRAM
-
8/8/2019 Chapter9 PLC July 08 v1
55/94
Topic 2Topic 2-- 5555EEB5223/EAB4223 Industrial Automation & Control Systems
A ladder diagram is a means of graphically representing thelogic required in a relay logic system, representing +V and0V
Consists of a number of rungs connecting two vertical lines.
+V
Rail
Rung
PB1 PB2 R1
R1
R1 A
0V
Rail
Programming a PLC
-
8/8/2019 Chapter9 PLC July 08 v1
56/94
Topic 2Topic 2-- 5656EEB5223/EAB4223 Industrial Automation & Control Systems
The General Rule
SET RESET OUTPUT
LATCH
Well use the general rule to create the ladderdiagram. More examples in lecture and tutorial
PLC Ladder Diagram INSTRUCTIONS
-
8/8/2019 Chapter9 PLC July 08 v1
57/94
Topic 2Topic 2-- 5757EEB5223/EAB4223 Industrial Automation & Control Systems
1. Relay
2. Timer and Counter3. Program Control
4. Arithmetic
5. Data Manipulation
6. Data Transfer, and
7. Others, such as sequencers.
RELAYS
-
8/8/2019 Chapter9 PLC July 08 v1
58/94
Topic 2Topic 2-- 5858EEB5223/EAB4223 Industrial Automation & Control Systems
A switch whose operation is activated by an electromagnet.
contact
coil
input
R1
R1
Relay coil
Output contact
A Relay consists oftwo parts, the coil and
the contact.
Contacts:
a. Normally open
b. Normally closed
Coil:
a. Coil
b. Negative coil
LOGIC STATES
-
8/8/2019 Chapter9 PLC July 08 v1
59/94
Topic 2Topic 2-- 5959EEB5223/EAB4223 Industrial Automation & Control Systems
ON: TRUE, contact closure, energize, etc.
OFF: FALSE, contact open, de-energize, etc.
Do not confuse the internal relay andprogram with the external switch and relay.Internal symbols are used for programming,
External devices provide actual interface.
(In the notes we use the symbol ~ torepresent negation. AND and OR are logicoperators).
AN EXAMPLE OF RELAY LOGIC
-
8/8/2019 Chapter9 PLC July 08 v1
60/94
Topic 2Topic 2-- 6060EEB5223/EAB4223 Industrial Automation & Control Systems
For a process control, it is desired to have the processstart (by turning on a motor) five seconds after a parttouched a limit switch. The process is terminatedautomatically when the finished part touches a
second limit switch. An emergency switch will stopthe process any time when it is pushed.
LS1
PB1 (EMERGENCY STOP)
LS2
TIMER5
R1
R2
(MOTOR)
Rung 1: R1=(LS1+R1).(~PB1.~LS2)
R ng2 R1(dela ed5seconds)
-
8/8/2019 Chapter9 PLC July 08 v1
61/94
Topic 2Topic 2-- 6161EEB5223/EAB4223 Industrial Automation & Control Systems
R1
R2TIMER
PR=5
R1
R1
LS1PB1
LS2
Rung 2: R1 (delayed 5 seconds)
EXAMPLE: CONTROLLING A CONVEYOR BELT
-
8/8/2019 Chapter9 PLC July 08 v1
62/94
Topic 2Topic 2-- 6262EEB5223/EAB4223 Industrial Automation & Control Systems
FREE STANDING CONVEYOR
PARTS
BIN
CONVEYOR
MOTOR
INFRA RED
THROUGH
BEAM
INFRA RED
REFLECTIVE
REJECT
SOLENOID
st
Programming a PLC
-
8/8/2019 Chapter9 PLC July 08 v1
63/94
Topic 2Topic 2-- 6363EEB5223/EAB4223 Industrial Automation & Control Systems
The General Rule
SET RESET OUTPUT
LATCH
A very very important rule!!!
As well see.
Program 1:
When START switch (st) is energized conveyor will
-
8/8/2019 Chapter9 PLC July 08 v1
64/94
Topic 2Topic 2-- 6464EEB5223/EAB4223 Industrial Automation & Control Systems
When START switch (st) is energized, conveyor will
move. If switch (st) is de-energized, the belt will stillmoving until sensor (infra red through beam) isblocked.
mct HRMC mc-
mc
st
s0
HRMC
mct
mc-
SET=st
RESET=s0HRMC=(st+HRMC).s0
HRMC
HRMC
st s0 HRMC
HRMC
HRMC mct
TIMING
DIAGRAM
LADDER
DIAGRAM
-
8/8/2019 Chapter9 PLC July 08 v1
65/94
FLOW CHART
A i i l i f h f i
-
8/8/2019 Chapter9 PLC July 08 v1
66/94
Topic 2Topic 2-- 6666EEB5223/EAB4223 Industrial Automation & Control Systems
A pictorial representation of the sequence of operations tobe carried out.
Different shaped boxes are used to represent different
actions.PROCESS
BOX
DECISION
BOX
TERMINATIONBOX
CONNECTOR
ACTIVATE
RELAY R1
LS1 active
?
START
A
START Translate into
Flow Chart example.
-
8/8/2019 Chapter9 PLC July 08 v1
67/94
Topic 2Topic 2-- 6767EEB5223/EAB4223 Industrial Automation & Control Systems
START
L1 active
?
L2 active
?
L3 active
?
P1 active
?
ACTUATE
RELAY R1
A
L1
L2 L3
P1 R1
no
no
no
yes
yes
Translate into
ladder diagram
LOGIC DIAGRAM
-
8/8/2019 Chapter9 PLC July 08 v1
68/94
Topic 2Topic 2-- 6868EEB5223/EAB4223 Industrial Automation & Control Systems
The International Standards Organisation (ISO) symbols:
&
>1
=1
>1
&
&
SR
YY
1NOT
AND
OR
EX-OR
NOR
NAND
Inhibition
R-S Flip-flop
T=A
T=A.B
T=A+B
T=A.B+B.A
T=(A+B)
T=(A.B)
T=A.B
Example: The use of a logic diagram
-
8/8/2019 Chapter9 PLC July 08 v1
69/94
Topic 2Topic 2-- 6969EEB5223/EAB4223 Industrial Automation & Control Systems
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 formrequired for input into PLC.
&
&1
1
L1
P1
L2
L3
R1
SEQUENCE CHARTS
-
8/8/2019 Chapter9 PLC July 08 v1
70/94
Topic 2Topic 2-- 7070EEB5223/EAB4223 Industrial Automation & Control Systems
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 ofswitching systems.
Example: PLC control of actuators (solenoidvalves)
-
8/8/2019 Chapter9 PLC July 08 v1
71/94
Topic 2Topic 2-- 7171EEB5223/EAB4223 Industrial Automation & Control Systems
ACTUATOR - A ACTUATOR - B
S2 S3 S4 S5
Y1Y2
START
S1
ACTUATOR - A
Example: (a) energisingY1, (b) de-energisingY1
-
8/8/2019 Chapter9 PLC July 08 v1
72/94
Topic 2Topic 2-- 7272EEB5223/EAB4223 Industrial Automation & Control Systems
S2 S3 S2 S3
Y1Y1
(a) Cylinder extended (b) Cylinder retracted
Wiring diagram (Electro-pneumatic system)
-
8/8/2019 Chapter9 PLC July 08 v1
73/94
Topic 2Topic 2-- 7373EEB5223/EAB4223 Industrial Automation & Control Systems
00000
0000100002
00003
00004
00005
COM
.
.
.
10000
1000110002
10003
10004
10005
COM
.
.
.
+ -+12VDC
+-
S1
S2
S3
S4
S5
+
-
Y1
Y2
TIMER
A Timer consists of an internal clock, a count value register, and an
-
8/8/2019 Chapter9 PLC July 08 v1
74/94
Topic 2Topic 2-- 7474EEB5223/EAB4223 Industrial Automation & Control Systems
g
accumulator. It is used for timing purposes.
Clock
Accumulator
Contact
reset
output
Input
Reset
Output
Count0 1 2 3 4 5
Register
PLC TIMER
ON delay Timer:
-
8/8/2019 Chapter9 PLC July 08 v1
75/94
Topic 2Topic 2-- 7575EEB5223/EAB4223 Industrial Automation & Control Systems
Example: If a timer in the circuit has a preset of 10 seconds, after a10-second delay, the timer ON-delay energise contact closes andpower is supplied to an output device via the contact.
Time delay
Timing coil input
On-delay energise
PLC TIMER
OFF delay Timer:
-
8/8/2019 Chapter9 PLC July 08 v1
76/94
Topic 2Topic 2-- 7676EEB5223/EAB4223 Industrial Automation & Control Systems
Example: If a timer in the circuit has a preset of 10 seconds, after a10-second delay, the timer OFF-delay de-energise contact opensand power is removed from the controlled device.
Time delay
Timing coil input
On-delay de-energise
COUNTER
Digital counters output in the form of a relay contact when a pre-
-
8/8/2019 Chapter9 PLC July 08 v1
77/94
Topic 2Topic 2-- 7777EEB5223/EAB4223 Industrial Automation & Control Systems
assigned count value is reached.
Register
Accumulator
Contact
input
reset
output
5
Input
Reset
Output
Count0 1 2 3 4 5 0 1
PLC COUNTER
CNT (Counter) is a preset decremental counter.
-
8/8/2019 Chapter9 PLC July 08 v1
78/94
Topic 2Topic 2-- 7878EEB5223/EAB4223 Industrial Automation & Control Systems
It decrements one count every time an input signal goes from OFFto ON. The counter must be programmed with a count input, areset input, a counter number and a set value (SV).
The set value can range from 0 to 9999.
CNT 01
003
Count
input
Reset
input
Counter
number
SV
Example: A Traffic light control
-
8/8/2019 Chapter9 PLC July 08 v1
79/94
Topic 2Topic 2-- 7979EEB5223/EAB4223 Industrial Automation & Control Systems
A B
C D
Traffic Light Control
The sequence diagram for routes A,B,C and D.
-
8/8/2019 Chapter9 PLC July 08 v1
80/94
Topic 2Topic 2-- 8080EEB5223/EAB4223 Industrial Automation & Control Systems
24s 4s 2s 24s 4s 2s 24s 4s 2s 24s 4s 2s120s
ROUTE A
Red
Amber
Green
ROUTE B
Red
Amber
Green
ROUTE C
Red
Amber
Green
ROUTE D
Red
Amber
Green
Solution: Consider routes A and B ONLY.
24s 4s 2s 24s 4s 2s
TIM0
-
8/8/2019 Chapter9 PLC July 08 v1
81/94
Topic 2Topic 2-- 8181EEB5223/EAB4223 Industrial Automation & Control Systems
TIM1
TIM2
TIM3
TIM4
TIM5
tim0
tim1
tim2
tim3
tim4
tim5
Solution example: Consider routes A and B ONLY.
24s 4s 2s 24s 4s 2s
-
8/8/2019 Chapter9 PLC July 08 v1
82/94
Topic 2Topic 2-- 8282EEB5223/EAB4223 Industrial Automation & Control Systems
tim3+tim4
[(tim5+tim0+tim1).tim2]+[tim4.tim5]ROUTE A
Red
Amber
Green
ROUTE B
Red
AmberGreen
tim2+tim3
(tim1+tim2+tim3+tim4).tim5
tim0+tim1
tim5+tim0
Solution example: Routes A and B ONLYTIM5
TIM0
TIM3 TIM4
TIM2 TIM3
AMBER-A
GREEN-A
TIM0
24S
-
8/8/2019 Chapter9 PLC July 08 v1
83/94
Topic 2Topic 2-- 8383EEB5223/EAB4223 Industrial Automation & Control Systems
END
TIM1
TIM2
TIM3
TIM4
TIM5 TIM2
TIM0
TIM1
TIM4 TIM5
TIM1
TIM2
TIM3
RED-B
TIM4
TIM5
TIM0 TIM1
TIM5 TIM0
TIM1
4S
TIM2
2S
TIM324S
TIM4
4S
TIM5
2S
RED-A
AMBER-B
GREEN-B
EXAMPLE: CAR PARK CONTROL
This is a simple car park control system that allow only a
-
8/8/2019 Chapter9 PLC July 08 v1
84/94
Topic 2Topic 2-- 8484EEB5223/EAB4223 Industrial Automation & Control Systems
maximum of 100 parking spaces. Every time a car comes in,the LC will automatically add one through sensor S1. Any carthat goes out will automatically be subtracted by one throughsensor 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 going out
CAR PARK
FULL
S1 (00000)
S2 (00001)
(00200)
Examples of DIFU and DIFD
-
8/8/2019 Chapter9 PLC July 08 v1
85/94
Topic 2Topic 2-- 8585EEB5223/EAB4223 Industrial Automation & Control Systems
DIFU and DIFD turns an output ON for one scan time.DIFU turns its output ON when it detects an OFF-ONtransition in its input signal. DIFD turns its output ON
when it detects an ON-OFF transitions in its inputsignal.
Timing diagram:
INPUT
DIFU
DIFD
Examples of CMP
-
8/8/2019 Chapter9 PLC July 08 v1
86/94
Topic 2Topic 2-- 8686EEB5223/EAB4223 Industrial Automation & Control Systems
Compare (CMP) is used to compare the data in a specificchannel, with the data in another channel, or a four-digit,
hexadecimal constant. Therefore, two data must bespecified immediately after the CMP instruction. One ofthe data must be a channel.
Ladder symbols:
CMP
source
destination
Examples of ADD
ADD (Add )
-
8/8/2019 Chapter9 PLC July 08 v1
87/94
Topic 2Topic 2-- 8787EEB5223/EAB4223 Industrial Automation & Control Systems
ADD (Addition)
ADD totals the data in two different channels, or onechannel and a constant and then outputs the sum to a third
channel.
Three data must be specified: an augend, an addend and aresult channel.
Ladder symbols:
ADD
Augend
Addend
Results
Examples of SUB
SUB (S b )
-
8/8/2019 Chapter9 PLC July 08 v1
88/94
Topic 2Topic 2-- 8888EEB5223/EAB4223 Industrial Automation & Control Systems
SUB (Substract)SUB finds the difference between the data in one channeland the data in another channel or a constant, and then
result to a third channel.Three data must be specified: an minuend, ansubstracthend and a result channel.
Ladder symbols:
SUB
Minuend
Substracthend
Results
1. Sense car coming in
2 Add 1 f
00000
01000
DIFU
01000
ADD
Example: Parking control
-
8/8/2019 Chapter9 PLC July 08 v1
89/94
Topic 2Topic 2-- 8989EEB5223/EAB4223 Industrial Automation & Control Systems
2. Add 1 for every car3. Sense car going out
4. Subtract 1 for every car
5. Compare with 100
6. Indicator ON for CAR PARK FULL
ADDHR00
#0001
DIFU
01001
00001
SUB
HR00
#0001
00200
01001
CMP
HR00
#0100
AR01
AR01 AR02
AR03
Note: Auxiliary relay -: contains flagsand bits for special functions.
AR01 always turns ON).
If constant equal 100, AR02 turns ON.
AR03 turns ON if constant greaterthan 100.
-
8/8/2019 Chapter9 PLC July 08 v1
90/94
Topic 2Topic 2-- 9090EEB5223/EAB4223 Industrial Automation & Control Systems
Sequence Function Chart (GRAFCET)
SFC is an approved means of organising the program in a PLC. Aprogram based on SFC has an inherently stable structure, has
h t ti d i t t bl h t
-
8/8/2019 Chapter9 PLC July 08 v1
91/94
Topic 2Topic 2-- 9191EEB5223/EAB4223 Industrial Automation & Control Systems
shorter scan time, and is easy to troubleshoot.
0
1
2
Double box: Initial step
Single box: Step
Between two steps is a
transition(enables the next step to become active,
and the preceeding step inactive).
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
-
8/8/2019 Chapter9 PLC July 08 v1
92/94
Topic 2Topic 2-- 9292EEB5223/EAB4223 Industrial Automation & Control Systems
0
1
2
Motor stopped
Sensor S1 is blocked?
Forward pushbutton?
Motor runs forward
Motor runs forward
Motor runs for 1.5 s?
conveyor will move. It will stop 1.5 sec after the infra red throughsensor, S1, is blocked by the part on the belt.
-
8/8/2019 Chapter9 PLC July 08 v1
93/94
Sequence Function Chart (GRAFCET)
Parallel branching : allows for two or more sequences toproceed simultaneously.
Example:
-
8/8/2019 Chapter9 PLC July 08 v1
94/94
Topic 2Topic 2-- 9494EEB5223/EAB4223 Industrial Automation & Control Systems
53
54
55
56
57
58
q
r
s
t
p
59
Example:
The main sequence diverges into three sub-sequences after step 53.
Steps 54, 55Steps 57, 58
Step 59
If 53 is active and p is true, 54, 57, and 59 areactivated together.
When 55, 58, and 59 are active and r is true, 56is activated.
Note: Two or more steps can be active at the same time.
End of Lecture notes on PLCEnd of Lecture notes on PLC