SlideShare a Scribd company logo
1 of 21
PLC: Timers and Counters
1
2
Function Blocks
• There are several types of function blocks in
ladder programming that implement:
 Logic operations (AND, OR, NOT, etc.).
 Math operations (addition, multiplication, etc.)
 Timers.
 Counters.
• In the following slides, we study different types of
timers and counters in PLC ladder programming.
3
Timers
• Timers are used to operate devices for certain period
of time.
• PLC contains three basic types of timers:
1- On-delay timer (TON)
2- Off-delay timer (TOF)
3- Pulse-timer (TP)
Timers
4
ON-Delay Timer
5
6
ON-Delay Timer
• When the input IN changes from 0 to 1, the output Q changes
from 0 to 1 after a time interval set at PT (preset time). During
this interval, ET outputs the elapsed time.
• If IN is 0 before ET reaches the preset time, the elapsed time
becomes 0.
• If IN is 0 after Q is 1, Q will be 0.
Example 1 (LG)
Develop the ladder logic that will turn on an output
light, 5 seconds after switch A has been turned on.
7
Example 2
(Siemens)
• In this example, when input I0.3 turns on, timer T37 begins timing.
• T37 has a time base (resolution) of 100 ms (0.1 seconds). The preset
time (PT) value has been set to 150. This gives 15 seconds delay (150
x 100 ms).
• Therefore, 15 seconds after the I0.3 contact closes, timer output
becomes a logic 1, and output coil Q0.1 turns on. If the switch opens
before 15 seconds has elapsed, the elapsed time (ET) resets to 0.
8
9
Off-Delay Timer
In Off-Delay timer, if the input IN turned off
(change from 1 to 0), the timer waits for a
certain time interval and then turns off its
output Q.
Pulse Timer
10
11
Pulse timer
• If IN is changes from 0 to 1, Q becomes 1 during
the preset time, and if ET reaches PT, Q becomes
0 automatically.
• Elapsed time ET increases when IN is 1 and holds
the value when it reaches PT and becomes 0
when IN is 0.
• It does not matter whether IN is 0 or 1 while the
output Q is 1.
12
Counters
• PLC counter instructions keep track of events. As it
counts, a counter instruction compares an
accumulated count value to a preset value to
determine when the desired count has been
reached.
• Counters can be used to start an operation when a
count is reached or to prevent an operation from
occurring until a count has been reached.
13
Counters
Types of counters in PLC:
1 Up counter (CU)
2 Down counter (CD)
3 Up-down counter (CUD)
Up counter (CTU)
14
15
Up counter (CTU)
• PV (preset value) is the count value to be stored in the
counter.
• Up counter CTU increases CV (current value) by 1 when input
CU changes from 0 to 1 (i.e. positive edge).
• Output Q is 1 when CV ≥ PV.
• When reset input R is 1, CV is cleared (becomes 0).
Example 3
In this example, Out1 will turn on after switch In2 has been
closed 10 times. Push button In1 will reset the counters.
16
Down Counter (CTD)
• The down counter starts its counts from a value PV.
• PV is loaded to CV (current value) using the input LD.
• Each time a positive edge occurs on CD (count down)
terminal the CV is decremented by one.
• If CV <= 0, Q turns on.
17
Up/Down Counter (CTUD)
• Every +ve edge on CU increment CV by 1.
• Every +ve edge on CD decrement CV by 1.
• R: reset the counter
• LD: load CV with the value PV.
CV QD QU
CV <= 0 1 0
CV >= PV 0 1
18
Example 4
A counter might be used to keep track of the items in
an inventory storage area.
19
20
Example 4, continued
• In the previous slide, Counter C48 is reset to zero when contact I0.2 closes.
This could be triggered automatically or manually to indicate that the storage
location is empty.
• When contact I0.0 closes, the counter counts up by 1. This could be triggered
by a proximity switch sensing that an item has been placed in the storage
location.
• When contact I0.1 closes, the counter counts down by 1. This could be
triggered by a proximity switch sensing that an item has been removed from
the storage location.
• When the accumulated count reaches 150, the counter turns on, contact C48
closes, and output Q0.1 turns on. This could trigger other logic in the program
to divert new items to another location until an item is removed from this
location.
21
PLC Tutorial
Please check the following link for a nice tutorial
on designing ladder diagrams using animation:
http://www.wisc-online.com/objects/ViewObject.aspx?ID=IAU3106

More Related Content

Similar to Logic and Distributed Control Systems (PLC timer and counter).pptx

10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 

Similar to Logic and Distributed Control Systems (PLC timer and counter).pptx (20)

Timing & Control.pptx
Timing & Control.pptxTiming & Control.pptx
Timing & Control.pptx
 
Counters
CountersCounters
Counters
 
Counters
CountersCounters
Counters
 
digital Counter
digital Counterdigital Counter
digital Counter
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
 
Presentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxPresentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptx
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - Counters
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - Counters
 
17 registers
17 registers17 registers
17 registers
 
Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
4 bit Binary counter
4 bit Binary counter4 bit Binary counter
4 bit Binary counter
 
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
 
Timers of 8051
Timers of 8051Timers of 8051
Timers of 8051
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
PLC: Controladores Lógicos Programables
PLC: Controladores Lógicos ProgramablesPLC: Controladores Lógicos Programables
PLC: Controladores Lógicos Programables
 
Counters r012
Counters  r012Counters  r012
Counters r012
 
Digital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptxDigital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptx
 
Chapter#8
Chapter#8Chapter#8
Chapter#8
 

More from DrAyyarKandasamy

More from DrAyyarKandasamy (15)

Supply systems for Electric Traction.ppt
Supply systems for Electric Traction.pptSupply systems for Electric Traction.ppt
Supply systems for Electric Traction.ppt
 
Electric Traction Current Collection System.ppt
Electric Traction Current Collection System.pptElectric Traction Current Collection System.ppt
Electric Traction Current Collection System.ppt
 
TRACTION MOTORS in Electric Traction.ppt
TRACTION MOTORS in Electric Traction.pptTRACTION MOTORS in Electric Traction.ppt
TRACTION MOTORS in Electric Traction.ppt
 
Power Plant Instrumentation FBC BOILERS.pptx
Power Plant Instrumentation FBC BOILERS.pptxPower Plant Instrumentation FBC BOILERS.pptx
Power Plant Instrumentation FBC BOILERS.pptx
 
Biomedical Instrumentation auto analyser.pptx
Biomedical Instrumentation auto analyser.pptxBiomedical Instrumentation auto analyser.pptx
Biomedical Instrumentation auto analyser.pptx
 
UNIT III - SIGNAL CONDITIONING CIRCUITS.pptx
UNIT III - SIGNAL CONDITIONING CIRCUITS.pptxUNIT III - SIGNAL CONDITIONING CIRCUITS.pptx
UNIT III - SIGNAL CONDITIONING CIRCUITS.pptx
 
Process Flow Diagram and P&I Diagram.pptx
Process Flow Diagram and P&I Diagram.pptxProcess Flow Diagram and P&I Diagram.pptx
Process Flow Diagram and P&I Diagram.pptx
 
PLC Structured Text (ST) Programming.pptx
PLC Structured Text (ST) Programming.pptxPLC Structured Text (ST) Programming.pptx
PLC Structured Text (ST) Programming.pptx
 
Remote Terminal Unit (RTU) in SCADA.pptx
Remote Terminal Unit (RTU) in SCADA.pptxRemote Terminal Unit (RTU) in SCADA.pptx
Remote Terminal Unit (RTU) in SCADA.pptx
 
UNIT – III – AGREEMENTS AND LEGISLATIONS.pptx
UNIT – III – AGREEMENTS AND LEGISLATIONS.pptxUNIT – III – AGREEMENTS AND LEGISLATIONS.pptx
UNIT – III – AGREEMENTS AND LEGISLATIONS.pptx
 
UNIVERSAL VALUES AND ETHICS (UHVE)-II.pptx
UNIVERSAL VALUES AND ETHICS (UHVE)-II.pptxUNIVERSAL VALUES AND ETHICS (UHVE)-II.pptx
UNIVERSAL VALUES AND ETHICS (UHVE)-II.pptx
 
Cyclone Furnace in power plant instrumentation.pptx
Cyclone Furnace in power plant instrumentation.pptxCyclone Furnace in power plant instrumentation.pptx
Cyclone Furnace in power plant instrumentation.pptx
 
parametric methods System Identification.pptx
parametric methods System Identification.pptxparametric methods System Identification.pptx
parametric methods System Identification.pptx
 
Three Phase Transformer Connections.pptx
Three Phase Transformer Connections.pptxThree Phase Transformer Connections.pptx
Three Phase Transformer Connections.pptx
 
RGA.pptx
RGA.pptxRGA.pptx
RGA.pptx
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

Logic and Distributed Control Systems (PLC timer and counter).pptx

  • 1. PLC: Timers and Counters 1
  • 2. 2 Function Blocks • There are several types of function blocks in ladder programming that implement:  Logic operations (AND, OR, NOT, etc.).  Math operations (addition, multiplication, etc.)  Timers.  Counters. • In the following slides, we study different types of timers and counters in PLC ladder programming.
  • 3. 3 Timers • Timers are used to operate devices for certain period of time. • PLC contains three basic types of timers: 1- On-delay timer (TON) 2- Off-delay timer (TOF) 3- Pulse-timer (TP)
  • 6. 6 ON-Delay Timer • When the input IN changes from 0 to 1, the output Q changes from 0 to 1 after a time interval set at PT (preset time). During this interval, ET outputs the elapsed time. • If IN is 0 before ET reaches the preset time, the elapsed time becomes 0. • If IN is 0 after Q is 1, Q will be 0.
  • 7. Example 1 (LG) Develop the ladder logic that will turn on an output light, 5 seconds after switch A has been turned on. 7
  • 8. Example 2 (Siemens) • In this example, when input I0.3 turns on, timer T37 begins timing. • T37 has a time base (resolution) of 100 ms (0.1 seconds). The preset time (PT) value has been set to 150. This gives 15 seconds delay (150 x 100 ms). • Therefore, 15 seconds after the I0.3 contact closes, timer output becomes a logic 1, and output coil Q0.1 turns on. If the switch opens before 15 seconds has elapsed, the elapsed time (ET) resets to 0. 8
  • 9. 9 Off-Delay Timer In Off-Delay timer, if the input IN turned off (change from 1 to 0), the timer waits for a certain time interval and then turns off its output Q.
  • 11. 11 Pulse timer • If IN is changes from 0 to 1, Q becomes 1 during the preset time, and if ET reaches PT, Q becomes 0 automatically. • Elapsed time ET increases when IN is 1 and holds the value when it reaches PT and becomes 0 when IN is 0. • It does not matter whether IN is 0 or 1 while the output Q is 1.
  • 12. 12 Counters • PLC counter instructions keep track of events. As it counts, a counter instruction compares an accumulated count value to a preset value to determine when the desired count has been reached. • Counters can be used to start an operation when a count is reached or to prevent an operation from occurring until a count has been reached.
  • 13. 13 Counters Types of counters in PLC: 1 Up counter (CU) 2 Down counter (CD) 3 Up-down counter (CUD)
  • 15. 15 Up counter (CTU) • PV (preset value) is the count value to be stored in the counter. • Up counter CTU increases CV (current value) by 1 when input CU changes from 0 to 1 (i.e. positive edge). • Output Q is 1 when CV ≥ PV. • When reset input R is 1, CV is cleared (becomes 0).
  • 16. Example 3 In this example, Out1 will turn on after switch In2 has been closed 10 times. Push button In1 will reset the counters. 16
  • 17. Down Counter (CTD) • The down counter starts its counts from a value PV. • PV is loaded to CV (current value) using the input LD. • Each time a positive edge occurs on CD (count down) terminal the CV is decremented by one. • If CV <= 0, Q turns on. 17
  • 18. Up/Down Counter (CTUD) • Every +ve edge on CU increment CV by 1. • Every +ve edge on CD decrement CV by 1. • R: reset the counter • LD: load CV with the value PV. CV QD QU CV <= 0 1 0 CV >= PV 0 1 18
  • 19. Example 4 A counter might be used to keep track of the items in an inventory storage area. 19
  • 20. 20 Example 4, continued • In the previous slide, Counter C48 is reset to zero when contact I0.2 closes. This could be triggered automatically or manually to indicate that the storage location is empty. • When contact I0.0 closes, the counter counts up by 1. This could be triggered by a proximity switch sensing that an item has been placed in the storage location. • When contact I0.1 closes, the counter counts down by 1. This could be triggered by a proximity switch sensing that an item has been removed from the storage location. • When the accumulated count reaches 150, the counter turns on, contact C48 closes, and output Q0.1 turns on. This could trigger other logic in the program to divert new items to another location until an item is removed from this location.
  • 21. 21 PLC Tutorial Please check the following link for a nice tutorial on designing ladder diagrams using animation: http://www.wisc-online.com/objects/ViewObject.aspx?ID=IAU3106