SlideShare a Scribd company logo
https://bin95.com Correct version of PLC Programming Example
LAD 2 - MAIN_PROG --- Total Rungs in File = 7
You are allow to share with others, attributions to https://BIN95.com
PLC Clock example by BIN95.com
This is a rung comment. The rung below is 60 second timer, followed by rungs that are counters driven by this timer. This is referred to as a
cascading programming methodology. You could design this PLC clock several different ways. We picked the most simplest for this example.
60 sec=minute, 60 min=hour, 24 hrs=day,365days=year
0000
I:0
0
Bul.1764
RUN
EN
DN
TON
Timer On Delay
Timer T4:0
Time Base 1.0
Preset 60<
Accum 40<
TON
SECONDS
https://bin95.com Correct version of PLC Programming Example
LAD 2 - MAIN_PROG --- Total Rungs in File = 7
You are allow to share with others, attributions to https://BIN95.com
This line of text is what a Page Title looks like.
If 60 seconds have elapsed, increment minute counter by 1.
(A "Page Title" is used when one particular subroutine has a lot of rungs, and you want to break them up [section off] for navigational purposes
and to speed troubleshooting. Programming documentation is more user friendly.)
0001
T4:0
DN
SECONDS/DN
CU
DN
CTU
Count Up
Counter C5:0
Preset 60<
Accum 59<
CTU
MINUTES
If 60 Minutes counter Done (60 min have elapsed), increment Hour counter by 1 AND Reset Minutes counter afterwards.
(In quiz version of this program, we were looking for you to spot that we where resetting counters before they had chance to increment
following cascaded counter. In this answer to quiz version of program we corrected that.)
0002
C5:0
DN
MINUTES/DN
CU
DN
CTU
Count Up
Counter C5:1
Preset 24<
Accum 22<
CTU
HOURS
RES
C5:0
MINUTES
If Hours counter Done (24 hours have elapsed), increment Day counter by 1 AND reset Hours counter afterwards.
0003
C5:1
DN
HOURS/DN
CU
DN
CTU
Count Up
Counter C5:2
Preset 365<
Accum 361<
CTU
DAYS
RES
C5:1
HOURS
If Days counter Done (365 days have elapsed), increment Year counter by 1 AND reset Days counter afterwards.
This rung/counter gives current years accumulated based on 365 days counted. We pre-plugged to year 2018. You might have expected a
rung(s) for "Current Month", like Jan, Feb etc., here (1-12), but for simplicity reasons we did not do that logic in the example. (As each month
has different number of days in to and would complicate logic more than we wanted to in this example.)
0004
C5:2
DN
DAYS/DN
CU
DN
CTU
Count Up
Counter C5:3
Preset 30000<
Accum 2018<
CTU
CURRENT_YEAR
RES
C5:2
DAYS
https://bin95.com Correct version of PLC Programming Example
LAD 2 - MAIN_PROG --- Total Rungs in File = 7
You are allow to share with others, attributions to https://BIN95.com
In the sequence of events, the last step after all counters are updated, is "If seconds timer done, reset the Seconds timer".
.
This is one way to correct problem found in our Quiz program that purposely did not work at https://www.slideshare.net/bin95/plcclock (Adam
Bowman was the first one to find the problem and give a detailed solutuion, congrats Adam.)
0005
T4:0
DN
SECONDS/DN
RES
T4:0
SECONDS
So in summary, in quiz example of this program (https://www.slideshare.net/bin95/plcclock), we were resetting everything too soon. (Scan cycle
is important to be aware of), in this example we corrected those intentional programming errors.
0006 END

More Related Content

PPTX
Resonance in R-L-C circuit
PPTX
maximum power transform
DOCX
industrial electronics notes by Ali Azam.
PPT
Superposition and norton Theorem
DOCX
Traffic light controller
DOCX
Battery level Indicator Circuit
PPTX
Dc dc converter
PPTX
voltage regulators
Resonance in R-L-C circuit
maximum power transform
industrial electronics notes by Ali Azam.
Superposition and norton Theorem
Traffic light controller
Battery level Indicator Circuit
Dc dc converter
voltage regulators

What's hot (20)

PPTX
Resonance in series and parallel circuits
PPTX
Automatic irrigation system
PDF
IR proximity sensor report file.
PPTX
ADC and DAC Best Ever Pers
PDF
90981041 control-system-lab-manual
PDF
Logic gate
DOCX
Security System using XOR & NOR
PPT
Surya
PPTX
Silicon controlled rectifier
PPTX
8051 MICROCONTROLLER ARCHITECTURE.pptx
PDF
RLC Series Resonance
DOCX
Light Emitting Diode Presentation Report
PPTX
8086 Microprocessor Pipeline Architecture.pptx
PPTX
Dynamic characteristics of thyristor
PPT
CMOS Logic Circuits
PPTX
Three phase power measurement using 2 wattmeter
PDF
lifi circuit.pdf
PPT
Ir sensor mechanism and interfacing with a micro controllers.PPT
PPTX
Voltage Amplifier
PPTX
Auto reclosers
Resonance in series and parallel circuits
Automatic irrigation system
IR proximity sensor report file.
ADC and DAC Best Ever Pers
90981041 control-system-lab-manual
Logic gate
Security System using XOR & NOR
Surya
Silicon controlled rectifier
8051 MICROCONTROLLER ARCHITECTURE.pptx
RLC Series Resonance
Light Emitting Diode Presentation Report
8086 Microprocessor Pipeline Architecture.pptx
Dynamic characteristics of thyristor
CMOS Logic Circuits
Three phase power measurement using 2 wattmeter
lifi circuit.pdf
Ir sensor mechanism and interfacing with a micro controllers.PPT
Voltage Amplifier
Auto reclosers
Ad

Similar to PLC Programming Example - PLC Clock - Answ (20)

PDF
A digital clock has six 7-segment LEDs to display the seconds, minut.pdf
DOCX
1 PageAlarm Clock Design Using PIC18F45E.docx
PDF
Elements of Industrial Automation Week 06 Notes.pdf
PDF
Digital Alarm Clock 446 project report
PDF
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
PDF
Advanced insrumentation lab manual
PPTX
Logic and Distributed Control Systems (PLC timer and counter).pptx
PDF
Lec 12 (cont plc)
PDF
PLC.pdf
PPTX
PIC18 TIMER PROGRAMMING IN ASSEMBLY AND C
PPTX
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
PDF
Automation and Robotics Week 02 Theory Notes 20ME51I.pdf
PPTX
hdl timer ppt.pptx
DOCX
exp 15.docx
PDF
Displaying of Digital Clock through digital circuits and through Assembly Lan...
PPTX
Term paper alarm clock
PPT
PIC timer programming
PPTX
PIC-Chapter_10.pptx
PPTX
Timer ppt
PPTX
Lecture_25-26_PLC_Data Comparison, Arithmatic Operations, Counters.pptx
A digital clock has six 7-segment LEDs to display the seconds, minut.pdf
1 PageAlarm Clock Design Using PIC18F45E.docx
Elements of Industrial Automation Week 06 Notes.pdf
Digital Alarm Clock 446 project report
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
Advanced insrumentation lab manual
Logic and Distributed Control Systems (PLC timer and counter).pptx
Lec 12 (cont plc)
PLC.pdf
PIC18 TIMER PROGRAMMING IN ASSEMBLY AND C
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Automation and Robotics Week 02 Theory Notes 20ME51I.pdf
hdl timer ppt.pptx
exp 15.docx
Displaying of Digital Clock through digital circuits and through Assembly Lan...
Term paper alarm clock
PIC timer programming
PIC-Chapter_10.pptx
Timer ppt
Lecture_25-26_PLC_Data Comparison, Arithmatic Operations, Counters.pptx
Ad

More from Business Industrial Network (20)

PDF
Rotary Gear Type Pump Whitepaper
PDF
Process Hazards Analysis
PDF
Machinery Failure Analysis and Troubleshooting
PDF
Total Quality Management TQM
PDF
Process Risk Management
PPTX
Equipment Reliability Example
PDF
How to learn SCADA
PDF
Siemens PLC Programming Example #2
PDF
PPTX
Online Infrared Training Center Presentation
PDF
PLC Networking Basics - Instructor's notes
PPT
Plc networking basics - controllogix
PDF
Best plc-programming
PPTX
Thank You Veterans for your service
PDF
USA Manufacturing Jobs Analysis
PDF
Best Practices in PLC Programming
PDF
Support Workforce Wednesdays
PPTX
Lean TPM Autonomous Maintenance 2
PDF
7 warnings: Before Hiring a Web Developer
Rotary Gear Type Pump Whitepaper
Process Hazards Analysis
Machinery Failure Analysis and Troubleshooting
Total Quality Management TQM
Process Risk Management
Equipment Reliability Example
How to learn SCADA
Siemens PLC Programming Example #2
Online Infrared Training Center Presentation
PLC Networking Basics - Instructor's notes
Plc networking basics - controllogix
Best plc-programming
Thank You Veterans for your service
USA Manufacturing Jobs Analysis
Best Practices in PLC Programming
Support Workforce Wednesdays
Lean TPM Autonomous Maintenance 2
7 warnings: Before Hiring a Web Developer

Recently uploaded (20)

PPTX
Current and future trends in Computer Vision.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT
introduction to datamining and warehousing
PDF
Well-logging-methods_new................
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Artificial Intelligence
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Current and future trends in Computer Vision.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
introduction to datamining and warehousing
Well-logging-methods_new................
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Lecture Notes Electrical Wiring System Components
bas. eng. economics group 4 presentation 1.pptx
Digital Logic Computer Design lecture notes
CYBER-CRIMES AND SECURITY A guide to understanding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Internet of Things (IOT) - A guide to understanding
additive manufacturing of ss316l using mig welding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Artificial Intelligence
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

PLC Programming Example - PLC Clock - Answ

  • 1. https://bin95.com Correct version of PLC Programming Example LAD 2 - MAIN_PROG --- Total Rungs in File = 7 You are allow to share with others, attributions to https://BIN95.com PLC Clock example by BIN95.com This is a rung comment. The rung below is 60 second timer, followed by rungs that are counters driven by this timer. This is referred to as a cascading programming methodology. You could design this PLC clock several different ways. We picked the most simplest for this example. 60 sec=minute, 60 min=hour, 24 hrs=day,365days=year 0000 I:0 0 Bul.1764 RUN EN DN TON Timer On Delay Timer T4:0 Time Base 1.0 Preset 60< Accum 40< TON SECONDS
  • 2. https://bin95.com Correct version of PLC Programming Example LAD 2 - MAIN_PROG --- Total Rungs in File = 7 You are allow to share with others, attributions to https://BIN95.com This line of text is what a Page Title looks like. If 60 seconds have elapsed, increment minute counter by 1. (A "Page Title" is used when one particular subroutine has a lot of rungs, and you want to break them up [section off] for navigational purposes and to speed troubleshooting. Programming documentation is more user friendly.) 0001 T4:0 DN SECONDS/DN CU DN CTU Count Up Counter C5:0 Preset 60< Accum 59< CTU MINUTES If 60 Minutes counter Done (60 min have elapsed), increment Hour counter by 1 AND Reset Minutes counter afterwards. (In quiz version of this program, we were looking for you to spot that we where resetting counters before they had chance to increment following cascaded counter. In this answer to quiz version of program we corrected that.) 0002 C5:0 DN MINUTES/DN CU DN CTU Count Up Counter C5:1 Preset 24< Accum 22< CTU HOURS RES C5:0 MINUTES If Hours counter Done (24 hours have elapsed), increment Day counter by 1 AND reset Hours counter afterwards. 0003 C5:1 DN HOURS/DN CU DN CTU Count Up Counter C5:2 Preset 365< Accum 361< CTU DAYS RES C5:1 HOURS If Days counter Done (365 days have elapsed), increment Year counter by 1 AND reset Days counter afterwards. This rung/counter gives current years accumulated based on 365 days counted. We pre-plugged to year 2018. You might have expected a rung(s) for "Current Month", like Jan, Feb etc., here (1-12), but for simplicity reasons we did not do that logic in the example. (As each month has different number of days in to and would complicate logic more than we wanted to in this example.) 0004 C5:2 DN DAYS/DN CU DN CTU Count Up Counter C5:3 Preset 30000< Accum 2018< CTU CURRENT_YEAR RES C5:2 DAYS
  • 3. https://bin95.com Correct version of PLC Programming Example LAD 2 - MAIN_PROG --- Total Rungs in File = 7 You are allow to share with others, attributions to https://BIN95.com In the sequence of events, the last step after all counters are updated, is "If seconds timer done, reset the Seconds timer". . This is one way to correct problem found in our Quiz program that purposely did not work at https://www.slideshare.net/bin95/plcclock (Adam Bowman was the first one to find the problem and give a detailed solutuion, congrats Adam.) 0005 T4:0 DN SECONDS/DN RES T4:0 SECONDS So in summary, in quiz example of this program (https://www.slideshare.net/bin95/plcclock), we were resetting everything too soon. (Scan cycle is important to be aware of), in this example we corrected those intentional programming errors. 0006 END