×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PLC program to "look up" sunrise/set time.

PLC program to "look up" sunrise/set time.

PLC program to "look up" sunrise/set time.

(OP)
Hello,
I am new to PLC ladder logic and need to produce a directSoft program for a DL05. This program should disable a lighting system for 12 different time periods (corresponding to day light) during the year.  I am thinking a look up table.  As I am still somewhat inexperienced with ladder logic, so an example would be helpful.  
Thanks for the help.
Dave

RE: PLC program to "look up" sunrise/set time.

Why not use a light sensor as one of the inputs and let that be the control.  When it starts getting dark the plc turns on the lights.  Maybe I am not understanding what you are asking.  How about some more information about your system.

Steve

RE: PLC program to "look up" sunrise/set time.

(OP)
That would be the easy way out for sure.  The point of this project is for me to learn how to store and retrieve data from the PLC registry.  I am finding out that the documentation that came with my controller is very short on examples of actual programs.  I am really looking for a library of PLC programs that I can look through and pull out what I need.  I am not sure if exists.
Thanks for the help
Dave    

RE: PLC program to "look up" sunrise/set time.

Hello Henderd, Steve is right - using a light sensor would be more useful for determining when to turn on the lights, especially when you consider that your PLC table has no capability to detect a cloudy, stormy day. However, if you are determined to use a table.... I assume the 12 periods you refered to are months of the year? Am I correct? And I further assume that you would input to the PLC table the approximate sunrise/sunset time for that month. then here might be a possible framework for your program.
If your PLC stores Date, find out where in memory it stores the Month and the Time. Pick a memory area in you PLC for the table and input it in order of the months in sequential memory locations...ex January set time, february set time and so on through December, Then january rise time, february rise time etc.... Look up the current time in your program to determine if it is AM or PM. If it is AM you will be turning lights off, PM on. Look up the current month. Then look up the rise or set time in your PLC table based on the (First sequential memory location-1) + the month #. If current time = looked up time toggle the lights.
My other suggestion - use the light sensor and just tell people you are using a look up table - they won't know the difference

RE: PLC program to "look up" sunrise/set time.

Is this a school project?

xnuke

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: PLC program to "look up" sunrise/set time.

It would be simpler to calculate from the motion and position of the Earth.   

<nbucska@pcperipherals.com>

RE: PLC program to "look up" sunrise/set time.

WOW is there a sensor that will do that?

RE: PLC program to "look up" sunrise/set time.

(OP)
EEO, Yes, The 12 periods do represent the 12 months of the year.  I would love to use a light sensor but this is a training project with specific learning goals.  this answers xnuke too.  As for nbucska, I have looked at some sunrise/set equations and they are very complicated due to the wobble of the planet.  If there are some simpler equations you know of, I would love to find them.  As for the sensor which detects the motion of the earth, I believe it would be called a pendulum.
-Dave-

RE: PLC program to "look up" sunrise/set time.

Don't let them get to you Dave if you work with PLC's for long enough you to will becom a slightly cinical condercending old git too

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources