engg3490 plc l3
TRANSCRIPT
1
ENGG3490-PLCL3L3
PLCs Ref. [3];1. Developing
Fundamental PLC
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill
1
Fundamental PLC Wiring Diagrams and Ladder Logic Programs
Electromagnetic Control Relay
The PLC's original purpose was the replacement of electromagnetic relays with a solid-state switching system that could be programmed.
Th bl t ll d i dThe programmable controller was designedto replace physically small control relays that make logic decisions but are notdesigned to handle heavy current or high voltage.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 2
Electromagnetic relays, such as thelighting contactor shown, are still used as auxiliary devices to switch I/Ofield devices.
2
Electromagnetic Relay Operation
An electromagnetic relay is a magnetic switch. It useselectromagnetism to switch contacts.
A relay will usually have only one coil but may have any number of different
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 3
number of different contacts.
Electromagnetic Relay Operation
With no current flow through the coil (coil de-energized),( g ),the armature is held away from the core by spring tension.
When the coil is energized,the electromagnetic field
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 4
the electromagnetic field moves the armature causing the contact pointsof the relay to open orclose.
3
Relay Symbol
CR1-1 CR1 2CR1
Coil
Normally closed (NC) contact
CR1 1 CR1-2
Normally open (NO) contact
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 5
Contacts are open whenno current flows throughthe coil but close as soonas the coil is energized.
Contacts are closed whenno current flows throughthe coil but open as soonas the coil is energized.
Relay Circuit Operation
L1 L2S
CR1CR1
CR1-1OFF
R
With switch S open: coil CR1 is de-energized contacts CR1-1 are open light R is off contacts CR1-2 are closed light G is on
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 6
CR1-2 ON
G
4
Relay Circuit Operation
L1 L2
SCR1CR1
CR1-1
R
ON With switch S closed: coil CR1 is energized contacts CR1-1 are closed light R is on contacts CR1-2 are open
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 7
CR1-2 OFF
G
p light G is off
Magnetic Contactor
A contactor is a special type of relay designed tohandle heavy power loads that are beyond thecapability of control relayscapability of control relays.
Contactors are designed to operate such loads as lights, heaters, transformers, capacitors, and electric
f hi h l d
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 8
motors for which overload protection is provided separatelyor not required.
5
Magnetic Contactor
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 9
PLC Used in Conjunction with a Contactor
Pump
L2
Contactorpower contacts
Programmable controllershave I/O capable of operating
L2
L1
High-currentwiring
Coilt i l
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 10
the contactor but they do nothave the capacity to operateheavy loads directly.
PLC output module
L1L2
Low-currentwiring
terminals
6
Magnetic Motor Starter
A magnetic motor starter is a contactor with anoverload relay attached physically and electrically.They are electromagnetically operated switches thatprovide a safe method for starting large motor loads.
The overload relay will open the supply voltage to the starter if itdetects an overload on a motor.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 11
detects an overload on a motor.Motor overload relay contacts arenormally hardwired in series with the magnetic starter coil.
Magnetic Motor Starter
Overload heaters areconnected in series with the contactor. If the motor becomes overloaded they cause a mechanical latch totrip. Tripping this latch opens a set of
h
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 12
contacts that are wired in series with the voltage supply and motor.
7
Across the Line AC Starter Operation
When the start button is pressed, coil M energizes to close all M contacts.
The OL contact opens automatically when an overload condition is sensed to de
Low-currentcontrol circuit
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 13
is sensed, to de-energize the M coil and stop the motor.
High-currentpower circuit
Across the Line AC Starter Operation
The M contacts, in seriesLow-currentcontrol circuit
The M contacts, in serieswith the motor, close tocomplete the high-current path to the motor.
Control contact M alsocloses to seal-in the coil
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 14
High-currentpower circuit
circuit when the STARTbutton is released.
8
PLC Control of A Large Motor Load
When a PLC needs to control a large motor, itmust work in conjunctionwith a starter.
Motor starters areavailable in various
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 15
standard NationalElectric Manufacturers (NEMA) sizes and ratings.
Manually Operated Switches
Manually operated switches are controlled by hand. Pushbutton switches are the most common form of manual control found in industry.
Normally Open (NO) pushbuttonmakes a circuit when it is pressed
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 16
and returns to its open positionwhen the button is released.
9
Manually Operated Switches
N ll Cl d (NC) hb ttNormally Closed (NC) pushbutton opensthe circuit when it is pressed and returns to the closed position when the button is released. The abbreviations NO and NCrepresent the state of the switch when it isnot actuated.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 17
not actuated.
Manually Operated Switches
The break-make pushbutton is used for interlocking controls. In this switch the topsection is NC, while the bottom section is NO When the button is pressed theNO. When the button is pressed, the bottom contacts are closed as the top contacts open.
R
ONOFF
NOT PRESSEDPRESSED
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 18
L1 L2
R
G
L1 L2
R
G
ONOFF
10
Selector Switch
Selector switch positions are made by turning the operator knob – not pushing it.p g
Contacts
Position A BOffHand Auto
Selector switchpositions may havetwo or more selectorpositions with either maintained contactHand X
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 19
A
B
maintained contact position or springreturn to givemomentary contactoperation.
Hand X
Off
XAuto
Selector Switch Motor Reversing
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 20
Selector switch used in conjunction with a reversingmotor starter to select forward or reverse operationof the motor.
11
Dual In-Line Package (DIP) Switches
ON Are small switch assemblies designed for mounting on printed
OFF circuit board modules.
Switch settings are seldom changed and the changes occur
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 21
changed, and the changes occurmainly during installation orconfiguration of the system.
Mechanically Operated Switches
A mechanically operated switch is controlled automaticallyby factors such as pressure, position, and temperature.
The limit switch is a type of mechanically operated switch designed to operate only when apredetermined limit is reached,
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 22
p ,and is usually actuated by contact with an object such as a cam.
12
Limit Switch Operation
SymbolsyNO Contact
NC Contact
Limit switches takethe place of a humanoperator.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 23
They are often used in the control of machine processesto govern the starting, stopping, or reversal of motors.
Typical Limit Switch Circuit
L1 L2Stop Forward
FR
FWD Limit
F
F
R
R
R
Reverse
OLsLimit switches
REV Limit
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 24
Control circuit for starting and stopping a motor inforward and reverse with limit switches providingover travel protection.
13
Temperature Switch
The temperature switch or thermostat is used to sense temperature changes and is actuated by some specific environmental temperature change.
Responds to changes in temperature by opening orclosing an electric circuit.
Symbols
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 25
NO Contact NC Contact
Temperature Switch Control of a Motor
Closing ONClosing ON
Rising
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 26
Motor
gtemperature
14
Pressure Switch
Pressure switches are used to control the pressure ofliquids and gases and are activated when a specific pressure is reached.
Opens or closes an electric circuit in response to a change in pressure.
Switch
Bellows
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 27
Symbols
NO Contact NC Contact
Starter Operated By a Pressure Switch
Closing ONRising
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 28
pressure
15
Level Switch
Level or float switches are used to sense the height of a liquid.
Opens or closes an electric Switch
pcircuit in response to a change in liquid level.
Float
Symbols
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 29
NO Contact NC Contact
Two-wire level switchcontrol of starter.
Transducer
A transducer is any device that converts energy fromone form to another.
Amplifier
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 30
Input transducer (microphone) convertssound energy to electric energy
Output transducer (speaker) convertselectric energy to sound energy
16
Sensors
Sensors are input transducers used for detecting andoften measuring the magnitude of something. Theyconvert mechanical, magnetic, thermal, optical, andh i l i ti i t l t i lt d tchemical variations into electric voltages and currents.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 31
Photoelectricsensor
Sensors
Sensors provide the equivalent of eyes, ears, nose,and tongue to the microprocessor brain.
MicroprocessorMicroprocessor
Opticalsensor
Gassensor
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 32
sensorMicrophone
Probe
17
Proximity Sensors
Proximity sensors or switches detect the presence ofan object without making physical contact with it.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 33
Proximity Sensors Applications
The object being detected is too small, lightweight, orsoft to operate a mechanical switch.
Rapid response and high switching rates are requiredRapid response and high switching rates are required.
An object has to be sensed through nonmetallic barrierssuch as glass, plastic, and paper cartons.
Hostile environments conditions exist.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 34
Long life and reliable service are required.
A fast electronic control system requires a bounce-freeinput signal.
18
Inductive Proximity Sensor Operation
Barrel typeBarrel typeBlock diagram
As the targetmoves into the
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 35
moves into thesensing area, the sensorswitchesthe output ON
Proximity Sensor Connections
The method of connecting and exciting a proximity sensor varies with the type of sensor and its application.pp
TargetL1 L2
Load
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 36
Two-wire sensor connection
19
Proximity Sensor Connections
Current-sourcing output (PNP)Sensor
Controloutput
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 37
Load is connectedbetween the sensor and ground
Load
Proximity Sensor Connections
Current-sinking output (NPN)Sensor
Load is connectedbetween the positive supply and sensor
Load
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 38
Controloutput
20
Proximity Sensor Connection to Input Module
L1 L2A proximity sensor should be powered continuously
Proximitysensor
Inputmodule
The use of a bleeder resistor allows enough current for the sensor to operate
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 39Bleeder resistor
but not enough to turn on the input of the PLC
Capacitive Proximity Sensor
A capacitive proximity sensor can be actuated by bothconductive and nonconductive material such as wood,plastics, liquids, sugar flour and wheat.
Operation is similar to that of inductiveproximity sensor. Instead of a coil the
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 40
proximity sensor. Instead of a coil, theactive face of the sensor is formed by two metallic electrodes – rather like an"opened capacitor".
21
Magnetic Switch (Reed Switch)
A magnetic switch (also called a reed switch) is composed of flat contact tabs that are hermetically sealed (air-tight).
NO The switch is
Magnet
N S
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 41
Common
NO
NC
The switch is actuated by a magnet.
Reed Switch ActivationReed switch
Proximity motion – movementof the switch or magnet willactivate the switch
Magnetactivate the switch
Rotary motion – switch is actuated twice for every complete revolution
S i i i
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 42
Shielding – the shield short circuits the magnetic field; switch is activated by removal of the shield
22
Photovoltaic Or Solar Cell
The photovoltaic cell, or solar cell, is a common light-sensor device that converts light energy directly into electric energy.
Solar cell
The solar cell converts light
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 43
The solar cell converts light impulses directly into electrical charges which can easily be amplified to provide an input signal to a PLC.
Photoconductive or Photoresistive Cell
The photoconductive cell, or photoresistive cell, is is another popular type of light transducer.popular type of light transducer. Light energy falling on this device will cause a change in the resistance of the cell.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 44
20 Ohms Light resistance5,000 Ohms Dark resistance
Ohms
23
Photoelectric Sensor Operation
Most industrial photoelectric sensors use a light-emitting diode (LED) for the light source and a phototransistor to sense the presence or absence of light.
Object to be
Light detectorLight from the LED falls on the input of the phototransistor and the amount of conduction through the transistor changes Analog
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 45
sensed
Light source
changes. Analog outputs provide an output proportional to the quantity of light seen by the photodetector.
Reflective Photoelectric Sensor
Emits a light beam (visible, infrared, or laser) from its light emitting element and detectsemitting element and detects the light being reflected.
Retro-reflective typeOperatingrange
Operatingrange
Diffused-reflective type
Emitter/receiver
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 46
Reflector
g
Target
24
Through-Beam Type Photoelectric Sensor
A through-beam photoelectric sensor is used to measure the change in light quantity caused by the target's crossing the optical axis.
OperatingrangeEmitter Receiver
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 47
g
Target
Bar Code Systems
Bar code systems can be used to enter data much more quicklythan manual methods, and arethan manual methods, and arehighly accurate.
DiverterThe decoder receives the signal from the scanner and converts
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 48
ScannerDecoder
PLC
scanner and converts these data into the character data representation of the symbol's code.
25
Ultrasonic Sensor
An ultrasonic sensor operates by sending sound waves towards the target and measuring the time it g gtakes for the pulses to bounce back.
The returning echo signal
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 49
is electronically convertedto a 4 mA to 20 mA output,which supplies flow rate toexternal control devices.
Strain/Weight Sensor
A strain gauge transducer converts a mechanical strain into an electric signalsignal.
ForceWire type The force applied to the gauge causes the gauge to bend. This bending action also distorts the physical size of the gauge,
The load cell providessensor input to the
ControllerHopper
ChuteON/OFF
Control
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 50
p y g gwhich in turn changes its resistance.
pcontroller, which displays the weight and controls the hopper chute.
Load cell
Control
26
Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor,
d ICand IC sensor.
The thermocouple consists of a pairof dissimilar conductors fused together at one end to form the "hot" or measuring junction, with the free ends available for
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 51
connection to the "cold" reference junction. A temperature difference between the measuring and reference junction generates a small DC signal voltage.
Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor,
d ICand IC sensor.
The resistance temperature detector (RTD) varies in resistance value with changes in temperature.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 52
RTD
27
Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor,
d ICand IC sensor.
The thermistor varies in resistance value with h i t t
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 53
changes in temperature
Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor,
d ICand IC sensor.
The Integrated Circuit (IC) temperaturesensor produces changes in voltage or
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 54
p g gcurrent with changes in temperature.
28
Flow Measurement
The usual approach used in measuring fluid flow is to convert the kinetic energy that the fluid has into some other measurable form.
Turbine Flow Meter
CoilThe turbine blades turn at
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 55
Flow Magnet
Turbine
e u b e b des ua rate proportional to the fluid velocity and are magnetized to induce voltage pulses coil.
Flow Measurement
The usual approach used in measuring fluid flow is to convert the kinetic energy that the fluid has into some other measurable form.
Electronic Magnetic Flow Meter
Can be used with electrically conducting fluids and offers no restriction to flow. A coil in the unit sets up a magnetic field If
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 56
unit sets up a magnetic field. If a conductive liquid flows through this magnetic field, a voltage is induced and sensed by two electrodes.
29
Velocity/RPM Sensors
A tachometer is a small permanent magnet DC generator which when rotated produces a voltage that is directly proportional to the speeddirectly proportional to the speed at which it is driven.
Controller
M
Tachometers coupledto motors are commonly used in motor speed control
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 57
Tach
Motor
M motor speed controlapplications to providea feedback voltage to the controller that is proportional to motor speed.
Velocity/RPM Sensors
The rotating speed of a shaft is often measured using a magnetic (i d ti ) i k(inductive) pickup sensor.
Pickup coil Pole piece A magnet is attached to the shaft. A small coil of wire held near the
t i l h ti
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 58
0 V
N SMagnetSensor
output
magnet receives a pulse each time the magnet passes. By measuring the frequency of the pulses, the shaft speed can be determined.
30
Output Control Devices
A variety of output control devices can be operated by the controller output module to control traditional processes. These include:
Pilot light
Solenoid Solenoidvalve
Controlrelay
Alarm
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 59Heater Motor starter Small motor
Actuator
An actuator is any device that converts an electrical signal into mechanical movement. The principle types of actuators are relays, solenoids, and motors.
Plunger
Solenoid Symbol The solenoid converts electric current into linear motion.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 60
AIR
Coil
31
Solenoid Valve
A solenoid valve is a combination of: a solenoid with its core or plunger a valve body containing an orifice
in which a disc or plug is positionedin which a disc or plug is positionedto restrict or allow flow
Forward motion of piston
Directionalsolenoid
When SOL A is energized, the valve spool is shifted to redirect the fluid and move the cylinder forward
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 61
SOL A
valve
FWDCR
CR
SOL A
Stepper Motor
A stepper motor converts electrical pulses applied to it into discrete rotor movements called steps. They are used to provide precise positionare used to provide precise position control of movement.
M d lStepper-motor Step
Stepper motor control system
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 62
Module translator motor
Communicates with the PLC and responds with pulse trains
Enables controlof the stepper motor The motor will move
one step for each pulsereceived
32
Seal-In Circuits
A seal-in circuit is a method of maintaining current flow after a momentary switch has been pressed and released. p
StopStartMotor starter coil
M
Hardwired Seal-In Circuit
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 63
M
Seal-in contact
The seal-in auxiliary contact of thestarter is connected in parallel withthe Start button to keep the startercoil energized when the Start button is released.
Programmed Seal-In Circuits
Inputs Output
StopMotorstarter
Ladder logic program
L1 L2p
Start
Stop PBStart PB coil (M)
Motorstarter coil (M)
M
M
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 64
Both the Start and Stop buttons are examined for a closed condition because both buttons must be closed to cause the motor starter to operate.
33
Latching Relay
Latching relays are used where it is necessary for contacts to stay open and/or closed, even though the coil is energized momentarily
L1 L2ON
OFF
L
Electromagnetic latching relay circuit
When the ON button is momentarily actuated, the l t h il i i d t t
is energized momentarily.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 65
U
PL
Contact shown with relayin the unlatched position
latch coil is energized to set the relay to its latched position. The relay does nothave to be continuously energized to hold the contact closed.
Programmed Latching Relay Instruction
Command Name Symbol Description
OTL sets the bit to “1” when the rung becomes true, and
OTL Output Latch,
retains its state when the rung loses continuity or a power cycle occurs
OTU Output Unlatch
OUT resets the bit to “0” when the rung becomes true and retains it
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 66
Latch and unlatch coils have the sameaddress
XXX
XXX
34
Latching Relay ProgramON
OFF
Latch rung
ON
OFF
Unlatch rung
Output rung
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 67
When the ON button is momentarily actuated, the latch rungbecomes true and the latch status bit (10) is set to 1, and so theoutput is switched on. This status bit will remain on (1) when logic continuity of the latch rung is lost.
1
Latching Relay ProgramON
OFF
Latch rung
ON
OFF
Unlatch rung
Output rung
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 68
When the unlatch rung becomes true (OFF button actuated),the status bit (10) is reset back to 0 and so the output is switchedoff.
0
35
PLC Water Level Program
Pump running
Lowlevel
Highlevel
The program for this processis designed to control the level of water in a storage tank by turning a discharge pump on and off.
High sensor switch
discharge pump on and off.
Off Position: the pump will stop if it is running and will not start if it is stopped.
Modes of Operation
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 69
Low sensor switch
Pump motor
pp
Manual Mode: the pumpwill start if the water in thetank is at any level exceptlow.
PLC Water Level Program
Pump running
Lowlevel
Highlevel
The program for this processis designed to control the level of water in a storage tank by turning a discharge pump on and off.
High sensor switch
discharge pump on and off.
Automatic Mode:- if the level of water in the tank reaches a high point, the water pump will start so that water can be removed from
Modes of Operation
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 70
Low sensor switch
Pump motor
water can be removed from the tank, thus lowering the level- when the water level reaches a low point, the pump will stop
36
PLC Water Level Program
Pump running
Lowlevel
Highlevel
The program for this processis designed to control the level of water in a storage tank by turning a discharge pump on and off.
High sensor switch
discharge pump on and off.
Modes of Operation
Status Indicating Lights:- water pump running light
(green) - low water level status light
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 71
Low sensor switch
Pump motor
- low water level status light (red)
- high water level status light (yellow)
PLC Water Level Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 72
OFF /Man Positions ( water at a low level)
37
PLC Water Level Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 73
Manual Mode ( water between high and low levels)
PLC Water Level Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 74
Automatic Mode ( water at high level)
38
Sequential Control Process
Sequential controls are required for processes that demand certain operations to be performed in specific order.
Filling operation Capping operation
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 75
Bottle movement
In this filling and capping operation, the tasks are:(1) fill bottle(2) press on capThese tasks must be performed in the proper order.
Combination Control Process
Combination control processes require that operations be performed without regard to the order in which they are performed.
Labeling processLabel solenoid 1
Label solenoid 2
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 76
In this labeling operation, the tasks are:(1) place label 1 on bottle(2) place label 2 on bottleThe order in which the tasks are preformed does not really matter.
39
Automatic Control
Automatic control involves maintaining a desired set-point.
Automatic furnace temperature
Furnace
PLC
In this operation the set-point is selected by means of the touch screen interface. If thereis a deviation from that set point, an error isdetermined by comparing the output against th t i t d i thi t k
pcontrol
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 77
Touch screeninterface
the set point and using this error to make a correction. This requires some form offeedback from the output back to the controlfor the input.
Hardwired Sequential Process
The sequential task is as follows:1. Start button is pressed.2. Table motor is started.3. Package moves to the limit switch
and stops.
Auxiliary Features: An emergency stop button that will stop the table, for any reason, before the package reaches the limit switch
STOP
RUNPackage
Motor
ppositionA red pilot light to indicate the table has stoppedA green pilot light to indicate the table is running
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 78
Limit switch(LS1)
EmergencySTOP
START
40
Hardwired Sequential ProcessSummary of the control task:• Start button is actuated. • CR1-1 closes to seal in CR1 • CR1-2 opens, switching the
red stop pilot light off• CR1-3 closes, switching the
green run pilot light on
StartPB1
EmergencyStop PB2 CR1 g p g
• CR1-4 closes to energize the motor starter and motor
• The package moves to the limit switch to actuate it and de-energize coil CR1
• CR1-1 opens to open the seal-in contactCR1 2 l it hi th
LS1
CR1-1STOP
R
RUNCR1-2
1
2
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 79
• CR1-2 closes, switching the red pilot light on
• CR1-3 opens, switching the green pilot light off
• CR1-4 opens to de-energize the starter coil, stop the motor, and end the sequence
G
M
OL
CR1-3
CR1-4
3
4
Programmed Sequential Process
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 80
41
Arranging Instructions for Optimum Performance
There is more than one way to correctly implement the ladder logic. In some cases one arrangement may be more efficient in terms of the amount of memory
d d th ti i d t thused and the time required to scan the program.
Instruction MOSTlikely to be FALSE
Instruction LEASTlikely to be FALSE
Sequence series instructions from the most likely to be FALSE (far left) to least likely to be FALSE (far right)
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 81
Once a processor sees a FALSE input instruction in series, it executes the remaining instructions FALSE, even if they are TRUE
Arranging Instructions for Optimum Performance
If your rung contains parallel branches, place the path that is most often TRUE on the top. The processor will not look at the others unless the top path is FALSE.p p
Path most likely to be TRUE
LESS likely
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 82
LEAST likely
42
Writing a Program from a Narrative Description
Description :A simple drilling operation 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. Thisprecaution will ensure that the operator's hands are not in the way of the drill.
PB1 PB2Drillmotor
Switches
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 83
Part sensor
Writing a Program from a Narrative Description
Description :A simple drilling operation 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. Thisprecaution will ensure that the operator's hands are not in the way of the drill.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 84
PB1 and PB2 and the partsensor must be activated to make the drill motor operate.
43
Example: Motorized Overhead Garage Door
A motorized overhead garage door is to be operated automatically to preset open and closed positions.pos t o s
Devices used: see next slides Solution: sequence of operations when the up button is pushed, the up motor contactor
energizes and the door travels upwards until the up limit switch is actuated;
When the down button is pushed, the down motor t t i d th d t l d til th
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 85
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
Description :A motorized overhead garage door is to be operated automatically to presetopen and closed positions.
Motorized Door Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 86
44
Motorized Door Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 87
Example: Continuous Filling Operation
A continuous filling operation requires boxes moving on a conveyor to be automatically positioned and filled. Solution:pos t o ed a d ed So ut o 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 and energize the STANDBY light when the right edge of the box is first sensed by the photosensor; with the box in position and the conveyor stopped open
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 88
with the box in position and the conveyor stopped, open the solenoid valve and allow the box to be fill; filling should stop when the LEVEL sensor goes true; energize FULL light when the box is full; the FULL should remain energized until the box is moved clear of the photosensor.
45
Continuous Filling Operation Program
Description :A continuous filling operation requires boxes moving on a conveyor to beautomatically positioned and filled.
HooperPL RunPL
PL
PL
Run
Standby
FullSolenoid
Levelswitch
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 89
MotorPhotoswitch
STARTSTOP
Continuous Filling Operation Program
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 90
46
Assignments
Chapter 6 (PLC) book: Problems
See PLC-Problem-Set1 pdf file on the course See PLC Problem Set1 pdf file on the course web page.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 91