Doomsday Algorithm for PLCs???

Sparky

Member
Join Date
Jan 2003
Location
Twin Falls, ID
Posts
64
I was asked by my supervisor to program some automated bulding controls so that they would perform different operations during the weekends than what they would perform on weekdays. Using a AllenBradely PLC 5/40. I looked into the well known Doomsday algorithm. This proved to complicated for me to impliment into a ladder logic program. I could work it in my head but the conversions were not strickly mathamaticaly related. I ended up using a 7 digit preset counter that counted up using the PLC's own Status time file. Counting up daily at 18:00 and a limit instruction for the control bit (2-6 being mon-fri and 0-1 being Sat and Sun). Does anyone know how to convert the Doomsday Agorithm into ladder logic ussing a PLC 5. Or is my counter basical the best way to go about this operation?

Thanks guys

Here are some links on the Doomsday Algorithm.
http://rudy.ca/doomsday.html
 
PLC5 Day of Week

This was posted by someone previously as SLC code. It appears to work, but a better way is to get the day of week integer from an HMI.
 
Time and day

The PLC5/40 has a realtime clock module. It provides day of the week, day of the month, month, year, and hour, minute etc. It has a nine volt battery backup. The only problem is it will not change the time at daylight savings change overs. You could use DDE and RSLinx to update the time clock each month by writting into the time clock config registers. Win XP service pack 2 can be set up to get time from a time server on the internet.
 
Unable to find day of week module

I was unable to find that day of the week module. I found the clock with everything but the day of the week. I wish I was ussing a SLC 500 because it has the S:53 wich is an integer equivelant to the day of the week. Thanks for the link Derek McFarland I will test this out and let every one know what I find. thanks for the info guys.
 

Similar Topics

Hello all, We have a log oven with aluminium logs of 6m . I am trying to understand the program . THe log oven cuts the log according to the set...
Replies
4
Views
1,945
Hello, I need to implement sorting algorithm in STL. I was thinking about using Shell sort, but I don't know how to do this with such a low...
Replies
10
Views
2,470
Hi just wondering if anyone can help me out with the type of algorithm Omron PLCs use? Ideal, Series, or Parallel? I'm running through a tuning...
Replies
4
Views
1,910
Have a new project and I'd like to get my simulation logic a bit more realistic, as such I'd like to add noise to the simulated analog feedback...
Replies
6
Views
2,205
I currently have a PLC based scale controlled packaging machine that fills large 1,000-2,000lb containers. Depending on the material's density...
Replies
5
Views
2,701
Back
Top Bottom