Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
This copy distributed by http://BIN95.com/
PLCCLOCK.RSS
LAD 2 - MAIN_PROG --- Total Rungs in File = 6
Page 1 Saturday, Oct...
This copy distributed by http://BIN95.com/
PLCCLOCK.RSS
LAD 2 - MAIN_PROG --- Total Rungs in File = 6
Page 2 Saturday, Oct...
Upcoming SlideShare
Loading in …5
×

PLC Programming Example - PLC Clock - Quiz

24,649 views

Published on

A most simple PLC programming example for those starting out with PLC programming.

Try to figure out a way to correct this PLC program and make it work. Run it on a PLC to make sure you corrections work. Afterwords, you can go to https://www.slideshare.net/bin95/plc-programming-example-plc-clock-answ and see one of many possible solutions for a working example of the PLC clock program.

Published in: Engineering
  • Adam Bowman was the first one to find the problems in Quiz version of this program and give a detailed solution, congrats Adam. Now we'll show you one of our possible solutions to get this clock program working. See https://www.slideshare.net/bin95/plc-programming-example-plc-clock-answ (But not until you have tried to spot what all is wrong in this version. :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • After 1.5 years, 6000+ views, finally someone commented about the little test we put in this sheet to see if students where paying attention to details. the RES are all for C5:0, instead of each being addressed for the counter above it. Congrats to mostafa ismail on our G+ community for spotting it. At least someone was paying attention. :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

PLC Programming Example - PLC Clock - Quiz

  1. 1. This copy distributed by http://BIN95.com/ PLCCLOCK.RSS LAD 2 - MAIN_PROG --- Total Rungs in File = 6 Page 1 Saturday, October 05, 2013 - 09:47:47 PLC Clock example by BIN95.com This is a rung comment. The rung below is 60 second timer, all other rungs 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 1761-Micro RUN T4:0 DN SECONDS/DN EN DN TON Timer On Delay Timer T4:0 Time Base 1.0 Preset 60< Accum 32< TON SECONDS If 60 seconds have elapsed, increment minute counter by 1. 0001 T4:0 DN SECONDS/DN CU DN CTU Count Up Counter C5:0 Preset 60< Accum 59< CTU MINUTES C5:0 DN MINUTES/DN RES C5:0 MINUTES If 60 minutes have elapsed, increment hour counter by 1. 0002 C5:0 DN MINUTES/DN CU DN CTU Count Up Counter C5:1 Preset 24< Accum 6< CTU HOURS C5:1 DN HOURS/DN RES C5:0 MINUTES If 24 hours have elapsed, increment day counter by 1. 0003 C5:1 DN HOURS/DN CU DN CTU Count Up Counter C5:2 Preset 365< Accum 61< CTU DAYS C5:2 DN DAYS/DN RES C5:0 MINUTES
  2. 2. This copy distributed by http://BIN95.com/ PLCCLOCK.RSS LAD 2 - MAIN_PROG --- Total Rungs in File = 6 Page 2 Saturday, October 05, 2013 - 09:47:47 This rung/counter gives current years accumulated based on 365 days counted. We pre-plugged to year 2013. You might have expected a rung for "Current Month" 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 login 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 2013< CTU CURRENT_YEAR C5:3 DN CURRENT_YEAR/DN RES C5:3 CURRENT_YEAR 0005 END

×