Sign in to follow this  
Followers 0
Tlogix

Trigger a event based on Time of day ML1400

10 posts in this topic

I am trying to Trigger a event based on Time of day ML1400 I tried using compare but am running in to a problem with the minutes Im trying to latch a bit at 6:30am and unlatch it at 21:30 it works fine if the controller is powered up before 6:30 if it is powered up at 7:00 it has to wait till the next day to latch the bit. I attached a screen shot of the program I also tried using a Limit and ran in to the same problem.

Share this post


Link to post
Share on other sites
How about an S:FS first scan instruction to latch it upon power up?

Share this post


Link to post
Share on other sites
What if it power cycles before the set time?

Share this post


Link to post
Share on other sites
When I first read your question it seemed trivial, but I had to scratch my head for a few minutes to be sure I got all the conditions. I prefer a more brute-force but general-purpose method so it's easy for the next guy after me to read and understand. Try this: Edited by Ken Roach

Share this post


Link to post
Share on other sites
Thanks it looks like its what I needed. Some Times a guy should just take a break and do something els to get the Thinker working again :)

Share this post


Link to post
Share on other sites
I just noticed; the first instruction on the second rung should be LEQ, not LES. You want the second rung to be true any time the hour value is 20 or below. If the hour value is 21, you want the rung to be true only if the minute value is also 0 through 29. If you left the LES in, I think the whole hour of 20:00 to 20:59 would be skipped. Like you said... gotta take a step back sometimes !

Share this post


Link to post
Share on other sites
LIM will work if you multiply RTC Hour X100 and add RTC Min into one memory location (so, N7:5 (for example) becomes 0630 through 2330). That also eliminates the need for a latch. If you want to start later in the day and stop early the next day, just put the later (higher number) in the MIN field of the LIM, and the smaller number (earlier in day) in the MAX field of the LIM instructions. I've controlled many pump routines this way to avoid running pumps when power costs are highest.

Share this post


Link to post
Share on other sites
I changed it, when I ran it I noticed it skipped a hour. Thanks

Share this post


Link to post
Share on other sites
Just so Im not missing something here... IF the controller was ALWAYS running, using the two EQU instruction with RTC:0.HR and RTC:0.MIN would work fine..?? I use this all the time and it works great...BUT..my controllers are always running. I do use OTL and OTU with a ONS before them tho. Its simple and works. Is it that the controller is not running all the time that causes the problem..??? Just curious, why is the controller not running all the time..?? Edited by mhowasso

Share this post


Link to post
Share on other sites
(IF) That is the million dollar if. There are several scenarios that I can come up with 1. Service What if it's down for service and the service person locked out the main on the ontrol panel. 2. Time change. What if the user changed the feed time from 6:00 to 5:30 at 5:45. There are a few more that I can come up with. The way the timer works that Ken Roach came up with is foolproof,easy, and user friendly. I try not to deliver controls systems if there's a IF in the loop I try and go over every scenario I can. And still if it hits the real world there something that comes and nips you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0