UNIT 4 – Programmable Logic
Controller (PLC)
PLC video links
• https://www.youtube.com/watch?v=zEcAQZQ
8DGQ&list=PLGoZgwDrvRy92QyXIackQ0xv8pH
R5YQjZ
• Engineering graphics – M senthil kumar
Programmable Logic Controllers
(Definition according to NEMA standard ICS3-1978)
• A digitally operating microprocessor based
electronic apparatus
• which uses a programming memory for the
internal storage of user oriented instructions
• for implementing specific functions such as
logic, sequencing, timing, counting and
arithmetic
• In order to control various types of machines
or processes
• through digital or analog modules (I/O).
National Electrical Manufacturing Association (NEMA)
Inputs
Outputs
Program
Inputs
Outputs
Power
Supply
S.No Microcontroller PLC
1 Used for any type of
application
It is a special microcontroller
designed for
industrial application
2 Microcontroller
works with electronic
devices. Ex: Transistor
It will also work with
relays
PLC works with power devices.
Ex :relays,
3 It doesn’t work as a
stand alone controller
but it came as a part of
electronic circuit or
device
PLC is a stand alone controlling
device
that can be programmed for
any process.
4 I/O ports in MC is less I/O ports in PLC is more
5 Microcontroller is a chip PLC = number of chips
Historical Background
• The Hydramatic Division of the General
Motors Corporation specified the design
criteria for the first programmable controller in
1968
• Their primary goal
• To eliminate the high costs associated
with inflexible, relay-controlled systems.
Simple PLC
network digital inputs
digital outputs
analog inputs / outputs
example: turbine control (in the test lab)
Types of PLC
Box Type /Unitory/
Compact PLC
Modular or Rack Type PLC
PLC: Location in the control
architecture Enterprise Network
directly connected
I/O
Control Bus
(e.g. Ethernet)
Engineer
station
I/O
I/O
I/O
I/O
CPU
Sensor Bus (e.g. ASI)
Field Bus
gateway
Field Stations
Control Station
with Field Bus
direct I/O
I/O
Field Devices
FB
gateway
gateway
I/O
I/O
I/O
I/O
CPU
COM
I/O
I/O
I/O
COM
CPU
COM
COM
COM
I/O
Field Bus
CPU
COM
2
I/O
I/O
I/O
CPU
COM1
COM
2
I/O
CPU
Operator
station
large
PLCs
small PLC
PLC
PLC
COM1
COM1
Supervisor
Station
data concentrators,
not programmable,
but configurable
Handheld PLC device
Software
Structure of PLC
Structure of PLC
Architecture
PLC Operation
PHASE 2
Program
Execution
PHASE 3
Diagnostics/
Comm
PHASE 4
Output
Scan
PHASE 1
Read Inputs
Scan
PLC Operation
PHASE 1 – Input Status scan
A PLC scan cycle begins with the CPU reading the
status of its inputs.
PHASE 2– Logic Solve/Program Execution
The application program is executed using the status of the
inputs
PHASE 3– Diagnostics
Once the program is executed, the CPU performs diagnostics
and communication tasks
PHASE 4 - Output Status Scan
An output status scan is then performed, whereby the stored
output values are sent to actuators and other field output
devices. The cycle ends by updating the outputs.
Inputs and Outputs Devices
• Push Buttons
• Proximity switches
• Photoelectric sensors
• Temperature sensors
• Pressure sensors
• Motors
• Solenoids
• Indicator lamps
• Resistive loads
• Contactors
Inputs Outputs
Push button Photo Sensor Pressure
Sensor
Motor
CONTROL DEVICES
1) Mechanical control - cam, governor, etc.,
2) Pneumatic control - compressed air, valves,
etc. (Electro-Pneumatics)
3) Electromechanical control - switches, relays, a
timer, counters, etc,
4) Electronics control - similar to
electromechanical control, except uses
electronic switches.
Example Process
Sensors,
Emergency
Shut off
Solenoids
PLC
(programmable
logic controller)
All Input
Devices
All Output
Devices
PLC
PLC
INPUTS
OUTPUTS
MOTOR
LAMP
CONTACTOR
PUSHBUTTONS
Example: Process Safety
Pressure Emergency Release
Solenoid
Counter
Pressure
Sensor
10 Second
Timer
Pressure
Release
Valve
Relief Valve vs Safety Valve
Areas of Application
 Manufacturing / Machining
 Food / Beverage
 Metals
 Power
 Mining
 Petrochemical / Chemical
Applications of PLC
• Coin-Operated
Carwash
• Conveyor
Diverter Control
• Greenhouse
Irrigation
• Lumber Mill
Operation
• Oil recovery
systems
Advantages & Disadvantages
Leading Brands Of PLC
AMERICAN 1. Allen Bradley (Rockwell Software RSLogix500)
2. Gould Modicon (Modsoft)
3. Texas Instruments (Simatic)
4. General Electric (LogicMaster6
5. Westinghouse
6. Cutter Hammer
7. Square D (PowerLogic)
EUROPEAN 1. Siemens
2. Klockner & Mouller
3. Festo
4. Telemechanique (Modicon TSX Micro)
JAPANESE 1. Toshiba
2. Omron (Syswin)
3. Fanuc
4. Mitsubishi
• (a) Mitsubishi,
• (b) Siemens,
• (c) Allen-Bradley,
• (d) Telemecanique notations for the
addresses.
Programming Device
• Also known as:
 Industrial Terminal ( Allen Bradley )
 Program Development Terminal ( General Electric )
 Programming Panel ( Gould Modicon )
 Programmer ( Square D )
 Program Loader ( Idec-Izumi )
 Programming Console ( Keyence / Omron )
Ladder Logic / Programming in PLC
Read real world inputs
Evaluate ladder
Write real world outputs
PLC Programming Techniques
• LD – ladder Diagram
• SFC - Sequential Flow chart
• FBD – Functional Block diagram
• ST – Structural Text
• IL – Instructional List
SFC
FBD
ST
IL
PROGRAMMING
• Ladder logic uses a
variety of programming
symbols
• Power always flows from
left to right
• Output devices are in the
ON state if power flows
through them
Normally Closed
Contact
Normally Open
Contact
Output Device
or Coil
Power rails
Ladder Logic
make contact
break contact
relay coil
Special Instruction
Power flows when the
input device is on
Power flows when the
input device is off
True/False
Ladder diagram used to write PLC
program
Ladder Logic
Normally Open Pushbutton
Normally Closed Pushbutton
Normally Open switch
Normally Closed switch
Normally Open contact
Normally closed contact
Ladder Logic / Programming in PLC
• Outputs “energize” when rung conditions
preceding them are “True”
• When Input 1 is True, Output 1 is energized.
IF THEN
Ladder Logic / Programming in PLC
• Compare a
circuits
diagram to a
ladder logic
diagram
Relay
Button Motor
24 V DC
Input
Button
Power Rails
Motor
• Boxes
• Boxes represent various instructions or
functions that are Executed when power
flows to the box.
• Some of these Functions are timers,
counters and math operations.
Ladder diagram
Ladder Logic
Rung 1
Rung 2
Rung 3
Rung 4
Power Rails
Ladder is evaluated (scanned)
starting from the top rung, left to
right, followed by the next rung,
and so on, until the bottom is
reached. Then starts again at the
top.
List of items required when
working with PLCs
1. Programming Terminal - laptop or desktop PC.
2. PLC Software. PLC manufacturers have their own
specific software and license key.
3. Communication cable for connection from Laptop
to PLC.
4. Backup copy of the ladder program (on diskette,
CDROM, hard disk, flash memory). If none, upload it
from the PLC.
5. Documentation- (PLC manual, Software manual,
drawings, ladder program printout, and Seq. of
Operations manual.)
Ladder Logic
make contact
break contact
relay coil
Special Instruction
Power flows when the
input device is on
Power flows when the
input device is off
True/False
Ladder Logic
Button
Motor
Motor
Motor
On lamp
(Green)
Off lamp
(RED)
Motor output
Lamp for power
applied
Lamp for power
not applied
Contacts
PLC operation example
Mnemonics in PLC
The study and development of systems for
improving and assisting the memory. -
நினைவூட்டல்
B - Sub circuit
LOGIC GATES
Logical functions in PLC
Truth Table for Logic gates
Procedure to Write in Exams
1. Introduction about the logic gate with the
symbol.
2. Write and explain the TT with true/false as
theory part.
3. Draw and explain the electrical diagram
4. Ladder diagram
5. Explanation of Mnemonics in detail.
6. General Applications if any.
Headings must be
• Introduction
• Truth table
• Description for Electrical diagram
• Ladder diagram
• Timing I/O diagram (if possible)
• Program/Mnemonics explanation
AND OR NOT NAND NOR EXOR EXNOR
Logic
Diagrams
Truth table
IC number
IC
7408
IC 7432 IC 7404 IC 7400 IC 7402 IC 7486 IC 74266
Switch
diagram
(Electrical)
Ladder
diagram
(PLC)
Mnemonics
PLC AND LOGIC
PLC OR LOGIC
PLC NOT LOGIC
PLC NAND LOGIC
PLC NOR LOGIC
PLC Exclusive OR (XOR) LOGIC
PLC Exclusive NOR (XNOR) LOGIC
AND/OR Combination Logic
Ladder Diagrams
Binary combinations are expressed by series and parallel relay contact:
+ 01 02
50
Coil 50 is active (current flows) when 01 is active and 02 is not.
01
02 50
Series
+ 01
40
02
Coil 40 is active (current flows) when 01 is active or 02 is not.
Parallel
Ladder Diagrams representation “logic" equivalent
01
02 40
Simplification of Ladder diagrams
Simplification of Ladder diagrams
Simplification of Ladder diagrams
• It is illegal due
to the reverse
power flow.
• In figure a, the
upper block is
shorter than
lower block.
• It legal by
switching
them.
Ladder Diagrams Example
01 02
50
01
02
03 50
03
relay coil
(bobine)
break contact
(contact repos)
make contact
(contact travail)
corresponding
ladder diagram
origin:
electrical
circuit
50 05
44
rung
"coil" 50 is used to move
other contact(s)
SEQUENCER
• Sequencers are used with machines or
processes involving repeating operating
cycles which can be segmented into steps.
Sequencing using PLC
(Cylinder Sequencing)
B-
B+
A-
A+
a-
a+
b-
b+
Relays
+
+
-
-
Relay Operation
Relay Operation
Basic Relay Symbols
Internal Relays
• These do not receive signals from the outside
world nor do they physically exist.
• They are simulated relays and are what enables a
PLC to eliminate external relays.
• There are also some special relays that are
dedicated to performing only one task. Some are
always on while some are always off.
• Some are on only once during power-on and are
typically used for initializing data that was stored.
Internal Relay
Latching
• Latching is the term for
a self-maintaining
circuit.
• Machine keep running
even after the start
button has stopped
being depressed.
• A latch is like a sticky
switch – when pushed
it will turn on, but stick
in place, it must be
pulled to release it and
turn it off.
Start button
Motor
Motor
Stop
button
Timers and Counters
Timers
Timers and its Types
• Two basic types of timers in
PLCs:
1. On-delay timers
2. Off-delay timers
Clock
Accumulator
contact
reset
output
Register
Contact
As an example, a certain step in the
manufacturing process is to begin 30
seconds after a signal is received from a
limit switch. The 30-second delay is the
on-delay timer's preset value.
Timers and Types
Delay-off timer example
• When the input start,
the output energized
and the timer start.
• The output contacts
latch the input and
keep the output ON.
• After the preset time,
the timers come ON
and breaks the latch
circuit, so switching
the output OFF
For example, for an external cooling fan on a
motor. The fan is to run all the time the motor
is running and for five minutes after motor is
turned off. This is a five-minute off-delay timer.
The five-minute timing cycle begins when the
motor is turned off.
Timers Example
Example
Examples
Example : Solenoid actuated door-lock
• Solenoid actuated when:
(i) ON signal from number-pad outside door
(ii) ON signal from door-open switch inside door
• Solenoid ON for 5 sec, then OFF.
While O:0/1 remains ON,
Timer COUNTS DOWN from PRESET
COUNT DOWN = 0  ( T4:1) set to ON
Example for Timers
 Done bit (DN),
 Enable bit (EN)
 Reset (RES) (RST)
 Accumalated value: The values are counting is displayed
from zero. Value becomes zero whenever the timer is reset
Cascaded Timers
A succession of devices or stages in a process, each of which triggers or initiates the next
Retentive Timer
• Retain the previous value.
• Retain the accumulated value even during
Power loss.
• Ex: Each time the motor is turned off, the
timer will remain motor’s elapsed running
time.
• When the push bottom PB1 is pressed, the timer starts working and the
reading starts accumulating.
• When we push the PB1 button then rung become false and the timer
stops working. Consider we are switching ON the push after a time, the
timer starts counting from the previous value before the timer is stopped.
• We have to add another switch PB2 to reset the values in the timer.
Retentive timer
Example: Industrial Mixer
• Filled with liquid
• Heated
• Mix for 10 minutes.
Sequential Function Chart
State 2
State 1
State 3 Rotate
Heat
Fill with
liquid
Level full switch
Timer
Temperature Switch
Switch / Simple electrical diagram
University Problem on PLC
14 b) Develop the ladder logic to fill the tank.
• (i) Fill the tank up to 80%. When the tank is
filled, turn ON the heater to raise the
temperature up to 70 deg.
• (ii) When this temperature is reached, turn
OFF the heater and open the outlet valve.
• (iii) When the level in the tank falls below
10%, close the outlet valve.
Sequential Function Chart
State 2
State 1
State 3 Open Outlet Valve
Heat
Fill with
liquid
Level 80% switch
Level 10% switch
Temperature Switch
State 4 Close Outlet Valve
Switch / Simple electrical diagram
Solenoid
Valve
80%
Level 10%
floater
Solenoid
for Outlet
Valve
Part C AU problem on Timers
• Design a PLC circuit that can be used to start a
motor and then after a delay of 100s start a
pump when the motor is switched off there
should a delay of 10s before the pump is
switched off. (Nov/Dec 2020 & 2021)
Sample Answer
University Problem based on Timers
14 (a) Draw a ladder diagram for two motor
system having following conditions:
• (i) Starting push button starts motor 1
• (ii) After 10 seconds, motor – 2 is ON
• (iii) Stopping the switch stops motor 1 and 2
(Time base 1 sec). Nov/Dec 2021
Sample Answer
Stop Motor 1
Motor 2
Motor 1
Counters
• Count the number of occurrences of an event
• Examples:
– Pallet loading in factory
• After 10 parts arrive on conveyor, worker comes to load pallet
– Pneumatic press hammer
• Hit the part 20 times, then wait for part to be unloaded
– Rice cooker alarm
• Beep 5 times when rice is cooked
Counters
Register
Accumulator
contact
input
reset
output
Types of Counters
a. Counter up (CTU)
b.Counter down (CTD)
c.Counter reset (CTR)
Representation of Counters in
Boolean Programming
Counters example
Example
• Consider the problem of control for a machine
which required to direct 6 items along one
path for packaging in a box and then 12 items
along another path for packaging in another
box.
• Draw the ladder diagram and Write down the
mnemonics for it.
Example
• Input 1 closes its contacts to
start the counting cycle,
resetting both counters.
• Counters 1 start to count pulses
in input2, it counts 6 items and
then closes its contact.
• This activates the output,
closes one path and start
another. when counter 2 has
counted 12 items it reset both
counters and opens counter 1
contacts.
1
Output 2
Counter 2
1
Example
• Pallet loading in factory
– After 4 parts arrive on conveyor
– STOP conveyor belt
– Turn ON the indicator light
/OFF
Shift Register
Shift Register
Shift Register
• Imagine an ice-cream cone
machine. We have 4 steps.
• First
– we verify the cone is not broken.
– Next we put ice cream inside the
cone (turn on output 500)
– Next we add peanuts.(turn on output
501)
– And finally we add sprinkles.(turn on
output 502)
• If the cone is broken we
obviously don't want to add
ice cream and the other items.
Shift Register
• Therefore we have to track the
bad cone down our process line
so that we can tell all the
machine not to add each item.
• We use a sensor to look at the
bottom of the cone.(input 0000)
If its on then the cone is perfect
and if its off then the cone is
broken.
• An encoder tracks the cone
going down the conveyor (input
0001) A push button on the
machine will clear the
register.(input 0002)
Shift register Example
Shift Register
• Here's what the 1000 series register (the
register we're shifting) looks like initially:
Shift register applications
• Tracking parts in an assembly line
• Controlling machine operations
• Inventory counter
• System diagnostics
Master and Jump control
Master Control
• Master controls can be thought of as
"emergency stop switches”.
• But this instruction isn’t a substitute for a
"hard wired" e-stop switch. There is no
substitute for such a switch!
Master and Jump control
• MC/MCS – Master
control Set
• MCR – Master Control
reset
Master Control
• Rungs 2 and 3 are only
executed when input 0000
is on(true).
• If input 0000 is not true the
plc pretends that the logic
between the MC and MCR
instructions does not exist.
Master Control
• When input 0000 is false,
inputs 0001 and 0002 are
forced off regardless if
they're physically on or off.
• MCR just tells the PLC
"that's the end of the
MC/MCR block.
Note: Timers should not be used inside the MC/MCR block because some manufacturers will
reset them to zero when the block is false whereas other manufacturers will have them retain
the current time state.
Master and Jump control Example
• An OUTB (OutBar or OutNot) instruction would not be
physically on. It is forced physically off.
• If the MC/MCR block were not there 0500 would be physically on
only when input 0001 was false(physically off). But since the
MC/MCR block is there, this happens only when input 0000 is true.
• When input 0000 is false it is impossible for 0500 above to be on.
Jump Control
• Conditional
jump function
enables
programs to be
designed so
that if a certain
condition exists
then a section
of the program
is jumped.
Data Handling
Data Movement
Data Movement
DATA Movement
LDA - LoaD Accumulator
STA - STore Accumulator
DIFU - differentiate up/down – NO/NC
Data Movement
• Copy File Instruction (COP) :
– Output instruction that copies a user-defined
group of 16-bit data file words
DATA conversion
• What is BCD
Understanding BCD: Write BCD of 89351
Answer : 1000 1001 0011 0101 0001
DATA conversion
• TOD (value,destination) -
convert from BCD to 2s
compliment
• FRD (value,destination) -
convert from 2s
compliment to BCD
• DEG (value,destination) -
convert from radians to
degrees
• RAD (value,destination) -
convert from degrees to
radians 2’s Compliment: The negative of a binary
number represented by switching all ones to
zeros and all zeros to ones and then adding
one to the result
BCD to Decimal conversion
(from 2’s compliment)
Decimal to BCD Conversion
Application of 2’s compliment
Data Comparison
Equal instruction:
• Test when two values are equal.
• Instruction is true when source A is equal to source B.
Not Equal Instruction (NEQ) :
Data Comparison
• The Less Than Instruction (LES)
• Less Than or Equal (LEQ)
Data Comparison
• Greater Than Instruction (GRT)
• Greater Than or Equal (GEQ)
Data Comparison
Data Comparison
Arithmetic operation
Addition operation
LDA - LoaD Accumulator
STA - STore Accumulator
DIFU - differentiate up/down – NO/NC
Math operations in PLC
• Square roots
• Scaling
• Sine
• Cosine
• Tangent
• Natural logarithm (ln / loge)
• Base 10 logarithm (log10)
• X^Y (X to the power of Y)
Selection of PLC
Selection of PLC
General Criteria
»Number of logical inputs and outputs.
»Memory
»Number of special I/O modules
»Scan Time
»Communications
»Software
Selection of PLC
PLC vs Computer
Pros and Cons of handheld
programming terminal
Pros and Cons of software
programming (PC) with PLC
Programmable Automation Controller
Coin Operated Car parking barrier
Coin Operated Car parking barrier
Problems on PLC
Unit 4 - PLC.pptx

Unit 4 - PLC.pptx

  • 1.
    UNIT 4 –Programmable Logic Controller (PLC)
  • 2.
    PLC video links •https://www.youtube.com/watch?v=zEcAQZQ 8DGQ&list=PLGoZgwDrvRy92QyXIackQ0xv8pH R5YQjZ • Engineering graphics – M senthil kumar
  • 3.
    Programmable Logic Controllers (Definitionaccording to NEMA standard ICS3-1978) • A digitally operating microprocessor based electronic apparatus • which uses a programming memory for the internal storage of user oriented instructions • for implementing specific functions such as logic, sequencing, timing, counting and arithmetic • In order to control various types of machines or processes • through digital or analog modules (I/O). National Electrical Manufacturing Association (NEMA)
  • 4.
  • 5.
  • 7.
    S.No Microcontroller PLC 1Used for any type of application It is a special microcontroller designed for industrial application 2 Microcontroller works with electronic devices. Ex: Transistor It will also work with relays PLC works with power devices. Ex :relays, 3 It doesn’t work as a stand alone controller but it came as a part of electronic circuit or device PLC is a stand alone controlling device that can be programmed for any process. 4 I/O ports in MC is less I/O ports in PLC is more 5 Microcontroller is a chip PLC = number of chips
  • 8.
    Historical Background • TheHydramatic Division of the General Motors Corporation specified the design criteria for the first programmable controller in 1968 • Their primary goal • To eliminate the high costs associated with inflexible, relay-controlled systems.
  • 10.
    Simple PLC network digitalinputs digital outputs analog inputs / outputs
  • 11.
    example: turbine control(in the test lab)
  • 12.
    Types of PLC BoxType /Unitory/ Compact PLC Modular or Rack Type PLC
  • 13.
    PLC: Location inthe control architecture Enterprise Network directly connected I/O Control Bus (e.g. Ethernet) Engineer station I/O I/O I/O I/O CPU Sensor Bus (e.g. ASI) Field Bus gateway Field Stations Control Station with Field Bus direct I/O I/O Field Devices FB gateway gateway I/O I/O I/O I/O CPU COM I/O I/O I/O COM CPU COM COM COM I/O Field Bus CPU COM 2 I/O I/O I/O CPU COM1 COM 2 I/O CPU Operator station large PLCs small PLC PLC PLC COM1 COM1 Supervisor Station data concentrators, not programmable, but configurable
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
    PLC Operation PHASE 2 Program Execution PHASE3 Diagnostics/ Comm PHASE 4 Output Scan PHASE 1 Read Inputs Scan
  • 20.
    PLC Operation PHASE 1– Input Status scan A PLC scan cycle begins with the CPU reading the status of its inputs. PHASE 2– Logic Solve/Program Execution The application program is executed using the status of the inputs PHASE 3– Diagnostics Once the program is executed, the CPU performs diagnostics and communication tasks PHASE 4 - Output Status Scan An output status scan is then performed, whereby the stored output values are sent to actuators and other field output devices. The cycle ends by updating the outputs.
  • 21.
    Inputs and OutputsDevices • Push Buttons • Proximity switches • Photoelectric sensors • Temperature sensors • Pressure sensors • Motors • Solenoids • Indicator lamps • Resistive loads • Contactors Inputs Outputs Push button Photo Sensor Pressure Sensor Motor
  • 23.
    CONTROL DEVICES 1) Mechanicalcontrol - cam, governor, etc., 2) Pneumatic control - compressed air, valves, etc. (Electro-Pneumatics) 3) Electromechanical control - switches, relays, a timer, counters, etc, 4) Electronics control - similar to electromechanical control, except uses electronic switches.
  • 24.
    Example Process Sensors, Emergency Shut off Solenoids PLC (programmable logiccontroller) All Input Devices All Output Devices PLC
  • 25.
  • 26.
    Example: Process Safety PressureEmergency Release Solenoid Counter Pressure Sensor 10 Second Timer Pressure Release Valve
  • 27.
    Relief Valve vsSafety Valve
  • 28.
    Areas of Application Manufacturing / Machining  Food / Beverage  Metals  Power  Mining  Petrochemical / Chemical
  • 29.
    Applications of PLC •Coin-Operated Carwash • Conveyor Diverter Control • Greenhouse Irrigation • Lumber Mill Operation • Oil recovery systems
  • 30.
  • 34.
    Leading Brands OfPLC AMERICAN 1. Allen Bradley (Rockwell Software RSLogix500) 2. Gould Modicon (Modsoft) 3. Texas Instruments (Simatic) 4. General Electric (LogicMaster6 5. Westinghouse 6. Cutter Hammer 7. Square D (PowerLogic) EUROPEAN 1. Siemens 2. Klockner & Mouller 3. Festo 4. Telemechanique (Modicon TSX Micro) JAPANESE 1. Toshiba 2. Omron (Syswin) 3. Fanuc 4. Mitsubishi
  • 35.
    • (a) Mitsubishi, •(b) Siemens, • (c) Allen-Bradley, • (d) Telemecanique notations for the addresses.
  • 36.
    Programming Device • Alsoknown as:  Industrial Terminal ( Allen Bradley )  Program Development Terminal ( General Electric )  Programming Panel ( Gould Modicon )  Programmer ( Square D )  Program Loader ( Idec-Izumi )  Programming Console ( Keyence / Omron )
  • 37.
    Ladder Logic /Programming in PLC Read real world inputs Evaluate ladder Write real world outputs
  • 38.
    PLC Programming Techniques •LD – ladder Diagram • SFC - Sequential Flow chart • FBD – Functional Block diagram • ST – Structural Text • IL – Instructional List
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
    PROGRAMMING • Ladder logicuses a variety of programming symbols • Power always flows from left to right • Output devices are in the ON state if power flows through them Normally Closed Contact Normally Open Contact Output Device or Coil Power rails
  • 45.
    Ladder Logic make contact breakcontact relay coil Special Instruction Power flows when the input device is on Power flows when the input device is off True/False
  • 46.
    Ladder diagram usedto write PLC program
  • 47.
  • 48.
    Normally Open Pushbutton NormallyClosed Pushbutton Normally Open switch Normally Closed switch Normally Open contact Normally closed contact
  • 50.
    Ladder Logic /Programming in PLC • Outputs “energize” when rung conditions preceding them are “True” • When Input 1 is True, Output 1 is energized. IF THEN
  • 51.
    Ladder Logic /Programming in PLC • Compare a circuits diagram to a ladder logic diagram Relay Button Motor 24 V DC Input Button Power Rails Motor
  • 52.
    • Boxes • Boxesrepresent various instructions or functions that are Executed when power flows to the box. • Some of these Functions are timers, counters and math operations.
  • 55.
  • 56.
    Ladder Logic Rung 1 Rung2 Rung 3 Rung 4 Power Rails Ladder is evaluated (scanned) starting from the top rung, left to right, followed by the next rung, and so on, until the bottom is reached. Then starts again at the top.
  • 57.
    List of itemsrequired when working with PLCs 1. Programming Terminal - laptop or desktop PC. 2. PLC Software. PLC manufacturers have their own specific software and license key. 3. Communication cable for connection from Laptop to PLC. 4. Backup copy of the ladder program (on diskette, CDROM, hard disk, flash memory). If none, upload it from the PLC. 5. Documentation- (PLC manual, Software manual, drawings, ladder program printout, and Seq. of Operations manual.)
  • 58.
    Ladder Logic make contact breakcontact relay coil Special Instruction Power flows when the input device is on Power flows when the input device is off True/False
  • 59.
    Ladder Logic Button Motor Motor Motor On lamp (Green) Offlamp (RED) Motor output Lamp for power applied Lamp for power not applied Contacts
  • 60.
  • 61.
    Mnemonics in PLC Thestudy and development of systems for improving and assisting the memory. - நினைவூட்டல்
  • 62.
    B - Subcircuit
  • 64.
  • 65.
  • 66.
    Truth Table forLogic gates
  • 67.
    Procedure to Writein Exams 1. Introduction about the logic gate with the symbol. 2. Write and explain the TT with true/false as theory part. 3. Draw and explain the electrical diagram 4. Ladder diagram 5. Explanation of Mnemonics in detail. 6. General Applications if any.
  • 68.
    Headings must be •Introduction • Truth table • Description for Electrical diagram • Ladder diagram • Timing I/O diagram (if possible) • Program/Mnemonics explanation
  • 69.
    AND OR NOTNAND NOR EXOR EXNOR Logic Diagrams Truth table IC number IC 7408 IC 7432 IC 7404 IC 7400 IC 7402 IC 7486 IC 74266 Switch diagram (Electrical) Ladder diagram (PLC) Mnemonics
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
    PLC Exclusive OR(XOR) LOGIC
  • 78.
    PLC Exclusive NOR(XNOR) LOGIC
  • 79.
  • 80.
    Ladder Diagrams Binary combinationsare expressed by series and parallel relay contact: + 01 02 50 Coil 50 is active (current flows) when 01 is active and 02 is not. 01 02 50 Series + 01 40 02 Coil 40 is active (current flows) when 01 is active or 02 is not. Parallel Ladder Diagrams representation “logic" equivalent 01 02 40
  • 81.
  • 82.
  • 83.
    Simplification of Ladderdiagrams • It is illegal due to the reverse power flow. • In figure a, the upper block is shorter than lower block. • It legal by switching them.
  • 84.
    Ladder Diagrams Example 0102 50 01 02 03 50 03 relay coil (bobine) break contact (contact repos) make contact (contact travail) corresponding ladder diagram origin: electrical circuit 50 05 44 rung "coil" 50 is used to move other contact(s)
  • 86.
    SEQUENCER • Sequencers areused with machines or processes involving repeating operating cycles which can be segmented into steps.
  • 87.
  • 93.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
    Internal Relays • Thesedo not receive signals from the outside world nor do they physically exist. • They are simulated relays and are what enables a PLC to eliminate external relays. • There are also some special relays that are dedicated to performing only one task. Some are always on while some are always off. • Some are on only once during power-on and are typically used for initializing data that was stored.
  • 100.
  • 102.
    Latching • Latching isthe term for a self-maintaining circuit. • Machine keep running even after the start button has stopped being depressed. • A latch is like a sticky switch – when pushed it will turn on, but stick in place, it must be pulled to release it and turn it off. Start button Motor Motor Stop button
  • 104.
  • 105.
  • 106.
    Timers and itsTypes • Two basic types of timers in PLCs: 1. On-delay timers 2. Off-delay timers Clock Accumulator contact reset output Register Contact As an example, a certain step in the manufacturing process is to begin 30 seconds after a signal is received from a limit switch. The 30-second delay is the on-delay timer's preset value.
  • 107.
  • 108.
    Delay-off timer example •When the input start, the output energized and the timer start. • The output contacts latch the input and keep the output ON. • After the preset time, the timers come ON and breaks the latch circuit, so switching the output OFF For example, for an external cooling fan on a motor. The fan is to run all the time the motor is running and for five minutes after motor is turned off. This is a five-minute off-delay timer. The five-minute timing cycle begins when the motor is turned off.
  • 109.
  • 110.
  • 111.
  • 112.
    Example : Solenoidactuated door-lock • Solenoid actuated when: (i) ON signal from number-pad outside door (ii) ON signal from door-open switch inside door • Solenoid ON for 5 sec, then OFF. While O:0/1 remains ON, Timer COUNTS DOWN from PRESET COUNT DOWN = 0  ( T4:1) set to ON
  • 113.
    Example for Timers Done bit (DN),  Enable bit (EN)  Reset (RES) (RST)  Accumalated value: The values are counting is displayed from zero. Value becomes zero whenever the timer is reset
  • 114.
    Cascaded Timers A successionof devices or stages in a process, each of which triggers or initiates the next
  • 115.
    Retentive Timer • Retainthe previous value. • Retain the accumulated value even during Power loss. • Ex: Each time the motor is turned off, the timer will remain motor’s elapsed running time.
  • 116.
    • When thepush bottom PB1 is pressed, the timer starts working and the reading starts accumulating. • When we push the PB1 button then rung become false and the timer stops working. Consider we are switching ON the push after a time, the timer starts counting from the previous value before the timer is stopped. • We have to add another switch PB2 to reset the values in the timer. Retentive timer
  • 118.
    Example: Industrial Mixer •Filled with liquid • Heated • Mix for 10 minutes.
  • 119.
    Sequential Function Chart State2 State 1 State 3 Rotate Heat Fill with liquid Level full switch Timer Temperature Switch
  • 120.
    Switch / Simpleelectrical diagram
  • 124.
    University Problem onPLC 14 b) Develop the ladder logic to fill the tank. • (i) Fill the tank up to 80%. When the tank is filled, turn ON the heater to raise the temperature up to 70 deg. • (ii) When this temperature is reached, turn OFF the heater and open the outlet valve. • (iii) When the level in the tank falls below 10%, close the outlet valve.
  • 125.
    Sequential Function Chart State2 State 1 State 3 Open Outlet Valve Heat Fill with liquid Level 80% switch Level 10% switch Temperature Switch State 4 Close Outlet Valve
  • 126.
    Switch / Simpleelectrical diagram Solenoid Valve
  • 127.
  • 128.
    Part C AUproblem on Timers • Design a PLC circuit that can be used to start a motor and then after a delay of 100s start a pump when the motor is switched off there should a delay of 10s before the pump is switched off. (Nov/Dec 2020 & 2021)
  • 129.
  • 130.
    University Problem basedon Timers 14 (a) Draw a ladder diagram for two motor system having following conditions: • (i) Starting push button starts motor 1 • (ii) After 10 seconds, motor – 2 is ON • (iii) Stopping the switch stops motor 1 and 2 (Time base 1 sec). Nov/Dec 2021
  • 131.
    Sample Answer Stop Motor1 Motor 2 Motor 1
  • 132.
    Counters • Count thenumber of occurrences of an event • Examples: – Pallet loading in factory • After 10 parts arrive on conveyor, worker comes to load pallet – Pneumatic press hammer • Hit the part 20 times, then wait for part to be unloaded – Rice cooker alarm • Beep 5 times when rice is cooked
  • 133.
  • 134.
    Types of Counters a.Counter up (CTU) b.Counter down (CTD) c.Counter reset (CTR)
  • 135.
    Representation of Countersin Boolean Programming
  • 136.
  • 137.
    Example • Consider theproblem of control for a machine which required to direct 6 items along one path for packaging in a box and then 12 items along another path for packaging in another box. • Draw the ladder diagram and Write down the mnemonics for it.
  • 138.
    Example • Input 1closes its contacts to start the counting cycle, resetting both counters. • Counters 1 start to count pulses in input2, it counts 6 items and then closes its contact. • This activates the output, closes one path and start another. when counter 2 has counted 12 items it reset both counters and opens counter 1 contacts. 1 Output 2 Counter 2 1
  • 139.
    Example • Pallet loadingin factory – After 4 parts arrive on conveyor – STOP conveyor belt – Turn ON the indicator light
  • 140.
  • 141.
  • 142.
  • 143.
    Shift Register • Imaginean ice-cream cone machine. We have 4 steps. • First – we verify the cone is not broken. – Next we put ice cream inside the cone (turn on output 500) – Next we add peanuts.(turn on output 501) – And finally we add sprinkles.(turn on output 502) • If the cone is broken we obviously don't want to add ice cream and the other items.
  • 144.
    Shift Register • Thereforewe have to track the bad cone down our process line so that we can tell all the machine not to add each item. • We use a sensor to look at the bottom of the cone.(input 0000) If its on then the cone is perfect and if its off then the cone is broken. • An encoder tracks the cone going down the conveyor (input 0001) A push button on the machine will clear the register.(input 0002)
  • 145.
  • 146.
    Shift Register • Here'swhat the 1000 series register (the register we're shifting) looks like initially:
  • 148.
    Shift register applications •Tracking parts in an assembly line • Controlling machine operations • Inventory counter • System diagnostics
  • 149.
  • 150.
    Master Control • Mastercontrols can be thought of as "emergency stop switches”. • But this instruction isn’t a substitute for a "hard wired" e-stop switch. There is no substitute for such a switch!
  • 151.
    Master and Jumpcontrol • MC/MCS – Master control Set • MCR – Master Control reset
  • 153.
    Master Control • Rungs2 and 3 are only executed when input 0000 is on(true). • If input 0000 is not true the plc pretends that the logic between the MC and MCR instructions does not exist.
  • 154.
    Master Control • Wheninput 0000 is false, inputs 0001 and 0002 are forced off regardless if they're physically on or off. • MCR just tells the PLC "that's the end of the MC/MCR block. Note: Timers should not be used inside the MC/MCR block because some manufacturers will reset them to zero when the block is false whereas other manufacturers will have them retain the current time state.
  • 155.
    Master and Jumpcontrol Example • An OUTB (OutBar or OutNot) instruction would not be physically on. It is forced physically off. • If the MC/MCR block were not there 0500 would be physically on only when input 0001 was false(physically off). But since the MC/MCR block is there, this happens only when input 0000 is true. • When input 0000 is false it is impossible for 0500 above to be on.
  • 156.
    Jump Control • Conditional jumpfunction enables programs to be designed so that if a certain condition exists then a section of the program is jumped.
  • 157.
  • 158.
  • 159.
  • 160.
    DATA Movement LDA -LoaD Accumulator STA - STore Accumulator DIFU - differentiate up/down – NO/NC
  • 161.
    Data Movement • CopyFile Instruction (COP) : – Output instruction that copies a user-defined group of 16-bit data file words
  • 162.
    DATA conversion • Whatis BCD Understanding BCD: Write BCD of 89351 Answer : 1000 1001 0011 0101 0001
  • 163.
    DATA conversion • TOD(value,destination) - convert from BCD to 2s compliment • FRD (value,destination) - convert from 2s compliment to BCD • DEG (value,destination) - convert from radians to degrees • RAD (value,destination) - convert from degrees to radians 2’s Compliment: The negative of a binary number represented by switching all ones to zeros and all zeros to ones and then adding one to the result
  • 164.
    BCD to Decimalconversion (from 2’s compliment)
  • 165.
    Decimal to BCDConversion
  • 169.
  • 170.
    Data Comparison Equal instruction: •Test when two values are equal. • Instruction is true when source A is equal to source B. Not Equal Instruction (NEQ) :
  • 171.
    Data Comparison • TheLess Than Instruction (LES) • Less Than or Equal (LEQ)
  • 172.
    Data Comparison • GreaterThan Instruction (GRT) • Greater Than or Equal (GEQ)
  • 173.
  • 174.
  • 175.
  • 176.
    Addition operation LDA -LoaD Accumulator STA - STore Accumulator DIFU - differentiate up/down – NO/NC
  • 177.
    Math operations inPLC • Square roots • Scaling • Sine • Cosine • Tangent • Natural logarithm (ln / loge) • Base 10 logarithm (log10) • X^Y (X to the power of Y)
  • 178.
  • 179.
    Selection of PLC GeneralCriteria »Number of logical inputs and outputs. »Memory »Number of special I/O modules »Scan Time »Communications »Software
  • 180.
  • 182.
  • 186.
    Pros and Consof handheld programming terminal
  • 187.
    Pros and Consof software programming (PC) with PLC
  • 192.
  • 198.
    Coin Operated Carparking barrier
  • 199.
    Coin Operated Carparking barrier
  • 202.