KevanB

How should I go about doing an 8 hour timer?

5 posts in this topic

Didnt know this before but should have anticipated it, I cant put 8 hours into say a TON or a TOF, etc. Only goes up to 2880 seconds, .8 of an hour. What would be the best way to go about this?

Share this post


Link to post
Share on other sites

There are a number of ways to do this...a SEC timer (0-59 sec) that one-shots a CTU register (MIN), with limit test branch to one-shot a CTU register (HR) and to clear, also with a limit test branch.  Make sure to put limit tests in to keep from rolling over the registers and causing the processor to fault.  

You can also utilize the processor's System tags for date/time.

1 person likes this

Share this post


Link to post
Share on other sites

You didn't mention the processor. Where is the 2880s limit coming from? In Logix 5000, the preset is in ms, and goes up to 2 billion and change, nearly 600hrs. In Logix 500, the preset go up to 32767, and is in selectable units. The selections vary from CPU to CPU, but IIRC, they all have a 1s unit, which should give you up to 32767s, or just over 9hrs. If you need more than that, see Will's suggestions.

Share this post


Link to post
Share on other sites

Worst case scenario, use a one second timer's done with a one shot to ADD block them compare the add to 8 hours or 8*60*60=28800.  Which, to Jeremy's point, is well within the capabilities of any of the timers in any of the platforms from Rockwell. 

Share this post


Link to post
Share on other sites

Be careful using a one second timer incrementing a counter. There's an inherent error in standard timers that averages to about half a scan time per instance. This can add up over a long period like 8h. Better to use one of the built-in clock pulse bits, if the PLC has them.

1 person likes this

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