View
6
Download
0
Category
Preview:
Citation preview
University of Technology Control and System Engineering Department
Computer and Mechatronics Engineering
Branches
Programmable Logic Controllers
Third year Class
1st Semester
2017 / 2018
Lecture 1
Programmable Logic Controller
Programmable Logic Controller“PLC”
Definition(according to NEMA* standard ICS3-1978):
“A digitally operating electronic apparatus which uses a
programming memory for the internal storage of
instructions for implementing specific functions such as
logic, sequencing, timing, counting and arithmetic to
control through digital or analog modules, various types
of machines or process.”
*NEMA: “National Electrical Manufacturers Association”
1-In 1968 GM Hydra-Matic (the automatic transmission division
of General Motors) issued a request for proposals for an electronic
replacement for hard-wired relay systems based on a white paper
written by engineer Edward R. Clark. The winning proposal came from
Bedford Associates of Bedford, Massachusetts. The first PLC,
designated the 084 because it was Bedford Associates' eighty-fourth
project, was the result.
2-Bedford Associates started a new company dedicated to developing,
manufacturing, selling, and servicing this new product: Modicon,
which stood for MOdular DIgital CONtroller. One of the people who
worked on that project was Dick Morley, who is considered to be the
"father" of the PLC.
3-The Modicon brand was sold in 1977 to Gould Electronics, later
acquired by German Company AEG, and then by French Schneider
Electric, the current owner.
Historical Background
Dick Morley
And
MODICON 084
PLC
Development achieved
• During the past four decades, enormous progress was
made in the development of micro electronics has
greatly influenced PLCs design and programming
methods.
• The range of functions and application fields have
grown considerably.
• Analogue processing, and the use of a PLC in
distributed control systems (DCS) networks is common
in PLC systems.
• Visualisation, which is the representation of machine
statuses such as the control program being executed,
via display or monitor with capability to enter
commands and variables can now be integrated into
many PLC systems.
Subsequent development resulted in a system featuring:
• The simple
connection of binary
signals
• The requirements as
to how these signals
were to be connected
was specified in the
control program
• With the new systems
it became possible for
the first time to plot
signals on a screen
and to store these in
electronic memories
Leading PLC manufacturers list
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
PLC Advantages• Flexibility
– In the past, each different electronically controlled production machine required its own
controller; 15 machines might require 15 different controllers.
– Now it is possible to use just one model of a PLC to run any one of the 15 machines.
– Each of the 15 machines under PLC control would have its own distinct program (or a
portion of one running program).
• Implementing Changes and Correcting Errors
– With a wired relay-type panel, any program alterations require time for rewiring of
panels and devices.
– When a PLC program circuit or sequence design change is made, the PLC program can
be changed from a keyboard of a program loader in a matter of minutes.
– No rewiring is required for a PLC-controlled system.
– Also, if a programming error has to be corrected in a PLC control program, a change can
be typed in quickly.
• Large Quantities of Contacts
– The PLC has a large number of contacts for each coil available in its programming.
– Suppose that a panel-wired relay has four contacts and all are in use when a design
change requiring three more contacts is made, time would have to be taken to procure and
install a new relay or relay contact block.
– Using a PLC, however, only three more contacts would be typed in. Contacts are now a
“software” component
PLC Advantages (Continued)
• Lower Cost
– Increased technology makes it possible to condense more functions into smaller and less
expensive packages.
– Now a PLC can be purchased with numerous relays, timers, and counters, a sequencer,
and other functions for a few hundred dollars.
• Pilot Running
– A PLC programmed circuit can be evaluated in the lab. The program can be typed in,
tested, observed, and modified if needed, saving valuable factory time.
• Visual Observation
– A PLC circuit's operation can be seen during operation directly on a screen.
– The operation or mis-operation of a circuit can be observed as it happens.
– Logic paths light up on the screen as they are energized.
– Troubleshooting can be done more quickly during visual observation.
• Reliability and Maintainability
– Solid-state devices are more reliable, in general, than mechanical systems or relays and
timers. Consequently, the control system maintenance costs are low and downtime is
minimal.
• Documentation
– An immediate printout of the true PLC circuit is available in minutes, if required.
– There is no need to look for the blueprint of the circuit in remote files.
– The PLC prints out the actual circuit in operation at a given moment.
– Often, the file prints for relay panels are not properly kept up to date. A PLC printout is the
circuit at the present time; no wire tracing is needed for verification.
PLC Disadvantages
• Fixed Program Applications
– Some applications are single-function applications. It does not pay to use a PLC that
includes multiple programming capabilities if they are not needed.
– Their operational sequence is seldom or never changed, so the reprogramming available
with the PLC would not be necessary.
• Fail-Safe Operation
– In relay systems, the stop button electrically disconnects the circuit; if the power fails, the
system stops.
– This, of course, can be programmed into the PLC; however, in some PLC programs, you
may have to apply an input voltage to cause a device to stop. These systems may not be
fail-safe.
There are seven distinct characteristics in a PLC system, these are:
1. It is field programmable by the user. This characteristic allows the user to write and
change programs in the field without rewiring or sending the unit back to the
manufacturer for this purpose.
2.It contains preprogrammed functions. PLCs contain at least logic, timing, counting,
and memory functions that the user can access through some type of control-oriented
programming language.
3.It scans memory and inputs and outputs (I/O) in a deterministic manner. This critical
feature allows the control engineer to determine precisely how the machine or process
will respond to the program.
4.It provides error checking and diagnostics. A PLC will periodically run internal tests
of its memory, processor, and I/O systems to ensure that what it is doing to the machine
or process is what it was programmed to do.
5.It can be monitored. A PLC will provide some form of monitoring capability, either
through indicating lights that show the status of inputs and outputs, or by an external
device that can display program execution status.
6.It is packaged appropriately. PLCs are designed to withstand the temperature,
humidity, vibration, and noise found in most factory environments.
7.It has general-purpose suitability. Generally a PLC is not designed for a specific
application, but it can handle a wide variety of control tasks effectively.
Characteristics of a PLC System
Types of PLC Construction:
• Compact PLC- it covers units with up to 128 I/O’s and
memories up to 2 Kbytes.
- Capable of providing simple to advance levels
or machine controls
• Modular PLC-The most sophisticated units of the PLC family.
They have up to 8192 I/O and memories up
to 750 Kbytes.
- Can control individual production processes or
entire plant.
Basic Elements of a PLC
•Power Supply
•Processor (CPU)
•Memories
•Input/output modules
•Programming Port
•PLC Bus
•Expansion Models
Power Supply
The basic function of the power supply is to
convert the field power into a form more suitable
for Use electronic devices that comprise the PLC
In large PLC systems, this power supply
does not normally supply power to the
field devices.
In small and micro PLC systems, the
power supply is also used to power field
devices.
•It is typically non-redundant. Hence a
failure of the PLC power supply can
cause the entire control system to fail.
Power Supply Features and Specifications
Useful guidelines when considering the power supply of a PLC include the following:
1. The power supply should be packaged properly so that the heat generated by the
power supply can be removed in order to prevent overheating. This will increase reliability.
If the power supply cabinet is hot to the touch at room temperature in an office
environment, it will be hotter still when locked in a control panel or located on the factory
floor. Care, of course, must always be taken to avoid touching any exposed power terminals.
2. The power supply should be tested by a certification agency, such as Underwriters
Laboratories ( ) or the Canadian Standards Association ( ). These agencies perform
temperature testing and electrical isolation testing on power supply components. A UL or
CSA mark on the PLC power supply will indicate that the power supply was tested to
comply with some basic minimum standards.
3. The power supply should meet at least one reputable standard for noise immunity.
Two of these standards are NEMA ICS 2-230 (a showering arc noise test) and IEEE Std.
472 (a high-voltage impulse test). Some noise testing may also be performed by certification
agencies, such as UL and CSA. The power supply should also be capable of withstanding
line-voltage variations such as dropouts, brownouts, and surges, which are common to
industrial facilities.
•It will typically contain high-voltage
components. Hence an isolation failure can
create the potential for serious injury or fire.
Processor Module
ProcessorModule
This module is the prime essence of a PLC system
It consists of a microprocessor which is
sometimes specially designed for the
purpose of being implemented in a PLC
system design for implementing the
logic, and controlling the
communications among the modules.
The processor module accepts input data
from various sensing devices via Input
modules, executes the stored user program,
and sends appropriate output commands
to control devices via output modules.
Processor Module Details A detailed block diagram of the processor section of a
PLC is shown in Figure below.
This section consists of four major elements: (1) power
supply, (2) memory, (3) central processing unit (CPU), and
(4) I/O interface.
Memories
•The program memory receives and holds the downloaded
program instructions from the programming device
-This memory is usually an EEPROM (electrically erasable
programmable ROM) or a battery-backup RAM, both of which are
capable of retaining data
Data memory is RAM memory used as a “scratch pad” by the
processor to temporarily store internal and external program-
generated data
For example, it would store the present status of all switches
connected to the input terminals and the value of internal counters
and timers.
20
Memory Designs
VOLATILE.
A volatile memory is one that loses its stored
information when power is removed.
Even momentary losses of power will erase any
information stored or programmed on a volatile
memory chip.
Common Type of Volatile Memory
RAM. Random Access Memory(Read/Write)
Read/write indicates that the information stored in the
memory can be retrieved or read, while write
indicates that the user can program or write
information into the memory.
21
Memory Designs
Several Types of RAM Memory:
1.MOS
2.HMOS
3.CMOS
The CMOS-RAM (Complimentary Metal Oxide Semiconductor) is
probably one of the most popular. CMOS-RAM is popular because
it has a very low current drain when not being accessed
(15microamps.), and the information stored in memory can be
retained by as little as 2Vdc.
NON VOLATILE.
A non volatile memory is one that does not lose its stored information when
power is removed.
•EPROM, Erasable Programmable Read Only Memory
Ideally suited when program storage is to be semi-permanent or additional
security is needed to prevent unauthorized program changes.
The EPROM chip has a quartz window over a silicon material that contains the
electronic integrated circuits. This window normally is covered by an opaque
material, but when the opaque material is removed and the circuitry exposed to
ultra violet light, the memory content can be erased.
The EPROM chip is also referred to as UVPROM.
Memory Designs
23
Memory Designs
NON VOLATILE
EEPROM, Electrically Erasable
Programmable Read Only Memory
Also referred to as E2PROM, is a chip that can be programmed
using a standard programming device and can be erased by the
proper signal being applied to the erase pin.
EEPROM is used primarily as a non-volatile backup for the normal
RAM memory. If the program in RAM is lost or erased, a copy of
the program stored on an EEPROM chip can be down loaded into
the RAM.
Battery backed CMOS RAM can
also be classified as non-volatile
I/O Section
Consists of input modules
and output modules.
Input module connects to :
Field sensors: switches, flow, level, pressure, temp.
transmitters, etc.
Output modules connect to:
Field output devices: motors, valves, solenoids, lamps, or
audible devices
I/O Section
Input Module
Forms the interface
by which input field
devices are connected
to the controller.
The terms “field” and “real world”are used to distinguish
actual external devices that exist and must be physically
wired into the system.
I/O Section
Output Module
Forms the interface
by which output field
devices are connected
to the controller.
PLCs employ a relay
or an optical isolator
which uses light to
electrically isolate the
internal components
from the input and
output terminals.
Programming Device
PC with appropriate
software
A personal computer (PC) is the most commonly used programming device.
The software allows users to create, edit, document,
store and troubleshoot programs.
The computer monitor is used to display the logic on
the screen. The personal computer communicates with the PLC
processor via a serial or parallel data communications
link.
If the programming unit is not in use, it may be unplugged
and removed. Removing the programming unit will not
affect the operation of the user program.
Programming Device
Hand-held unit
with display
•Hand-held programming devices are sometimes used to program small PLCs.
•They are compact, inexpensive, and easy to use, but
are not able to display as much logic on screen as a
computer monitor.
Hand-held units are often used on the factory floor for
troubleshooting, modifying programs, and transferring
programs to multiple machines.
PLC
-operates in the industrial
environment
-is programmed in relay
ladder logic
-has no keyboard, CD drive,
monitor, or disk drive
-has communications ports,
and terminals for input and
output devices
PLCs Versus Personal Computers
Same basic architecture
PC
-capable of executing several
programs simultaneously, in
any order
-some manufacturers have
software and interface cards
available so that a PC can do
the work of a PLC
PLC Size Classification
Criteria
- number of inputs and outputs (I/O count)
- cost
- physical size
Nano PLC
- smallest sized PLC
- handles up to 16 I/O points
Micro PLC
- handles up to
32 I/O points
Allen-Bradley SLC-500 Family
- handles up to 960 I/O points
Allen-Bradley PLC-5
Family
- handles several
thousand I/O points
31
Areas of Application
Manufacturing / Machining
Food / Beverage
Metals
Power
Mining
Petrochemical / Chemical
End of Lecture 1
University of Technology Control and System Engineering Department
Computer and Mechatronics Engineering
Branches
Programmable Logic Controllers
Third year Class
1st Semester
2017 / 2018
Lecture 2
PLC Programming
Devices Connecting to PLC I/O Modules
•Devices connecting to PLC input modules
- Pushbuttons momentary contact:
•Toggle switches:Throw - number of states
Pole - number of connecting moving parts
(number of individual circuits).
S - single, D - double
- There are special purpose input modules that can be
connected directly to special sensing devices like shaft
encoders and analogue sensors like thermocouples *IEC: International Electrotechnical Commission
Devices Connecting to PLC I/O Modules continued- Other types of switches:
Limit switch
Liquid
level
(float)
switch
Pressure switch
Temperature
actuated switch
Devices Connecting to PLC I/O Modules continued
-Proximity
switches / sensors:
Inductive
proximity switch /
sensorsFor ferrous and
ferromagnetic objects
Reed switch
Devices Connecting to PLC I/O Modules continued
-Proximity switches / sensors:Optical proximity switch / sensors
•Through beam
•Reflective
•Retro-reflective
Reflective scan
•Devices connecting to PLC output modules
Devices Connecting to PLC I/O Modules continued
-There are Several output devices that
ca be controlled through the output
modules of the PLC system, the symbols
of these devices are shown next to this
text. In general these can be categorized
as follows:
Indicators and Alarm.
Relays and contactors.
Solenoids and solenoid valves.
Motors.
heaters.
-There are special output modules that
can drive special output devices like
stepper motors and analogue metering
devices.
Devices Connecting to PLC I/O Modules continued
Solenoid: construction and operation.
Solenoid valve: construction and
operation. Relay: construction
Devices Connecting to PLC I/O Modules continued
Relay: Operation and symbol
Contactor: Construction and symbol
PLC Programming Languages
PLC- Programming languages - IL
• IL: Instruction List
• Fastest possible logic execution.
• Low level language
• Similar to assembly language
PLC- Programming languages - ST
• ST: Structured Text
• High level language
• Equations, table manipulation
• Complex algorithms (If/Then)
PLC- Programming languages - LD
• Traditional ladder logic is an easy-to-use
graphical programming language that
implements relay-equivalent symbol.
• Intuitive.
• LD in old PLCs had limited functionalities.
• LD Functionality has been greatly improved in
modern PLCs
PLC- Programming languages - FBD
• FBD : Function Block Diagram
• Easy way of programming
• Easy way of debugging
• Limited for complex algorithms
PLC- Programming languages - SFC
• SFC : Sequential Function Chart –
• A graphical method of representing a sequential
control system (stepper).
• Siemens : Simatic Step7 v5.5– Modular
– Wide range of functionalities
– Diagnostic tools
– Network configuration
• LSis/GLOFA: GMWIN for GM4 and GM6 v4.18– Supports the international language (IEC61131-3)
IL, LD, SFC
– Simulation Program test and debugging without PLC
– Editing, monitoring, debugging using symbol and variable name
– Automatic memory allocation support
Compiler sets a variable location automatically
– Optimization (PLC code) by compiler method
– User-defined function/function block support
PLC- Programming software tools
Creating a new LD project using GMWIN package.
Defining the labels to be in an LD program.
Creating an LD program for GLOFA GM6 PLC.
Converting the created LD program into an
executable sequence program (Compiling).
Correcting the program if any error occurs in
execution.
PLC Programming Process
Programming PLC Using LD (Ladder Diagram)
Language
The ladder diagram consists of two vertical lines representing the power
rails. Circuits are connected as horizontal lines, i.e., the rungs of the
ladder, between these two verticals
LD language convention:
1. The vertical lines of the diagram
represent the power rails between which
circuits are connected. The power flow is
taken to be from the left-hand vertical across
a rung.
2. Each rung on the ladder defines one
operation in the control process.
3. A ladder diagram is read from left to
right and from top to bottom, the figure
on the right shows the scanning motion
employed by the PLC. The top rung is read
from left to right. Then the second rung down
is read from left to right and so on.
LD language convention: Continued
4. When the PLC is in its run mode, it goes through the entire ladder
program to the end, the end rung of the program being clearly denoted, and then
promptly resumes at the start. This procedure of going through all the rungs of the
program is termed a cycle. The end rung might be indicated by a block with the
word END or RET for return, since the program promptly returns to its beginning.
5. Each rung must start with an input or inputs and must end with at least
one output. The term input is used for a control action, such as closing the contacts
of a switch, used as an input to the PLC. The term output is used for a device
connected to the output of a PLC, e.g., a motor.
6. Electrical devices are shown in their normal condition. Thus a switch,
which is normally open until some object closes it, is shown as open on the
ladder diagram. A switch that is normally closed is shown closed.
7. A particular device can appear in more than one rung of a ladder. For
example, a relay that switches on might be used on one or more devices. The same
letters and/or numbers are used to label the device in each situation.
8. The inputs and outputs are all identified by their addresses, the notation
used depending on the PLC manufacturer. This is the address of the input or
output in the memory of the PLC.
Types of PLC Control Action
• Temporal -- control based in time
• State -- control based in state level
• Hybrid – both temporal and state
Functions of PLC Systems
1) on-off control,
2) sequential control,
3) feedback control, and
4) motion control
Basic symbols of LD Language
PLC Programming Using GMWIN Software
in LD Language
General form of an LD Rung.
GLOFA GMWIN form of an LD Rung.
LADDER DIAGRAM
A ladder diagram (also called contact symbology) is a
means of graphically representing the logic required in a
relay logic system.
A
R1
PB1 PB2
R1
R1
start emergency stop
Rail
Rung
PLC Instructions
1) Relay,
2) Timer and counter,
3) Program control,
4) Arithmetic,
5) Data manipulation,
6) Data transfer, and
7) Others, such as sequencers.
RelayA Relay consists of two parts, the coil and the contact(s).
Contacts:
a. Normally open -| |-
b. Normally closed -|/|-
Coil:
a. Energize Coil -( )-
b. De-energize -(/)-
c. Latch -(L)-
d. Unlatch -(U)-
( )
Logic States
ON : TRUE, contact closure, energize, etc.
OFF: FALSE, contact open , de-energize, etc.
The internal relay and program should not be confused with the externalswitch and relay. Internal symbols are used for programming.External devices provide actual interface.
AND and OR LOGIC
AND
OR
Combined AND & OR
R1 = PB1 .OR. (PB2 .AND. PB3)
Logic for Ladder Solution
Relay wiring diagram PLC with I/O wiring
The sequential task is as follows:
1. Start button is pressed.
2. Table motor is started.
3. Package moves to the position of the limit
switch and automatically stops
An Example of a Sequential Task
End of Lecture 2
University of Technology Control and System Engineering Department
Computer and Mechatronics Engineering
Branches
Programmable Logic Controllers
Third year Class
1st Semester
2017 / 2018
Lecture 3
Examples on PLC Programming Using
Ladder Language to Solve Automation
Problems
Writing a Ladder Logic Program Directly from a
Narrative Description
In most cases, it is possible to prepare a ladder logic program directly from
the narrative description of a control process.
Some of the steps in planning a program are as follows:
• Define the process to be controlled.
• Draw a sketch of the process, including all sensors and manual controls
needed to carry out the control sequence.
• List the sequence of operational steps in as much detail as possible.
• Write the ladder logic program to be used as a basis for the PLC program.
• Consider different scenarios where the process sequence may go astray and
make adjustments as needed.
• Consider the safety of operating personnel and make adjustments as
needed.
The following are examples of ladder logic programs derived from narrative
descriptions of control processes.
Experiment 1
The figure to the left shows
the sketch of a drilling
process that requires the
drill press to turn on only if
there is apart present and
the operator has one hand
on each of the start
switches. This precaution
will ensure that the
operator’s hands are not in
the way of the drill. The
sequence of operation
requires that switches 1 and
2 and the part sensor all be
activated to make the drill
motor operate. The next
figure shows the ladder logic
program required for the
process implemented using
a GLOFA GM6 PLC.
Experiment 2
A motorized overhead garage door is to be operated automatically to preset open and
closed positions. The field devices include one of each of the following:
• Reversing motor contactor for the up and down directions.
• Normally open down limit switch to sense when the door is fully closed.
• Normally open-held closed up limit switch to sense when the door is fully opened.
• Normally open door up button for the up direction.
• Normally open door down button for the down direction.
• Normally closed door stop button for stopping the door.
• Red door ajar light to signal when the door is partially open.
• Green door open light to signal when the door is fully open.
• Yellow door closed light to signal when the door is fully closed.
The sequence of operation requires that:
• When the up button is pushed, the up motor contactor energizes and the door travels
upward until the up limit switch is actuated.
• When the down button is pushed, the down motor contactor energizes and the door
travels down until the down limit switch is actuated.
• When the stop button is pushed, the motor stops. The motor must be stopped before it
can change direction.
The figure below shows the ladder logic program required for the operation
implemented using a GLOFA GM6 PLC.
EXPERIMENT 3
The figure below shows the sketch of a continuous filling operation.
This process requires that boxes moving on a conveyor be automatically
positioned and filled. The sequence of operation for the continuous filling
operation is as follows:
• Start the conveyor when the start button is momentarily pressed.
• Stop the conveyor when the stop button is momentarily pressed.
• Energize the run status light when the process is operating.
• Energize the standby status light when the process is stopped.
• Stop the conveyor when the right edge of the box is first sensed by the
photo-sensor.
• With the box in position and the conveyor stopped, open the solenoid valve
and allow the box to fill. Filling should stop when the level sensor goes true.
• Energize the full light when the box is full. The full light
should remain energized until the box is moved clear of the photo-sensor.
The figure after shows the ladder logic program required for the operation.
End of Lecture
Recommended